Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

InkDrawingAttributes.Color | color property

Applies to Windows only

Gets or sets a value that indicates the color of an InkStroke.

Syntax


public Color Color { get; set; }

Property value

Type: Color

The ink color. Default value is black.

Examples

The following example demonstrates how to set the Color property (color) of an InkStroke (stroke) using the Windows.UI.ColorHelper.FromArgb method.



var drawingAttributes = stroke.drawingAttributes;
drawingAttributes.color = 
     Windows.UI.ColorHelper.fromArgb(255, 255, 0, 0);
stroke.drawingAttributes = drawingAttributes;


The following alternative demonstrates how to set the Color property (color) of an InkStroke (stroke) without using the Windows.UI.ColorHelper.FromArgb method.


var drawingAttributes = stroke.drawingAttributes;
var color = drawingAttributes.color;
color.a = 255;
color.r = 255;
color.g = 0;
color.b = 0;
drawingAttributes.color = color;
stroke.drawingAttributes = drawingAttributes;


For the complete example, see Ink App sample.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.UI.Input.Inking
Windows::UI::Input::Inking [C++]

Metadata

Windows.winmd

See also

InkDrawingAttributes
Responding to pen and stylus input
Ink App sample

 

 

Show:
© 2014 Microsoft