Draws ink on a surface as the user moves the tablet pen.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: Not mapped to an xmlns.
Thetype exposes the following members.
|DrawingAttributes||Gets or sets the DrawingAttributes that specifies the appearance of the rendered ink.|
|Element||Gets the UIElement to which the StylusPlugIn is attached. (Inherited from StylusPlugIn.)|
|ElementBounds||Gets the cached bounds of the element. (Inherited from StylusPlugIn.)|
|Enabled||Gets or sets whether the StylusPlugIn is active. (Inherited from StylusPlugIn.)|
|IsActiveForInput||Gets whether the StylusPlugIn is able to accept input. (Inherited from StylusPlugIn.)|
|RootVisual||Gets the root visual for the .|
|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.)|
|GetDispatcher||Returns a Dispatcher for the rendering thread.|
|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 is added to an element. (Overrides StylusPlugIn.OnAdded().)|
|OnDraw||Draws the ink in real-time so it appears to "flow" from the tablet pen or other pointing device.|
|OnDrawingAttributesReplaced||Occurs when the DrawingAttributes property changes.|
|OnEnabledChanged||Occurs when the Enabled property changes. (Overrides StylusPlugIn.OnEnabledChanged().)|
|OnIsActiveForInputChanged||Occurs when the property changes. (Overrides StylusPlugIn.OnIsActiveForInputChanged().)|
|OnRemoved||Occurs when the is removed from an element. (Overrides StylusPlugIn.OnRemoved().)|
|OnStylusDown||Occurs on a thread in the pen thread pool when the tablet pen touches the digitizer. (Overrides StylusPlugIn.OnStylusDown(RawStylusInput).)|
|OnStylusDownProcessed||Occurs on the application UI (user interface) thread when the tablet pen touches the digitizer. (Overrides StylusPlugIn.OnStylusDownProcessed(Object, Boolean).)|
|OnStylusEnter||Occurs on a pen thread when the cursor enters the bounds of an element. (Overrides StylusPlugIn.OnStylusEnter(RawStylusInput, Boolean).)|
|OnStylusLeave||Occurs on a pen thread when the cursor leaves the bounds of an element. (Overrides StylusPlugIn.OnStylusLeave(RawStylusInput, Boolean).)|
|OnStylusMove||Occurs on a pen thread when the tablet pen moves on the digitizer. (Overrides StylusPlugIn.OnStylusMove(RawStylusInput).)|
|OnStylusMoveProcessed||Occurs on the application UI (user interface) thread when the tablet pen moves on the digitizer. (Inherited from StylusPlugIn.)|
|OnStylusUp||Occurs on a pen thread when the user lifts the tablet pen from the digitizer. (Overrides StylusPlugIn.OnStylusUp(RawStylusInput).)|
|OnStylusUpProcessed||Occurs on the application UI (user interface) thread when the user lifts the tablet pen from the digitizer. (Overrides StylusPlugIn.OnStylusUpProcessed(Object, Boolean).)|
|Reset||Clears rendering on the current stroke and redraws it.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The class inherits from the StylusPlugIn class, and allows ink to be rendered to a surface as the user moves the mouse pointer with a tablet pen or other pointing device. You can use the to dynamically render ink on a custom control, or inherit from to perform custom rendering in real time on an ink-enabled element, such as the InkCanvas.
Dynamic rendering is done on a thread separate from the application's user interface thread when the user inputs ink with a tablet pen. When a mouse is used, dynamic rendering is done on the UI thread.
In order to reference this class as a XAML element, you must map the CLR namespace to a prefix, and use that prefix to qualify the element. For details, see XAML Namespaces and Namespace Mapping for WPF XAML.
// Create a DrawingAttributes to use for the // DynamicRenderer. DrawingAttributes inkDA = new DrawingAttributes(); inkDA.Width = 5; inkDA.Height = 5; inkDA.Color = Colors.Purple; // Add a dynamic renderer plugin that // draws ink as it "flows" from the stylus DynamicRenderer dynamicRenderer1 = new DynamicRenderer(); dynamicRenderer1.DrawingAttributes = inkDA; this.StylusPlugIns.Add(dynamicRenderer1); inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual, dynamicRenderer1.DrawingAttributes);
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.