Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Input.GamePad.AxisDown"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element from which to remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveAxisUpHandler(DependencyObject element, UpfGamePadAxisChangedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, AxisDownEvent, handler);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Input.GamePad.ButtonUp"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element from which to remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveButtonUpHandler(DependencyObject element, UpfKeyboardFocusChangedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, ButtonUpEvent, handler);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.KeyUp"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element from which to remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveKeyUpHandler(DependencyObject element, UpfKeyEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, KeyUpEvent, handler);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.TextEditing"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element from which to remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveTextEditingHandler(DependencyObject element, UpfKeyboardEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, TextEditingEvent, handler);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.LostKeyboardFocus"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element from which to remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveLostKeyboardFocusHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, LostKeyboardFocusEvent, handler);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.KeyDown"/>
        /// 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 AddKeyDownHandler(DependencyObject element, UpfKeyDownEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.AddHandler(element, KeyDownEvent, handler);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Input.Keyboard.PreviewTextInput"/>
        /// 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 AddPreviewTextInputHandler(DependencyObject element, UpfKeyboardEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.AddHandler(element, PreviewTextInputEvent, handler);
        }