Stylus Class
TOC
Collapse the table of content
Expand the table of content

Stylus Class

 

Provides access to general information about a tablet pen.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

System.Object
  System.Windows.Input.Stylus

public static class Stylus

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticCaptured

Gets the element to which the stylus is bound.

System_CAPS_pubpropertySystem_CAPS_staticCurrentStylusDevice

Gets the stylus that represents the stylus currently in use.

System_CAPS_pubpropertySystem_CAPS_staticDirectlyOver

Gets the element that is directly beneath the stylus.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticIsFlicksEnabled

Gets or sets a value indicating whether flicks are enabled.

System_CAPS_pubpropertySystem_CAPS_staticIsPressAndHoldEnabled

Gets or sets a values indicating whether press and hold is enabled.

System_CAPS_pubpropertySystem_CAPS_staticIsTapFeedbackEnabled

Gets or sets whether a value indicating whether tap feedback is enabled.

System_CAPS_pubpropertySystem_CAPS_staticIsTouchFeedbackEnabled

Gets or sets whether a value indicating whether touch feedback is enabled.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAddGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adds a handler for the GotStylusCapture attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adds a handler for the LostStylusCapture attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adds a handler for the PreviewStylusButtonDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adds a handler for the PreviewStylusButtonUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adds a handler for the PreviewStylusDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adds a handler for the PreviewStylusInAirMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adds a handler for the PreviewStylusInRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Adds a handler for the PreviewStylusMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adds a handler for the PreviewStylusOutOfRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adds a handler for the PreviewStylusSystemGesture attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddPreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Adds a handler for the PreviewStylusUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adds a handler for the StylusButtonDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adds a handler for the StylusButtonUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adds a handler for the StylusDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusEnterHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusEnter attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusInAirMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusInRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusLeaveHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusLeave attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusMoveHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusOutOfRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adds a handler for the StylusSystemGesture attached event.

System_CAPS_pubmethodSystem_CAPS_staticAddStylusUpHandler(DependencyObject, StylusEventHandler)

Adds a handler for the StylusUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticCapture(IInputElement)

Captures the stylus to the specified element.

System_CAPS_pubmethodSystem_CAPS_staticCapture(IInputElement, CaptureMode)

Captures the stylus to the specified element.

System_CAPS_pubmethodSystem_CAPS_staticGetIsFlicksEnabled(DependencyObject)

Gets the value of the IsFlicksEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticGetIsPressAndHoldEnabled(DependencyObject)

Gets the value of the IsPressAndHoldEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticGetIsTapFeedbackEnabled(DependencyObject)

Gets the value of the IsTapFeedbackEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticGetIsTouchFeedbackEnabled(DependencyObject)

Gets the value of the IsTouchFeedbackEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticRemoveGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Removes a handler for the GotStylusCapture attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Removes a handler for the LostStylusCapture attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Removes a handler for the PreviewStylusButtonDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Removes a handler for the PreviewStylusButtonUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Removes a handler for the PreviewStylusDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Removes a handler for the PreviewStylusInAirMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Removes a handler for the PreviewStylusInRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Removes a handler for the PreviewStylusMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Removes a handler for the PreviewStylusOutOfRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Removes a handler for the PreviewStylusSystemGesture attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemovePreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Removes a handler for the PreviewStylusUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Removes a handler for the StylusButtonDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Removes a handler for the StylusButtonUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusDownHandler(DependencyObject, StylusDownEventHandler)

Removes a handler for the StylusDown attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusEnterHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusEnter attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusInAirMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusInRangeHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusInRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusLeaveHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusLeave attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusMoveHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusMove attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusOutOfRange attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Removes a handler for the StylusSystemGesture attached event.

System_CAPS_pubmethodSystem_CAPS_staticRemoveStylusUpHandler(DependencyObject, StylusEventHandler)

Removes a handler for the StylusUp attached event.

System_CAPS_pubmethodSystem_CAPS_staticSetIsFlicksEnabled(DependencyObject, Boolean)

Gets the value of the IsFlicksEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetIsPressAndHoldEnabled(DependencyObject, Boolean)

Sets the value of the IsPressAndHoldEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetIsTapFeedbackEnabled(DependencyObject, Boolean)

Sets the value of the IsTapFeedbackEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetIsTouchFeedbackEnabled(DependencyObject, Boolean)

Sets the value of the IsTouchFeedbackEnabled attached property on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSynchronize()

Synchronizes the cursor and the user interface.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticGotStylusCaptureEvent

Identifies the GotStylusCapture attached event.

System_CAPS_pubfieldSystem_CAPS_staticIsFlicksEnabledProperty

Identifies the IsFlicksEnabled attached property.

System_CAPS_pubfieldSystem_CAPS_staticIsPressAndHoldEnabledProperty

Identifies the IsPressAndHoldEnabled attached property.

System_CAPS_pubfieldSystem_CAPS_staticIsTapFeedbackEnabledProperty

Identifies the IsTapFeedbackEnabled attached property.

System_CAPS_pubfieldSystem_CAPS_staticIsTouchFeedbackEnabledProperty

Identifies the IsTouchFeedbackEnabledattached property.

System_CAPS_pubfieldSystem_CAPS_staticLostStylusCaptureEvent

Identifies the LostStylusCapture attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusButtonDownEvent

Identifies the PreviewStylusButtonDown attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusButtonUpEvent

Identifies the PreviewStylusButtonUp attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusDownEvent

Identifies the PreviewStylusDown attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusInAirMoveEvent

Identifies the PreviewStylusInAirMove attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusInRangeEvent

Identifies the PreviewStylusInRange attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusMoveEvent

Identifies the PreviewStylusMove attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusOutOfRangeEvent

Identifies the PreviewStylusOutOfRange attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusSystemGestureEvent

Identifies the PreviewStylusSystemGesture attached event.

System_CAPS_pubfieldSystem_CAPS_staticPreviewStylusUpEvent

Identifies the PreviewStylusUp attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusButtonDownEvent

Identifies the StylusButtonDown attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusButtonUpEvent

Identifies the StylusButtonUp attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusDownEvent

Identifies the StylusDown attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusEnterEvent

Identifies the StylusEnter attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusInAirMoveEvent

Identifies the StylusInAirMove attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusInRangeEvent

Identifies the StylusInRange attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusLeaveEvent

Identifies the StylusLeave attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusMoveEvent

Identifies the StylusMove attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusOutOfRangeEvent

Identifies the StylusOutOfRange attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusSystemGestureEvent

Identifies the StylusSystemGesture attached event.

System_CAPS_pubfieldSystem_CAPS_staticStylusUpEvent

Identifies the StylusUp attached event.

NameDescription
System_CAPS_pubeventSystem_CAPS_staticGotStylusCapture

Occurs when an element captures the stylus events.

System_CAPS_pubeventSystem_CAPS_staticLostStylusCapture

Occurs when an element releases stylus events.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusButtonDown

Occurs when the user presses one of the buttons on the stylus.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusButtonUp

Occurs when the user releases one of the buttons on the stylus.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusDown

Occurs when user touches the tip of the stylus to the tablet.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusInAirMove

Occurs if the stylus moves while it is within range of (but not touching) the tablet.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusInRange

Occurs when the stylus comes within range of the tablet.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusMove

Occurs when the stylus moves while it is touching the tablet.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusOutOfRange

Occurs when the stylus goes out of range of the tablet.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusSystemGesture

Occurs when the user makes a system gesture with this stylus.

System_CAPS_pubeventSystem_CAPS_staticPreviewStylusUp

Occurs when the user lifts the stylus from the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusButtonDown

Occurs when the user presses one of the buttons on the stylus.

System_CAPS_pubeventSystem_CAPS_staticStylusButtonUp

Occurs when the user releases one of the buttons on the stylus.

System_CAPS_pubeventSystem_CAPS_staticStylusDown

Occurs when the user touches the tip of the stylus to the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusEnter

Occurs when the stylus cursor enters the bounds of an element.

System_CAPS_pubeventSystem_CAPS_staticStylusInAirMove

Occurs when the stylus moves while it is in range of, but not touching, the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusInRange

Occurs when the stylus comes within range of the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusLeave

Occurs when the stylus cursor leaves the bounds of an element.

System_CAPS_pubeventSystem_CAPS_staticStylusMove

Occurs when the stylus moves while it is touching the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusOutOfRange

Occurs when the stylus goes out of range of the tablet.

System_CAPS_pubeventSystem_CAPS_staticStylusSystemGesture

Occurs when the user makes a system gesture with this stylus.

System_CAPS_pubeventSystem_CAPS_staticStylusUp

Occurs when the user raises the stylus from the Tablet PC.

The following example demonstrates how to record the coordinates of the stylus, even if the stylus leaves the bounds of a TextBox. This example assumes that there is a TextBox called textBox1, and that the StylusDown, StylusUp, and StylusMove events are connected to event handlers.

void textbox1_StylusDown(object sender, StylusDownEventArgs e)
{
    Stylus.Capture(textbox1);
}

void textbox1_StylusMove(object sender, StylusEventArgs e)
{
    Point pos = e.GetPosition(textbox1);
    textbox1.AppendText("X: " + pos.X + " Y: " + pos.Y + "\n");
}

void textbox1_StylusUp(object sender, StylusEventArgs e)
{
    Stylus.Capture(textbox1, CaptureMode.None);
}

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft