public static void RemoveAccessKeyPressedHandler (DependencyObject element, AccessKeyPressedEventHandler handler) { if (element == null) throw new ArgumentNullException ("element"); if (handler == null) throw new ArgumentNullException ("handler"); if (element is UIElement) ((UIElement)element).RemoveHandler (AccessKeyPressedEvent, handler); else if (element is ContentElement) ((ContentElement)element).RemoveHandler (AccessKeyPressedEvent, handler); else throw new NotSupportedException (); }
public static void RemoveAccessKeyPressedHandler(DependencyObject element, AccessKeyPressedEventHandler handler) { if (element == null) { throw new ArgumentNullException("element"); } if (handler == null) { throw new ArgumentNullException("handler"); } if (element is UIElement) { ((UIElement)element).RemoveHandler(AccessKeyPressedEvent, handler); } else if (element is ContentElement) { ((ContentElement)element).RemoveHandler(AccessKeyPressedEvent, handler); } else { throw new NotSupportedException(); } }
/// <summary> /// </summary> /// <param name="genericHandler">The handler to invoke.</param> /// <param name="genericTarget">The current object along the event's route.</param> protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { AccessKeyPressedEventHandler handler = (AccessKeyPressedEventHandler)genericHandler; handler(genericTarget, this); }
/// <summary> /// Removes a handler for the AccessKeyPressed attached event /// </summary> /// <param name="element">UIElement or ContentElement that listens to this event</param> /// <param name="handler">Event Handler to be removed</param> public static void RemoveAccessKeyPressedHandler(DependencyObject element, AccessKeyPressedEventHandler handler) { UIElement.RemoveHandler(element, AccessKeyPressedEvent, handler); }
/// <summary> /// Removes a handler for the AccessKeyPressed attached event /// </summary> /// <param name="element">UIElement or ContentElement that listens to this event</param> /// <param name="handler">Event Handler to be removed</param> public static void RemoveAccessKeyPressedHandler(DependencyObject element, AccessKeyPressedEventHandler handler) { UIElement.RemoveHandler(element, AccessKeyPressedEvent, handler); }
public static void RemoveAccessKeyPressedHandler(System.Windows.DependencyObject element, AccessKeyPressedEventHandler handler) { }
public static void RemoveAccessKeyPressedHandler(System.Windows.DependencyObject element, AccessKeyPressedEventHandler handler) { }