/// <summary>
        /// Adds a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.FocusManager.LostFocus"/>
        /// 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 AddLostFocusHandler(DependencyObject element, UpfRoutedEventHandler handler)
        {
            Contract.Require(element, nameof(element));
            Contract.Require(handler, nameof(handler));

            UIElementHelper.AddHandler(element, LostFocusEvent, handler);
        }
Exemple #2
0
 /// <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>
        /// Adds a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Controls.ToolTipService.ToolTipClosing"/>
        /// 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 AddToolTipClosingHandler(DependencyObject element, UpfToolTipEventHandler handler)
        {
            Contract.Require(element, nameof(element));

            UIElementHelper.AddHandler(element, ToolTipClosingEvent, handler);
        }