Example #1
0
        /// <summary>
        /// Removes a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.Mouse.LostMouseCapture"/>
        /// attached event from the specified element.
        /// </summary>
        /// <param name="element">The element to which to Remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveLostMouseCaptureHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, LostMouseCaptureEvent, handler);
        }
Example #2
0
 /// <summary>
 /// Adds a handler for the <see cref="UnselectedEvent"/> attached event to the specified element.
 /// </summary>
 /// <param name="element">The element to which to add the event handler.</param>
 /// <param name="handler">The event handler to add to the element.</param>
 public static void AddUnselectedHandler(DependencyObject element, UpfRoutedEventHandler handler)
 {
     UIElementHelper.AddHandler(element, UnselectedEvent, handler);
 }
Example #3
0
 /// <summary>
 /// Removes a handler for the <see cref="SelectedEvent"/> attached event from the specified element.
 /// </summary>
 /// <param name="element">The element from which to remove the event handler.</param>
 /// <param name="handler">The event handler to remove from the element.</param>
 public static void RemoveSelectedHandler(DependencyObject element, UpfRoutedEventHandler handler)
 {
     UIElementHelper.RemoveHandler(element, SelectedEvent, handler);
 }
Example #4
0
        /// <summary>
        /// Removes a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.FocusManager.LostFocus"/> 
        /// 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 RemoveLostFocusHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            UIElementHelper.RemoveHandler(element, LostFocusEvent, handler);
        }
Example #5
0
        /// <summary>
        /// Adds a handler for the GotFocus 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 AddGotFocusHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, "element");
            Contract.Require(handler, "handler");

            UIElementHelper.AddHandler(element, GotFocusEvent, handler);
        }
Example #6
0
        /// <summary>
        /// Removes a handler for the 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, "element");
            Contract.Require(handler, "handler");

            IInputElementHelper.RemoveHandler(element, LostKeyboardFocusEvent, handler);
        }
Example #7
0
        /// <summary>
        /// Removes a handler for the GotMouseCapture attached event from the specified element.
        /// </summary>
        /// <param name="element">The element to which to Remove the handler.</param>
        /// <param name="handler">The handler to remove from the specified element.</param>
        public static void RemoveGotMouseCaptureHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, "element");
            Contract.Require(handler, "handler");

            IInputElementHelper.RemoveHandler(element, GotMouseCaptureEvent, handler);
        }
Example #8
0
        /// <summary>
        /// Removes a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.Keyboard.GotKeyboardFocus"/> 
        /// 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 RemoveGotKeyboardFocusHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            IInputElementHelper.RemoveHandler(element, GotKeyboardFocusEvent, handler);
        }