快捷绑定:键盘上同一个按键出现多次可以直接写其共同的名称。
eg. LeftShift、RightShift :Shift
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=window}"/>
</TextBox.InputBindings>
快捷绑定:键盘上同一个按键出现多次可以直接写其共同的名称。
eg. LeftShift、RightShift :Shift
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=window}"/>
</TextBox.InputBindings>