WPF MVVM : Commands are easy. How to Connect View and ViewModel with RoutedEvent

后端 未结 7 422
走了就别回头了
走了就别回头了 2020-12-13 02:51

Suppose I have a view implemented as a DataTempate inside a resource Dictionary. And I have a corresponding ViewModel. Binding Commands are easy. But what if my View contain

7条回答
  •  鱼传尺愫
    2020-12-13 03:17

    One option is to extend the control in question and add support for the particular command you require. For example, I've modified ListView before to support the ItemActivated event and related command.

提交回复
热议问题