Export (0) Print
Expand All

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 DrawingAttributes DrawingAttributes { get; set; }
<Stroke>
  <Stroke.DrawingAttributes>
    singleDrawingAttribute
  </Stroke.DrawingAttributes>
</Stroke>

XAML Values

singleDrawingAttribute

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;
}


Silverlight

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

ADD
Show:
© 2015 Microsoft