WPF给button加快捷键
<>
<RoutedUICommand x:Key="ClickCommand" Text="Text" />
</>
<>
<CommandBinding Command="{StaticResource ClickCommand}"
Executed="ClickHandler" />
</>
<>
<KeyBinding Key="C" Modifiers="Ctrl" Command="{StaticResource ClickCommand}" />
</>
<Grid>
<Button Content="Click here" Command="{StaticResource ClickCommand}"/>
</Grid>