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

            if (element is UIElement)
            {
                ((UIElement)element).RemoveHandler(StylusDownEvent, handler);
            }
            else if (element is ContentElement)
            {
                ((ContentElement)element).RemoveHandler(StylusDownEvent, handler);
            }
            else
            {
                throw new NotSupportedException();
            }
        }
 public static void AddStylusDownHandler(System.Windows.DependencyObject element, StylusDownEventHandler handler)
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Removes a handler for the StylusDown 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 RemoveStylusDownHandler(DependencyObject element, StylusDownEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusDownEvent, handler);
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Adds a handler for the StylusDown 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 AddStylusDownHandler(DependencyObject element, StylusDownEventHandler handler)
 {
     UIElement.AddHandler(element, StylusDownEvent, handler);
 }
        /////////////////////////////////////////////////////////////////////
        /// <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)
        {
            StylusDownEventHandler handler = (StylusDownEventHandler)genericHandler;

            handler(genericTarget, this);
        }
Ejemplo n.º 6
0
 /// <summary>
 ///     Removes a handler for the StylusDown 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 RemoveStylusDownHandler(DependencyObject element, StylusDownEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusDownEvent, handler);
 }
Ejemplo n.º 7
0
 /// <summary>
 ///     Adds a handler for the StylusDown 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 AddStylusDownHandler(DependencyObject element, StylusDownEventHandler handler)
 {
     UIElement.AddHandler(element, StylusDownEvent, handler);
 }
Ejemplo n.º 8
0
		public static void RemoveStylusDownHandler (DependencyObject element, StylusDownEventHandler handler)
		{
		    if (element == null) throw new ArgumentNullException ("element");
		    if (handler == null) throw new ArgumentNullException ("handler");
		
		    if (element is UIElement)
		        ((UIElement)element).RemoveHandler (StylusDownEvent, handler);
		    else if (element is ContentElement)
		        ((ContentElement)element).RemoveHandler (StylusDownEvent, handler);
		    else
		        throw new NotSupportedException ();
		}
 public static void AddStylusDownHandler(System.Windows.DependencyObject element, StylusDownEventHandler handler)
 {
 }