Click or drag to resize
CanvasStrokeStyle Class
Defines a stroke style for drawing lines. Dashes, dots, how to join segments, how to cap the ends, etc.
Inheritance Hierarchy

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version:
public sealed class CanvasStrokeStyle : IDisposable

The CanvasStrokeStyle type exposes the following members.

Public methodCanvasStrokeStyle
Initializes a new instance of the CanvasStrokeStyle class.
Public propertyCustomDashStyle
Gets or sets an array describing a custom dash pattern. This overrides the DashStyle property, which is only used when CustomDashStyle is set to null.
Public propertyDashCap
Gets or sets how the ends of each dash are drawn. Defaults to Square. If this is set to Flat, dots will have zero size so only dashes are visible.
Public propertyDashOffset
Gets or sets how far into the dash sequence the stroke will start.
Public propertyDashStyle
Gets or sets the stroke's dash pattern. This is ignored if CustomDashStyle has been set.
Public propertyEndCap
Gets or sets the type of shape used at the end of a stroke. Defaults to Flat.
Public propertyLineJoin
Gets or sets the type of joint used at the vertices of a shape's outline.
Public propertyMiterLimit
Gets or sets the limit on the ratio of the miter length to half the stroke's thickness.
Public propertyStartCap
Gets or sets the type of shape used at the beginning of a stroke. Defaults to Flat.
Public propertyTransformBehavior
Gets or sets how the world transform, dots per inch (DPI), and stroke width affect the shape of the pen.
Public methodDispose
Releases all resources used by the CanvasStrokeStyle.

When using Direct2D interop, this Win2D class corresponds to the Direct2D interface ID2D1StrokeStyle1.

See Also