/// <summary> /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.GamePad.PreviewAxisChanged"/> /// attached event to the specified element. /// </summary> /// <param name="element">The element to which to add the handler.</param> /// <param name="handler">The handler to add to the specified element.</param> public static void AddPreviewAxisChangedHandler(DependencyObject element, UpfGamePadAxisChangedEventHandler handler) { Contract.Require(element, nameof(element)); Contract.Require(handler, nameof(handler)); IInputElementHelper.AddHandler(element, PreviewAxisChangedEvent, handler); }
/// <summary> /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.TextEditing"/> /// attached event to the specified element. /// </summary> /// <param name="element">The element to which to add the handler.</param> /// <param name="handler">The handler to add to the specified element.</param> public static void AddTextEditingHandler(DependencyObject element, UpfKeyboardEventHandler handler) { Contract.Require(element, nameof(element)); Contract.Require(handler, nameof(handler)); IInputElementHelper.AddHandler(element, TextEditingEvent, handler); }
/// <summary> /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.KeyUp"/> /// attached event to the specified element. /// </summary> /// <param name="element">The element to which to add the handler.</param> /// <param name="handler">The handler to add to the specified element.</param> public static void AddKeyUpHandler(DependencyObject element, UpfKeyEventHandler handler) { Contract.Require(element, nameof(element)); Contract.Require(handler, nameof(handler)); IInputElementHelper.AddHandler(element, KeyUpEvent, handler); }
/// <summary> /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.LostKeyboardFocus"/> /// attached event to the specified element. /// </summary> /// <param name="element">The element to which to add the handler.</param> /// <param name="handler">The handler to add to the specified element.</param> public static void AddLostKeyboardFocusHandler(DependencyObject element, UpfRoutedEventHandler handler) { Contract.Require(element, nameof(element)); Contract.Require(handler, nameof(handler)); IInputElementHelper.AddHandler(element, LostKeyboardFocusEvent, handler); }