Hotkey Editor Control in WPF

1 · Alexey Golub · Feb. 2, 2017, midnight
Summary
GUI applications sometimes offer a way for users to configure hotkeys, typically using a textbox that records combination of key presses inside of it. Such control doesn’t come out of the box with WPF but we can implement it ourselves. Hotkey class WPF has two useful enumerations for this task — System.Windows.Input.Key and System.Windows.Input.ModifierKeys. Let’s make a class that encapsulates the values of those enums and call it Hotkey. An instance of this class is created by specifying a key...