Event handler in DataTemplate

前端 未结 3 834
梦如初夏
梦如初夏 2020-12-16 02:23

I have WPF ComboBox inside a data template (a lot of comboboxes in listbox) and I want to handle enter button. It would be easy if it was e.g. a button - I would use Command

3条回答
  •  悲哀的现实
    2020-12-16 02:52

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

    
    

提交回复
热议问题