How to assign short-cut key to a button in WPF?
Googling gave me the answer as to append _ instead of \'&\' in standard Winforms.
So after I have done a
Solution for key binding (+ button binding) with own commands:
The body of XAML file:
and .CS file:
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
}
public void FirstMethod(Object sender, ExecutedRoutedEventArgs e)
{
// btn1
}
public void SecondMethod(Object sender, ExecutedRoutedEventArgs e)
{
// btn2
}
}