DrawingAttributes Property
Collapse the table of content
Expand the table of content

Stroke.DrawingAttributes Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)
XMLNS for XAML: Not mapped to an xmlns.

public DrawingAttributes DrawingAttributes { get; set; }

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 void BtHighlighter_Click(object sender, EventArgs e)
    MyDA.Width = 25;
    MyDA.Height = 5;
    MyDA.Color = Colors.Yellow;
    MyDA.OutlineColor = Colors.Yellow;

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft