Color Property
Collapse the table of content
Expand the table of content

DrawingAttributes.Color Property

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

Gets or sets the color 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.

'Declaration
Public Property Color As Color
<DrawingAttributes Color="colorString"/>

XAML Values

colorString

A Color expressed as an attribute string. This can be a named color, an RGB value, or an ScRGB value. RGB or ScRGB may also specify alpha information. See Color.

Property Value

Type: System.Windows.Media.Color
The color that is used to draw a Stroke. The default is Black.

For information about the colors that you can use, see Color.

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



Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft