Stroke.DrawingAttributes Property

 

Gets or sets the DrawingAttributes for the Stroke object.

Namespace:   System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

public DrawingAttributes DrawingAttributes { get; set; }

Exception Condition
ArgumentNullException

The set value is null.

These attributes, such as color and width, are applied to the Stroke object as it is drawn.

Changing DrawingAttributes causes the DrawingAttributesChanged event to fire.

The following example sets the DrawingAttributes to make a stroke green.

// Make the new stroke green.
myNewStroke.DrawingAttributes.Color = Colors.Green;

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: