Stroke.DrawingAttributes Property

Gets or sets the properties of the stroke, such as Height, Width, Color, or OutlineColor.

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

Public Property DrawingAttributes As DrawingAttributes

XAML Values


A single DrawingAttributes object element. Typically this object element will also define attribute values for Height, Color, and so on.

Property Value

Type: System.Windows.Ink.DrawingAttributes
The DrawingAttributes of the stroke.

DrawingAttributes is not a collection. It is a representative object that is used to set various properties of the object that is used in the stroke rendering. To set the DrawingAttributes property in XAML, you must use the property element syntax shown in the syntax and in the example.

The following code example demonstrates how to set the DrawingAttributes property. This is part of a larger example available in the DrawingAttributes class overview.

    'Set drawing attributes to simulate a highlighter
    Private Sub BtHighlighter_Click(ByVal sender As Object, ByVal e As EventArgs)
        MyDA.Width = 25
        MyDA.Height = 5
        MyDA.Color = Colors.Yellow
        MyDA.OutlineColor = Colors.Yellow
    End Sub


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions