Another implementation of WPF Event to Command (with problems)

后端 未结 3 1010
一整个雨季
一整个雨季 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:34

    GalaSoft MVVM Light ToolKit - EventToCommand you can do this

    
    

    Where import this namespaces

     i- xmlns:i="clr-namespace:System.Windows.Interactivity;
        assembly=System.Windows.Interactivity"
     cmd-xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;
         assembly=GalaSoft.MvvmLight.Extras.WPF4"
    

提交回复
热议问题