Width Property
Collapse the table of content
Expand the table of content

DrawingAttributes.Width Property

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

Gets or sets the width of the stylus that is used to draw a Stroke.

Namespace:  System.Windows.Ink
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public double Width { get; set; }
<DrawingAttributes Width="double"/>

Property Value

Type: System.Double
The width of the stylus that is used to draw a Stroke. The default is 2 logical pixels.

If you try to set the Width property to 0 logical pixels, it is changed to 2 logical pixels.

The following code example demonstrates how to set the Width property. This is part of a larger example available in 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

© 2017 Microsoft