InkOverlay.DefaultDrawingAttributes Property
Gets or sets the default DrawingAttributes object, which specifies the drawing attributes that are used when drawing and displaying ink.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property DefaultDrawingAttributes As DrawingAttributes
'Usage
Dim instance As InkOverlay
Dim value As DrawingAttributes
value = instance.DefaultDrawingAttributes
instance.DefaultDrawingAttributes = value
[BrowsableAttribute(false)]
public DrawingAttributes DefaultDrawingAttributes { get; set; }
[BrowsableAttribute(false)]
public:
property DrawingAttributes^ DefaultDrawingAttributes {
DrawingAttributes^ get ();
void set (DrawingAttributes^ value);
}
public function get DefaultDrawingAttributes () : DrawingAttributes
public function set DefaultDrawingAttributes (value : DrawingAttributes)
Property Value
Type: Microsoft.Ink.DrawingAttributes
The default DrawingAttributes object, which specifies the drawing attributes that are used when drawing and displaying ink.
Remarks
The DrawingAttributes drawing attributes specified with this property are the attributes that are assigned to a new cursor.
The default drawing attributes are as follows:
DrawingAttributes Property |
Description |
---|---|
true |
|
false |
|
1 (in ink space units) |
|
false |
|
Ball |
|
CopyPen |
|
0 (totally opaque) |
|
53 (in ink space units) |
To set different attributes on a new cursor, use the DrawingAttributes property of the Cursor object.
To change the drawing attributes of a single stroke, use the DrawingAttributes property of the Stroke object. To change the drawing attributes of a collection of strokes, call the ModifyDrawingAttributes method of the Strokes collection.
Note
The DefaultDrawingAttributes property contains the drawing attributes that all cursors use unless they set their own DrawingAttributes property. For example, a new Cursor object uses DefaultDrawingAttributes, and an old Cursor object on which the DefaultDrawingAttributes is set to nulla null reference (Nothing in Visual Basic) also uses DefaultDrawingAttributes.
Examples
This C# example sets some of the default drawing attributes of an InkOverlay.
using Microsoft.Ink;
//. . .
InkOverlay theInkOverlay = new InkOverlay();
// Set the initial Width attribute to thin
theInkOverlay.DefaultDrawingAttributes.Width = 30;
// Set the initial Color attribute to Black
theInkOverlay.DefaultDrawingAttributes.Color = Color.Black;
// Set the initial RasterOperation attribute to CopyPen
theInkOverlay.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen;
// Set the initial Transparency attribute to opaque (0)
theInkOverlay.DefaultDrawingAttributes.Transparency = 0;
// Set the initial AntiAliased attribute to true
theInkOverlay.DefaultDrawingAttributes.AntiAliased = true;
This Microsoft Visual Basic .NET example sets some of the default drawing attributes of an InkOverlay.
Imports Microsoft.Ink
'. . .
Dim theInkOverlay As New InkOverlay()
'Set the initial Width attribute to thin
theInkOverlay.DefaultDrawingAttributes.Width = 30
'Set the initial Color attribute to Black
theInkOverlay.DefaultDrawingAttributes.Color = Color.Black
'Set the initial RasterOperation attribute to CopyPen
theInkOverlay.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen
'Set the initial Transparency attribute to opaque (0)
theInkOverlay.DefaultDrawingAttributes.Transparency = 0
'Set the initial AntiAliased attribute to true
theInkOverlay.DefaultDrawingAttributes.AntiAliased = True
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