Exemplo n.º 1
0
        public static void RemoveStylusButtonUpHandler(DependencyObject element, StylusButtonEventHandler handler)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }

            if (element is UIElement)
            {
                ((UIElement)element).RemoveHandler(StylusButtonUpEvent, handler);
            }
            else if (element is ContentElement)
            {
                ((ContentElement)element).RemoveHandler(StylusButtonUpEvent, handler);
            }
            else
            {
                throw new NotSupportedException();
            }
        }
 public static void AddStylusButtonUpHandler(System.Windows.DependencyObject element, StylusButtonEventHandler handler)
 {
 }
 public static void RemoveStylusButtonDownHandler(System.Windows.DependencyObject element, StylusButtonEventHandler handler)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 ///     Removes a handler for the PreviewStylusButtonUp 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 RemovePreviewStylusButtonUpHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.RemoveHandler(element, PreviewStylusButtonUpEvent, handler);
 }
Exemplo n.º 5
0
 /// <summary>
 ///     Adds a handler for the PreviewStylusButtonDown attached event
 /// </summary>
 /// <param name="element">UIElement or ContentElement that listens to this event</param>
 /// <param name="handler">Event Handler to be added</param>
 public static void AddPreviewStylusButtonDownHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.AddHandler(element, PreviewStylusButtonDownEvent, handler);
 }
Exemplo n.º 6
0
 /// <summary>
 ///     Adds a handler for the StylusButtonUp attached event
 /// </summary>
 /// <param name="element">UIElement or ContentElement that listens to this event</param>
 /// <param name="handler">Event Handler to be added</param>
 public static void AddStylusButtonUpHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.AddHandler(element, StylusButtonUpEvent, handler);
 }
Exemplo n.º 7
0
 /// <summary>
 ///     Removes a handler for the StylusButtonDown 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 RemoveStylusButtonDownHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusButtonDownEvent, handler);
 }
Exemplo n.º 8
0
 /// <summary>
 ///     Removes a handler for the PreviewStylusButtonUp 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 RemovePreviewStylusButtonUpHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.RemoveHandler(element, PreviewStylusButtonUpEvent, handler);
 }
Exemplo n.º 9
0
 /// <summary>
 ///     Adds a handler for the PreviewStylusButtonDown attached event
 /// </summary>
 /// <param name="element">UIElement or ContentElement that listens to this event</param>
 /// <param name="handler">Event Handler to be added</param>
 public static void AddPreviewStylusButtonDownHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.AddHandler(element, PreviewStylusButtonDownEvent, handler);
 }
Exemplo n.º 10
0
 /// <summary>
 ///     Adds a handler for the StylusButtonUp attached event
 /// </summary>
 /// <param name="element">UIElement or ContentElement that listens to this event</param>
 /// <param name="handler">Event Handler to be added</param>
 public static void AddStylusButtonUpHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.AddHandler(element, StylusButtonUpEvent, handler);
 }
Exemplo n.º 11
0
 /// <summary>
 ///     Removes a handler for the StylusButtonDown 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 RemoveStylusButtonDownHandler(DependencyObject element, StylusButtonEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusButtonDownEvent, handler);
 }
Exemplo n.º 12
0
		public static void RemoveStylusButtonUpHandler (DependencyObject element, StylusButtonEventHandler handler)
		{
		    if (element == null) throw new ArgumentNullException ("element");
		    if (handler == null) throw new ArgumentNullException ("handler");
		
		    if (element is UIElement)
		        ((UIElement)element).RemoveHandler (StylusButtonUpEvent, handler);
		    else if (element is ContentElement)
		        ((ContentElement)element).RemoveHandler (StylusButtonUpEvent, handler);
		    else
		        throw new NotSupportedException ();
		}
Exemplo n.º 13
0
		public static void AddPreviewStylusButtonDownHandler (DependencyObject element, StylusButtonEventHandler handler)
		{
		    if (element == null) throw new ArgumentNullException ("element");
		    if (handler == null) throw new ArgumentNullException ("handler");
		
		    if (element is UIElement)
		        ((UIElement)element).AddHandler (PreviewStylusButtonDownEvent, handler);
		    else if (element is ContentElement)
		        ((ContentElement)element).AddHandler (PreviewStylusButtonDownEvent, handler);
		    else
		        throw new NotSupportedException ();
		}
        /////////////////////////////////////////////////////////////////////
        /// <summary>
        ///     The mechanism used to call the type-specific handler on the
        ///     target.
        /// </summary>
        /// <param name="genericHandler">
        ///     The generic handler to call in a type-specific way.
        /// </param>
        /// <param name="genericTarget">
        ///     The target to call the handler on.
        /// </param>
        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
        {
            StylusButtonEventHandler handler = (StylusButtonEventHandler)genericHandler;

            handler(genericTarget, this);
        }
 public static void AddStylusButtonUpHandler(System.Windows.DependencyObject element, StylusButtonEventHandler handler)
 {
 }
 public static void RemoveStylusButtonDownHandler(System.Windows.DependencyObject element, StylusButtonEventHandler handler)
 {
 }