다음을 통해 공유


InkEdit.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 InkEdit
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. This property cannot be set to a null reference (Nothing in Visual Basic) (Nothing in Microsoft® Visual Basic® .NET).

Remarks

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

The DrawingAttributes property specifies the drawing attributes for ink as it is drawn and before recognition occurs. In this way the InkEdit.DrawingAttributes property is different from the Stroke.DrawingAttributes property, which specifies the attributes for ink that was previously collected. The InkEdit.DrawingAttributes property is more analogous to the InkPicture.DefaultDrawingAttributes property; however, with InkEdit.DrawingAttributes the FitToCurve property is set to true by default.

Example

This C# example returns the drawing attributes of the first cursor in the Cursors collection of an InkCollector object.

using Microsoft.Ink;
//. . .
Microsoft.Ink.DrawingAttributes theDrawingAttributes;
Microsoft.Ink.Cursor theCursor = theInkCollector.Cursors[0];
theDrawingAttributes = theCursor.DrawingAttributes;

This Visual Basic .NET example returns the drawing attributes of the first cursor in the Cursors collection of an InkCollector object.

Imports Microsoft.Ink
'. . .Dim theDrawingAttributes As DrawingAttributes
Dim theCursor as Cursor = theInkCollector.Cursors(0)
theDrawingAttributes = theCursor.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

InkEdit Class
InkEdit Members
Microsoft.Ink Namespace
DrawingAttributes
InkCollector.DefaultDrawingAttributes