In WPF, how to add an EventHandler for a FrameworkElement designed in Template?

后端 未结 5 1398
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 11:12

I have defined the following DataTemplate for ListBox items in an external resource dictionary:



        
5条回答
  •  Happy的楠姐
    2021-01-06 12:00

    You can use EventSetter in the style you are setting the template with:

    
    

提交回复
热议问题