Wpf event not bubbling

前端 未结 4 1437
野趣味
野趣味 2021-01-03 06:50

Here is my XAML:



        
4条回答
  •  情话喂你
    2021-01-03 06:57

    Microsoft wrote a very nice explanation Routed Events Overview

    enter image description here

    exactly the same thing will happen with MouseUpand PreviewMouseUp events in your case the e.Handled = (bool) chkhandle.IsChecked; stops the routing of the event.

    if you want to debug the events you can use Snoop it will illustrate very nicely which events happened on which objects and who handled them.

提交回复
热议问题