Share via


Stroke.DrawingAttributes Property

Gets or sets the drawing attributes to apply to ink as it is drawn.

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

Syntax

'Declaration
Public Property DrawingAttributes As DrawingAttributes
'Usage
Dim instance As Stroke
Dim value As DrawingAttributes

value = instance.DrawingAttributes

instance.DrawingAttributes = value
public DrawingAttributes DrawingAttributes { get; set; }
public:
property DrawingAttributes^ DrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
public DrawingAttributes get_DrawingAttributes ()

/** @property */
public void set_DrawingAttributes (DrawingAttributes value)
public function get DrawingAttributes () : DrawingAttributes

public function set DrawingAttributes (value : DrawingAttributes)
Not applicable.

Property Value

The DrawingAttributes object to apply to ink as it is drawn. If this object is a null reference (Nothing in Visual Basic) (Nothing in Microsoft® Visual Basic® .NET), the Stroke uses the default drawing attributes of the ink collector object.

Remarks

The DrawingAttributes property specifies the appearance of ink. For example, you can specify the width or color of ink.

Successive calls to the DrawingAttributes property change only the drawing attributes of new strokes. They do not apply to strokes that are already collected or being collected.

Note

The DefaultDrawingAttributes property (InkCollector.DefaultDrawingAttributes, InkOverlay.DefaultDrawingAttributes, or Microsoft.Ink.InkPicture) contains the drawing attributes that all Stroke objects use unless they set their own DrawingAttributes property. For example, a new Stroke object on which DrawingAttributes is not set and an old Stroke object on which the DrawingAttributes is set to a null reference (Nothing in Visual Basic) (Nothing in Visual Basic .NET) both use DefaultDrawingAttributes property of the ink collector.

Example

This C# example gets the DrawingAttributes property of the first stroke of the InkCollector object, theInkCollector.

Microsoft.Ink.DrawingAttributes theDrawingAttributes
    = theInkCollector.Ink.Strokes[0].DrawingAttributes;

This Visual Basic .NET example gets the DrawingAttributes property of the first stroke of the InkCollector object, theInkCollector.

Dim theDrawingAttributes As Microsoft.Ink.DrawingAttributes _
    = theInkCollector.Ink.Strokes.Item(0).DrawingAttributes

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Stroke Class
Stroke Members
Microsoft.Ink Namespace
DrawingAttributes
Cursor
Cursor.DrawingAttributes
InkCollector.DefaultDrawingAttributes
InkOverlay.DefaultDrawingAttributes
InkPicture.DefaultDrawingAttributes