private KeyBinding CreateFrozenKeyBinding(ICommand command, ModifierKeys modifiers, Key key) { var kb = new KeyBinding(command, key, modifiers); kb.Freeze(); return(kb); }
static LostKeyboardFocusBehavior() { EnterKeyBinding = new KeyBinding(new DelegateCommand(() => Keyboard.ClearFocus()), new KeyGesture(Key.Enter)); EnterKeyBinding.Freeze(); }