Stylus Class

Stylus Class

Provides access to general information about a tablet pen.

Namespace:  Microsoft.StylusInput
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

public sealed class Stylus

This object represents the physical pen that the user holds. A stylus may have multiple tips (such as normal and eraser ends), with each stylus tip corresponding to a different Stylus object. Some Tablet PCs allow multiple styluses. Each Stylus object has an associated globally unique identifier (GUID) that is unique on a system. For more information about how styluses can be used with a Tablet PC, see Pen Input, Ink, and Recognition, Command Input on the Tablet PC, and Using Gestures.

Stylus objects exist within the scope of a RealTimeStylus object. When a RealTimeStylus object encounters a new Stylus object, the RealTimeStylus object calls the IStylusSyncPlugin.StylusInRange method of each of its synchronous plug-ins, and finally the IStylusAsyncPlugin.StylusInRange method of its asynchronous plug-ins. The RealTimeStylus object maintains a list of the Stylus objects it has encountered. You can access this list by calling the RealTimeStylus object's GetStyluses method.


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.0

Community Additions

© 2016 Microsoft