StylusDevice Class

 

Represents a tablet pen used with a Tablet PC.

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


public sealed class StylusDevice : InputDevice

NameDescription
System_CAPS_pubpropertyActiveSource

Gets the PresentationSource that reports current input for the stylus.(Overrides InputDevice.ActiveSource.)

System_CAPS_pubpropertyCaptured

Gets the element that captured the stylus.

System_CAPS_pubpropertyDirectlyOver

Gets the IInputElement that the pointer is positioned over.

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyId

Gets the identifier for the stylus device.

System_CAPS_pubpropertyInAir

Gets whether the tablet pen is positioned above, yet not in contact with, the digitizer.

System_CAPS_pubpropertyInRange

Gets a value that indicates whether the tablet pen is in range of the digitizer.

System_CAPS_pubpropertyInverted

Gets a value that indicates whether the secondary tip of the stylus is in use.

System_CAPS_pubpropertyIsValid

Gets a value that indicates whether a stylus device is valid.

System_CAPS_pubpropertyName

Gets the name of the stylus.

System_CAPS_pubpropertyStylusButtons

Gets the stylus buttons on the stylus.

System_CAPS_pubpropertyTabletDevice

Gets the TabletDevice representing the digitizer associated with the current StylusDevice.

System_CAPS_pubpropertyTarget

Gets the element that receives input.(Overrides InputDevice.Target.)

NameDescription
System_CAPS_pubmethodCapture(IInputElement)

Binds input from the stylus to the specified element.

System_CAPS_pubmethodCapture(IInputElement, CaptureMode)

Binds the stylus to the specified element.

System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetPosition(IInputElement)

Gets the position of the stylus.

System_CAPS_pubmethodGetStylusPoints(IInputElement)

Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus.

System_CAPS_pubmethodGetStylusPoints(IInputElement, StylusPointDescription)

Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus. Uses the specified StylusPointDescription.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSynchronize()

Synchronizes the cursor and the user interface.

System_CAPS_pubmethodToString()

Returns the name of the stylus device.(Overrides Object.ToString().)

System_CAPS_pubmethodVerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

The following example demonstrates how to retrieve a reference to the default stylus device.

// Get the current stylus device
StylusDevice myStylusDevice = Stylus.CurrentStylusDevice;

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.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: