I need to create input binding for Window.
public class MainWindow : Window
{
public MainWindow()
{
SomeCommand = ??? () => OnAction();
You will have to create your own Command implementing ICommand interface and initialize SomeCommand with the instance of that Command.
Now you have to set the DataContext of Window to self in order to make the Command Binding work:
public MainWindow()
{
InitializeComponents();
DataContext = this;
SomeCommand = MyCommand() => OnAction();
}
OR you will have to update your Binding as