StylusPlugIn Class
Represents a plug-in that can be added to a control's StylusPlugIns property.
System.Windows.Input.StylusPlugIns::StylusPlugIn
System.Windows.Input.StylusPlugIns::DynamicRenderer
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: Not mapped to an xmlns.
The StylusPlugIn type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Element | Gets the UIElement to which the StylusPlugIn is attached. |
![]() | ElementBounds | Gets the cached bounds of the element. |
![]() | Enabled | Gets or sets whether the StylusPlugIn is active. |
![]() | IsActiveForInput | Gets whether the StylusPlugIn is able to accept input. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnAdded | Occurs when the StylusPlugIn is added to an element. |
![]() | OnEnabledChanged | Occurs when the Enabled property changes. |
![]() | OnIsActiveForInputChanged | Occurs when the IsActiveForInput property changes. |
![]() | OnRemoved | Occurs when the StylusPlugIn is removed from an element. |
![]() | OnStylusDown | Occurs on a thread in the pen thread pool when the tablet pen touches the digitizer. |
![]() | OnStylusDownProcessed | Occurs on the application UI (user interface) thread when the tablet pen touches the digitizer. |
![]() | OnStylusEnter | Occurs on a pen thread when the cursor enters the bounds of an element. |
![]() | OnStylusLeave | Occurs on a pen thread when the cursor leaves the bounds of an element. |
![]() | OnStylusMove | Occurs on a pen thread when the tablet pen moves on the digitizer. |
![]() | OnStylusMoveProcessed | Occurs on the application UI (user interface) thread when the tablet pen moves on the digitizer. |
![]() | OnStylusUp | Occurs on a pen thread when the user lifts the tablet pen from the digitizer. |
![]() | OnStylusUpProcessed | Occurs on the application UI (user interface) thread when the user lifts the tablet pen from the digitizer. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The StylusPlugIn allows you to manipulate StylusPoint objects on separate threads. Separate threads are used so that the ink still renders as the tablet pen inputs data even if the application is doing something else.
To intercept stylus points from the hardware, create a class that inherits from the StylusPlugIn class. The StylusPlugIn class has the following methods that you can override to manipulate StylusPoint objects on a thread in the pen thread pool.
The pen's input is routed to an element's StylusPlugIn on the pen thread. Since accurate hit-testing cannot be performed on the pen thread, some elements might occasionally receive stylus input intended for other elements. If you need to make sure the input was routed correctly before performing an operation, subscribe to and perform the operation in the OnStylusDownProcessed, OnStylusMoveProcessed, or OnStylusUpProcessed method. These methods are invoked by the main application thread after accurate hit-testing has been performed. To subscribe to these methods, call the NotifyWhenProcessed method in the method that occurs on the pen thread. For example, if you call NotifyWhenProcessed in OnStylusMove, the OnStylusMoveProcessed occurs.
Note |
|---|
If you use a StylusPlugIn inside a control, you should test the plug-in and control extensively to make sure they do not throw any unintended exceptions. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.



Note