Another implementation of WPF Event to Command (with problems)

后端 未结 3 1009
一整个雨季
一整个雨季 2021-01-14 22:08

I am looking at various implementations of hooking a ICommand up to a control\'s event. So for instance the GotFocus of a TextBox should call a GotFocusCommand in my View Mo

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 22:47

    Using the Blend Event Triggers and an action negates the need to handle your own collections. And it can be added to any control.

    See MVVM Lights EventToCommand

    Or my extension of it here.(source)

提交回复
热议问题