Share via


DrawingAttributes Constructor (Color)

Initializes a new instance of the DrawingAttributes class using the specified Color object.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub New ( _
    color As Color _
)
'Usage
Dim color As Color 

Dim instance As New DrawingAttributes(color)
public DrawingAttributes(
    Color color
)
public:
DrawingAttributes(
    Color color
)
public function DrawingAttributes(
    color : Color
)

Parameters

Remarks

When modifying drawing attributes for a stroke, try to reuse an existing DrawingAttributes object rather than creating a new one each time. Creating a new DrawingAttributes object allocates memory that remains with the Ink object past the lifetime of the DrawingAttributes object.

Examples

This C# example initializes a new instance of the DrawingAttributes class, theDrawingAttributes, with a specific color.

DrawingAttributes theDrawingAttributes = new DrawingAttributes(Color.Red);

This Microsoft Visual Basic .NET example initializes a new instance of the DrawingAttributes class, theDrawingAttributes, with a specific color.

Dim theDrawingAttributes As New DrawingAttributes(Color.Red)

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

DrawingAttributes Class

DrawingAttributes Members

DrawingAttributes Overload

Microsoft.Ink Namespace

DrawingAttributes