/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <summary> /// Adds a handler for the <see cref="E:Ultraviolet.Presentation.Controls.Primitives.Selector.Unselected"/> /// 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); }
/// <summary> /// Removes a handler for the <see cref="E:Ultraviolet.Presentation.Controls.Primitives.Selector.Selected"/> /// 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); }
/// <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); }
/// <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); }
/// <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); }