protected override void OnKeyDown(KeyEventArgs e) { Key mainKey = e.Key; ModifierKeys modifiers = e.KeyboardDevice.Modifiers; FreeKeyGesture gesture = new FreeKeyGesture(mainKey, modifiers); // not sure if this works with binding... this.KeyGesture = gesture; /// Don't enter text in the underlying TextBox. e.Handled = true; }
public FileCategory( string name, string path, FreeKeyGesture gesture ) : this( name, path ) { this.Gesture = gesture; }