WPF TextBox Intercepting RoutedUICommands

前端 未结 6 1339
自闭症患者
自闭症患者 2021-02-14 03:10

I am trying to get Undo/Redo keyboard shortcuts working in my WPF application (I have my own custom functionality implemented using the Command Pattern). It seems, however, tha

6条回答
  •  悲哀的现实
    2021-02-14 03:47

    By default the target of the RoutedUICommand is the element with keyboard focus. However, you can set CommandTarget on the control emitting the command in order to change the root element that receives the command.

    
    

提交回复
热议问题