当用户输入“?”时,我正在尝试将键绑定添加到 wpf 数据网格上。并尝试了以下方法:
<DataGrid.InputBindings>
<KeyBinding Command="{Binding Path=OpenPrompt}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}, Path=CurrentCell}" Key="OemBackslash" Modifiers="Shift"/>
</DataGrid.InputBindings>
我也尝试过将键设置为“反斜杠”和“除法”。
有谁知道如何做到这一点?