Skip to content

ShapeExtensions.Stroke<T> method (1 of 2)

Sets the stroke brush and thickness.

public static T Stroke<T>(this T shape, Brush brush, double thickness = 1m)
where T : Shape
parameter description
T Shape type.
shape Target shape.
brush Stroke brush.
thickness Stroke thickness.

The shape for chaining.

Sets: Shape.Stroke, Shape.StrokeThickness


Sets the stroke to a solid color with the given thickness.

public static T Stroke<T>(this T shape, Color color, double thickness = 1m)
where T : Shape
parameter description
T Shape type.
shape Target shape.
color Stroke color.
thickness Stroke thickness.

The shape for chaining.