This documentation is archived and is not being maintained.

DynamicRenderer Class

Draws ink on a surface as the user moves the tablet pen.


Namespace:  System.Windows.Input.StylusPlugIns
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: Not mapped to an xmlns.

public ref class DynamicRenderer : public StylusPlugIn
This class is not typically used in XAML.

The DynamicRenderer type exposes the following members.

Public methodDynamicRendererInitializes a new instance of the DynamicRenderer class.

Public propertyDrawingAttributesGets or sets the DrawingAttributes that specifies the appearance of the rendered ink.
Public propertyElementGets the UIElement to which the StylusPlugIn is attached. (Inherited from StylusPlugIn.)
Public propertyElementBoundsGets the cached bounds of the element. (Inherited from StylusPlugIn.)
Public propertyEnabledGets or sets whether the StylusPlugIn is active. (Inherited from StylusPlugIn.)
Public propertyIsActiveForInputGets whether the StylusPlugIn is able to accept input. (Inherited from StylusPlugIn.)
Public propertyRootVisualGets the root visual for the DynamicRenderer.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetDispatcherReturns a Dispatcher for the rendering thread.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnAddedOccurs when the DynamicRenderer is added to an element. (Overrides StylusPlugIn::OnAdded().)
Protected methodOnDrawDraws the ink in real-time so it appears to "flow" from the tablet pen or other pointing device.
Protected methodOnDrawingAttributesReplacedOccurs when the DrawingAttributes property changes.
Protected methodOnEnabledChangedOccurs when the Enabled property changes. (Overrides StylusPlugIn::OnEnabledChanged().)
Protected methodOnIsActiveForInputChangedOccurs when the IsActiveForInput() property changes. (Overrides StylusPlugIn::OnIsActiveForInputChanged().)
Protected methodOnRemovedOccurs when the StylusPlugIn is removed from an element. (Overrides StylusPlugIn::OnRemoved().)
Protected methodOnStylusDownOccurs on a thread in the pen thread pool when the tablet pen touches the digitizer. (Overrides StylusPlugIn::OnStylusDown(RawStylusInput).)
Protected methodOnStylusDownProcessedOccurs on the application UI (user interface) thread when the tablet pen touches the digitizer. (Overrides StylusPlugIn::OnStylusDownProcessed(Object, Boolean).)
Protected methodOnStylusEnterOccurs on a pen thread when the cursor enters the bounds of an element. (Overrides StylusPlugIn::OnStylusEnter(RawStylusInput, Boolean).)
Protected methodOnStylusLeaveOccurs on a pen thread when the cursor leaves the bounds of an element. (Overrides StylusPlugIn::OnStylusLeave(RawStylusInput, Boolean).)
Protected methodOnStylusMoveOccurs on a pen thread when the tablet pen moves on the digitizer. (Overrides StylusPlugIn::OnStylusMove(RawStylusInput).)
Protected methodOnStylusMoveProcessedOccurs on the application UI (user interface) thread when the tablet pen moves on the digitizer. (Inherited from StylusPlugIn.)
Protected methodOnStylusUpOccurs on a pen thread when the user lifts the tablet pen from the digitizer. (Overrides StylusPlugIn::OnStylusUp(RawStylusInput).)
Protected methodOnStylusUpProcessedOccurs on the application UI (user interface) thread when the user lifts the tablet pen from the digitizer. (Overrides StylusPlugIn::OnStylusUpProcessed(Object, Boolean).)
Public methodResetClears rendering on the current stroke and redraws it.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The DynamicRenderer 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 DynamicRenderer to dynamically render ink on a custom control, or inherit from DynamicRenderer 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 System.Windows.Input.StylusPlugins CLR namespace to a prefix, and use that prefix to qualify the DynamicRenderer element. For details, see XAML Namespaces and Namespace Mapping for WPF XAML.

The following example demonstrates how to attach a DynamicRenderer to an InkPresenter. To create a control that dynamically renders ink, see Creating an Ink Input Control.

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

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

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