Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 class DynamicRenderer : StylusPlugIn
This class is not typically used in XAML.

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.

NoteNote:

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.

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.

// 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);

System.Object
  System.Windows.Input.StylusPlugIns.StylusPlugIn
    System.Windows.Input.StylusPlugIns.DynamicRenderer

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.5, 3.0

Community Additions

ADD
Show:
© 2015 Microsoft