Create Key binding in WPF

后端 未结 5 1890
滥情空心
滥情空心 2020-11-30 08:47

I need to create input binding for Window.

public class MainWindow : Window
{
    public MainWindow()
    {
        SomeCommand = ??? () => OnAction();
           


        
5条回答
  •  天涯浪人
    2020-11-30 09:17

    This is how I solved this problem in my project:

    
            
                
        (...)
    

    ReportCommand is an ICommand in MyView, not in the ViewModel.

提交回复
热议问题