InputBindings:获取与此元素关联的输入绑定的集合。内容为一个或多个 InputBinding 元素(通常为 KeyBinding 或 MouseBinding 派生类)。 其中每个都应具有 Command 和 Gesture 属性集。
<Window.InputBindings>
<KeyBinding Command="{Binding OpenRecorder}" CommandParameter="{Binding Path=., ElementName=StartupWindow}" Modifiers="Control" Key="N"/>
<KeyBinding Command="{Binding OpenWebcamRecorder}" CommandParameter="{Binding ElementName=StartupWindow}" Modifiers="Control" Key="W"/>
<KeyBinding Command="{Binding OpenBoardRecorder}" CommandParameter="{Binding ElementName=StartupWindow}" Modifiers="Control" Key="B"/>
<KeyBinding Command="{Binding OpenEditor}" CommandParameter="{Binding ElementName=StartupWindow}" Modifiers="Control" Key="E"/>
<KeyBinding Command="{Binding OpenOptions}" Modifiers="Control+Alt" Key="O"/>
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SelectedItem.ID, ElementName=AlarmData}" />
</Window.InputBindings>