There are several keyboard shortcuts that I would like to get available for the entire system, regardless of where the focus is now.
I currently have those that are defined as <Window.InputBindings>
in the main XAML window. Everything is fine, but ... The ribbon is encapsulated as a separate UserControl, and all the shortcuts, of course, are associated with the buttons that are on this ribbon.
Therefore, I do not really like the smell of having two parts of applied logic dealing with the same functionality spreading over 2 classes.
Ideally, I would like to define KeyBindings as <Window.InputBindings>
, but in UserControl, not in the window. Obviously, this cannot be done with the XAML syntax, but only <UserControl.InputBindings>
- alas, that will only make them available when the focus is on the tape (this means that never).
Any suggestions?
Thanks Alex
source share