StylusDevice Class

Represents a tablet pen used with a Tablet PC.

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

[<Sealed>]
type StylusDevice =  
    class 
        inherit InputDevice 
    end

The StylusDevice type exposes the following members.

  NameDescription
Public propertyActiveSourceGets the PresentationSource that reports current input for the stylus. (Overrides InputDevice.ActiveSource.)
Public propertyCapturedGets the element that captured the stylus.
Public propertyDirectlyOverGets the IInputElement that the pointer is positioned over.
Public propertyDispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public propertyIdGets the identifier for the stylus device.
Public propertyInAirGets whether the tablet pen is positioned above, yet not in contact with, the digitizer.
Public propertyInRangeGets a value that indicates whether the tablet pen is in range of the digitizer.
Public propertyInvertedGets a value that indicates whether the secondary tip of the stylus is in use.
Public propertyIsValidGets a value that indicates whether a stylus device is valid.
Public propertyNameGets the name of the stylus.
Public propertyStylusButtonsGets the stylus buttons on the stylus.
Public propertyTabletDeviceGets the TabletDevice representing the digitizer associated with the current StylusDevice.
Public propertyTargetGets the element that receives input. (Overrides InputDevice.Target.)
Top

  NameDescription
Public methodCapture(IInputElement)Binds input from the stylus to the specified element.
Public methodCapture(IInputElement, CaptureMode)Binds the stylus to the specified element.
Public methodCheckAccessDetermines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetPositionGets the position of the stylus.
Public methodGetStylusPoints(IInputElement)Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus.
Public methodGetStylusPoints(IInputElement, StylusPointDescription)Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus. Uses the specified StylusPointDescription.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSynchronizeSynchronizes the cursor and the user interface.
Public methodToStringReturns the name of the stylus device. (Overrides Object.ToString().)
Public methodVerifyAccessEnforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top

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

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft