locked
Focus TextBox from Keypress in Window, not using code behind and viewmodel RRS feed

  • Question

  • Hi,

    In a WPF window, is there a way to focus a UIElement, e.g. a textbox, from a keybinding (a keypress) in pure XAML.

    If I use Keybinding I must bind to a command in the viewmodel, and if I use an event KeyDown, it must be implemented in code behind. Could be nice if it could all be handled in xaml.

    Thanx

    Wednesday, September 28, 2016 6:21 AM

Answers

All replies