KeyBindings命令未在DataGrid单元格内触发

时间:2016-09-01 09:19:39

标签: c# wpf xaml key-bindings

当我在DataGrid单元格内部时,我尝试使用KeyBinding机制来触发操作。

<DataGrid.InputBindings>
    <KeyBinding Key="Esc" Command="{Binding MainWindowKeyBindings.DatabaseGridKeyBindings.EscCommand}"/>
</DataGrid.InputBindings>

这只有在我对数据网格进行聚焦时才有效,但是当我在特定单元格内部时,它就不会被触发。我做错了什么?

1 个答案:

答案 0 :(得分:1)

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-scm-plugin</artifactId>
    <version>1.9.5</version>
    <executions>
        <execution>
            <phase>test</phase>
            <goals>
                <goal>checkout</goal>
            </goals>
            <configuration>
                <basedir>${project.build.directory}</basedir>
                <checkoutDirectory>${project.build.directory}</checkoutDirectory>
                <connectionUrl>scm:hg:http://link-to-required-repo</connectionUrl>
                <username>www</username>
                <password>qqq</password>
            </configuration>
        </execution>
    </executions>
</plugin>