Stroke Class
Represents a single ink stroke.
Assembly: PresentationCore (in PresentationCore.dll)
The Stroke type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Stroke(StylusPointCollection) | Initializes a new instance of the Stroke class. |
![]() | Stroke(StylusPointCollection, DrawingAttributes) | Initializes a new instance of the Stroke class. |
| Name | Description | |
|---|---|---|
![]() | DrawingAttributes | Gets or sets the DrawingAttributes for the Stroke object. |
![]() | StylusPoints | Returns the stylus points of the Stroke. |
| Name | Description | |
|---|---|---|
![]() | AddPropertyData | Adds a custom property to the Stroke object. |
![]() | Clone | Returns a deep copy of the existing Stroke object. |
![]() | ContainsPropertyData | Returns a value that indicates whether the Stroke object contains the specified custom property. |
![]() | Draw(DrawingContext) | Renders the Stroke object based upon the specified DrawingContext. |
![]() | Draw(DrawingContext, DrawingAttributes) | Renders the Stroke object based upon the specified DrawingContext and DrawingAttributes. |
![]() | DrawCore | Renders the Stroke on the specified DrawingContext using the specified DrawingAttributes. |
![]() | 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.) |
![]() | GetBezierStylusPoints | Returns the stylus points the Stroke uses when FitToCurve is true. |
![]() | GetBounds | Retrieves the bounding box for the Stroke object. |
![]() | GetClipResult(IEnumerable<Point>) | Returns segments of the current Stroke that are within the specified bounds. |
![]() | GetClipResult(Rect) | Returns segments of the current Stroke that are within the specified rectangle. |
![]() | GetEraseResult(IEnumerable<Point>) | Returns segments of the current Stroke that are outside the specified bounds. |
![]() | GetEraseResult(Rect) | Returns segments of the current Stroke that are outside the specified rectangle. |
![]() | GetEraseResult(IEnumerable<Point>, StylusShape) | Returns the segments of the current Stroke after it is dissected by the designated path using the specified StylusShape. |
![]() | GetGeometry() | Gets the Geometry of the current Stroke. |
![]() | GetGeometry(DrawingAttributes) | Gets the Geometry of the current Stroke using the specified DrawingAttributes. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetPropertyData | Retrieves the property data for the specified GUID. |
![]() | GetPropertyDataIds | Retrieves the GUIDs of any custom properties associated with the Stroke object. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | HitTest(Point) | Returns a value that indicates whether current Stroke intersects the specified point. |
![]() | HitTest(IEnumerable<Point>, Int32) | Returns a value that indicates whether the current Stroke is within the specified bounds. |
![]() | HitTest(IEnumerable<Point>, StylusShape) | Returns whether the specified path intersects the Stroke using the specified StylusShape. |
![]() | HitTest(Point, Double) | Returns a value that indicates whether current Stroke intersects the specified area. |
![]() | HitTest(Rect, Int32) | Returns a value that indicates whether the Stroke is within the bounds of the specified rectangle. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnDrawingAttributesChanged | Allows derived classes to modify the default behavior of the DrawingAttributesChanged event. |
![]() | OnDrawingAttributesReplaced | Allows derived classes to modify the default behavior of the DrawingAttributesReplaced event. |
![]() | OnInvalidated | Raises the Invalidated event. |
![]() | OnPropertyChanged | Occurs when any Stroke property changes. |
![]() | OnPropertyDataChanged | Allows derived classes to modify the default behavior of the PropertyDataChanged event. |
![]() | OnStylusPointsChanged | Raises the StylusPointsChanged event. |
![]() | OnStylusPointsReplaced | Raises the StylusPointsReplaced event. |
![]() | RemovePropertyData | Deletes a custom property from the Stroke object. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Transform | Performs a transformation based upon the specified Matrix object. |
| Name | Description | |
|---|---|---|
![]() | DrawingAttributesChanged | Occurs when the DrawingAttributes associated with the Stroke object change. |
![]() | DrawingAttributesReplaced | Occurs when the drawing attributes of a Stroke object are replaced. |
![]() | Invalidated | Occurs when the appearance of the Stroke changes. |
![]() | PropertyDataChanged | Occurs when the custom properties on a Stroke object changes. |
![]() | StylusPointsChanged | Occurs when the StylusPoints property changes. |
![]() | StylusPointsReplaced | Occurs when the StylusPoints property is assigned a new StylusPointCollection. |
| Name | Description | |
|---|---|---|
![]() ![]() | INotifyPropertyChanged::PropertyChanged | Infrastructure. Occurs when the value of any Stroke property has changed. |
A Stroke is the data object that is collected from a pointing device, such as a tablet pen or a mouse. The Stroke can be created and manipulated programmatically, and can be represented visually on an ink-enabled element, such as the InkCanvas. A Stroke contains information about both its position and appearance. The StylusPoints property is a collection of StylusPoint objects that specifies the position of the Stroke. The DrawingAttributes property specifies a stroke's appearance.
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.





