Esempio n. 1
0
 /// <summary>
 ///     Adds a handler for the PreviewStylusInRange 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 AddPreviewStylusInRangeHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, PreviewStylusInRangeEvent, handler);
 }
 public static void AddPreviewStylusUpHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 3
0
 void RealButton_Loaded(object sender, RoutedEventArgs e)
 {
     Loaded -= RealButton_Loaded;
     Source = ImageUpSource;
     MouseLeftButtonDown += RealButton_MouseLeftButtonDown;
     MouseLeftButtonUp += RealButton_MouseLeftButtonUp;
     MouseEnter += RealButton_MouseEnter;
     MouseLeave += RealButton_MouseLeave;
     StylusUp += new StylusEventHandler(RealButton_StylusUp);
 }
Esempio n. 4
0
 /// <summary>
 ///     Adds a handler for the StylusUp 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 AddStylusUpHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, StylusUpEvent, handler);
 }
 public static void RemoveStylusOutOfRangeHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 6
0
 /// <summary>
 ///     Removes a handler for the StylusOutOfRange 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 RemoveStylusOutOfRangeHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusOutOfRangeEvent, handler);
 }
Esempio n. 7
0
 /// <summary>
 ///     Removes a handler for the LostStylusCapture 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 RemoveLostStylusCaptureHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, LostStylusCaptureEvent, handler);
 }
Esempio n. 8
0
		public static void AddPreviewStylusOutOfRangeHandler (DependencyObject element, StylusEventHandler handler)
		{
		    if (element == null) throw new ArgumentNullException ("element");
		    if (handler == null) throw new ArgumentNullException ("handler");
		
		    if (element is UIElement)
		        ((UIElement)element).AddHandler (PreviewStylusOutOfRangeEvent, handler);
		    else if (element is ContentElement)
		        ((ContentElement)element).AddHandler (PreviewStylusOutOfRangeEvent, handler);
		    else
		        throw new NotSupportedException ();
		}
Esempio n. 9
0
		public static void RemoveStylusUpHandler (DependencyObject element, StylusEventHandler handler)
		{
		    if (element == null) throw new ArgumentNullException ("element");
		    if (handler == null) throw new ArgumentNullException ("handler");
		
		    if (element is UIElement)
		        ((UIElement)element).RemoveHandler (StylusUpEvent, handler);
		    else if (element is ContentElement)
		        ((ContentElement)element).RemoveHandler (StylusUpEvent, handler);
		    else
		        throw new NotSupportedException ();
		}
 public static void AddPreviewStylusUpHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
 public static void AddStylusEnterHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
 public static void AddLostStylusCaptureHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
 public static void RemoveStylusOutOfRangeHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
 public static void RemovePreviewStylusMoveHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 15
0
 /// <summary>
 ///     Removes a handler for the StylusInRange 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 RemoveStylusInRangeHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, StylusInRangeEvent, handler);
 }
Esempio n. 16
0
File: Stylus.cs Progetto: ash2005/z
 /// <summary>
 ///     Adds a handler for the GotStylusCapture 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 AddGotStylusCaptureHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, GotStylusCaptureEvent, handler);
 }
Esempio n. 17
0
 /// <summary>
 ///     Adds a handler for the PreviewStylusOutOfRange 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 AddPreviewStylusOutOfRangeHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, PreviewStylusOutOfRangeEvent, handler);
 }
Esempio n. 18
0
File: Stylus.cs Progetto: ash2005/z
 /// <summary>
 ///     Removes a handler for the LostStylusCapture 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 RemoveLostStylusCaptureHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, LostStylusCaptureEvent, handler);
 }
Esempio n. 19
0
 /// <summary>
 ///     Adds a handler for the GotStylusCapture 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 AddGotStylusCaptureHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, GotStylusCaptureEvent, handler);
 }
 /// <summary>
 /// Removes the label if a stroke is erased
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void InkCanvas_StrokeErased(object sender, StylusEventHandler e)
 {
     HideAllTooltips();
 }
Esempio n. 21
0
 /// <summary>
 ///     Removes a handler for the PreviewStylusUp 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 RemovePreviewStylusUpHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, PreviewStylusUpEvent, handler);
 }
Esempio n. 22
0
        /////////////////////////////////////////////////////////////////////
        /// <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)
        {
            StylusEventHandler handler = (StylusEventHandler)genericHandler;

            handler(genericTarget, this);
        }
 public static void RemovePreviewStylusMoveHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 24
0
 /// <summary>
 ///     Removes a handler for the PreviewStylusInAirMove 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 RemovePreviewStylusInAirMoveHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.RemoveHandler(element, PreviewStylusInAirMoveEvent, handler);
 }
 public static void AddLostStylusCaptureHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 26
0
 /// <summary>
 ///     Adds a handler for the StylusLeave 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 AddStylusLeaveHandler(DependencyObject element, StylusEventHandler handler)
 {
     UIElement.AddHandler(element, StylusLeaveEvent, handler);
 }
 public static void AddStylusEnterHandler(System.Windows.DependencyObject element, StylusEventHandler handler)
 {
 }
Esempio n. 28
0
        public static void RemovePreviewStylusOutOfRangeHandler(DependencyObject element, StylusEventHandler handler)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }

            if (element is UIElement)
            {
                ((UIElement)element).RemoveHandler(PreviewStylusOutOfRangeEvent, handler);
            }
            else if (element is ContentElement)
            {
                ((ContentElement)element).RemoveHandler(PreviewStylusOutOfRangeEvent, handler);
            }
            else
            {
                throw new NotSupportedException();
            }
        }