StylusPointCollection Class
Contains a collection of StylusPoint objects.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
A Stroke has a StylusPointCollection that contains StylusPoint objects collected from a stylus and digitizer. You can use the StylusPointCollection to customize the Stroke.
The following example overrides the Stroke.DrawCore method to draw a circle at each StylusPoint comprising a Stroke. If the FitToCurve property is set to true, the GetBezierStylusPoints method returns the stylus points. Otherwise, the StylusPoints property returns the stylus points.
Protected Overrides Sub DrawCore(ByVal context As DrawingContext, _ ByVal overridedAttributes As DrawingAttributes) ' Draw the stroke. Calling base.DrawCore accomplishes the same thing. Dim geometry As Geometry = GetGeometry(overridedAttributes) context.DrawGeometry(New SolidColorBrush(overridedAttributes.Color), Nothing, geometry) Dim points As StylusPointCollection ' Get the stylus points used to draw the stroke. The points used depends on ' the value of FitToCurve. If Me.DrawingAttributes.FitToCurve Then points = Me.GetBezierStylusPoints() Else points = Me.StylusPoints End If ' Draw a circle at each stylus point. Dim p As StylusPoint For Each p In points context.DrawEllipse(Nothing, New Pen(Brushes.Black, 1), CType(p, Point), 5, 5) Next p End Sub 'DrawCore
System.Collections.ObjectModel.Collection(Of StylusPoint)
System.Windows.Input.StylusPointCollection
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.