StylusPlugInCollection Class
Represent a collection of StylusPlugIn objects.
Assembly: PresentationCore (in PresentationCore.dll)
Each UIElement has a StylusPlugIns property that is a StylusPlugInCollection. Add a StylusPlugIn to the element's StylusPlugIns property to manipulate ink on the real-time thread. The order of the StylusPlugIn objects in the StylusPlugInCollection affects the appearance of the ink when it is rendered. Suppose you have a DynamicRenderer called dynamicRenderer and a custom StylusPlugIn called translatePlugin that offsets the ink from the tablet pen. If translatePlugin is the first StylusPlugIn in the StylusPlugInCollection, and dynamicRenderer is the second, the ink that "flows" will be offset as the user moves the pen. If dynamicRenderer is first, and translatePlugin is second, the ink will seem to "flow" underneath the pen, and when the user lifts the pen, the ink will move.
The following example demonstrates how to add a DynamicRenderer to a custom control. To create a control that collects ink, see Creating an Ink Input Control.
' Create a DrawingAttributes to use for the ' DynamicRenderer. Dim inkDA As 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 Dim dynamicRenderer1 As New DynamicRenderer() dynamicRenderer1.DrawingAttributes = inkDA Me.StylusPlugIns.Add(dynamicRenderer1) inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual, dynamicRenderer1.DrawingAttributes)
System.Collections.ObjectModel.Collection(Of StylusPlugIn)
System.Windows.Input.StylusPlugIns.StylusPlugInCollection
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.