/ / Schlüsselbindung an '?' - Wpf, Datagrid, Schlüsselbindungen

Schlüsselbindung an '?' - WPF, Datagrid, Tastenbelegung

Ich versuche, einem wpf-Datagrid eine Tastenkombination hinzuzufügen, wenn der Benutzer ein "?" Eingibt und Folgendes versucht hat:

<DataGrid.InputBindings>
<KeyBinding Command="{Binding Path=OpenPrompt}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}, Path=CurrentCell}" Key="OemBackslash" Modifiers="Shift"/>
</DataGrid.InputBindings>

Ich habe auch versucht, die Taste auf "Backslash" und "Divide" zu setzen.

Weiß jemand, wie man das macht?

Antworten:

2 für die Antwort № 1

Übereinstimmung mit Schlüsselaufzählung es muss sein OemQuestion

Ich habe es müde und es funktioniert:

 <DataGrid.InputBindings>
<KeyBinding Command="{Binding Path=MyCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}, Path=CurrentCell}" Key="OemQuestion" Modifiers="Shift"/>
</DataGrid.InputBindings>

Vielleicht haben Sie ein Bindungsproblem?