私は DataGrid を使用しています。
現在、次の XAML があります。
<dg:DataGrid lc:DataGridPackage.QueryGrid="{Binding myGrid}">
...
<dg:DataGrid.Resources>
<lc:CommandReference x:Key="myCommand" Command="{Binding myCommandActionItem}" />
</dg:DataGrid.Resources>
<dg:DataGrid.InputBindings>
<KeyBinding Modifiers="Control" Key="D" Command="{StaticResource myCommand}" />
それは正常に動作します。データグリッドの行をクリックし、Ctrl+D を押すと、コマンドが実行されます (この場合は、行を更新します)。
ただし、KeyBinding を MouseBinding に変更すると、次のようになります。
<MouseBinding MouseAction="LeftDoubleClick" Command="{StaticResource myCommand}">
「タイプ 'MouseBinding' の 'Command' プロパティに 'Binding' を設定することはできません。'Binding' は DependencyObject の DependencyProperty にのみ設定できます」というエラーが表示されます。
私は何を間違っていますか?