Пример #1
0
        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;
        }
Пример #2
0
		public FileCategory( string name, string path, FreeKeyGesture gesture ) : this( name, path ) {

			this.Gesture = gesture;

		}