Share via


DrawingAttributes.Clone Method

DrawingAttributes.Clone Method

Returns a copy of this DrawingAttributes object.

Definition

Visual Basic .NET Public Function Clone() As DrawingAttributes
C# public DrawingAttributes Clone();
Managed C++ public: DrawingAttributes* Clone();

Return Value

Microsoft.Ink.DrawingAttributes. The new copy of the DrawingAttributes object.

Remarks

Typically, you clone a master copy of the drawing attributes, modify one or more of the attributes, and either set a DrawingAttributes property—such as Cursor.DrawingAttributes, InkEdit.DrawingAttributes, or Stroke.DrawingAttributes—or call the Strokes.ModifyDrawingAttributes method.

Examples

[C#]

This C# example creates a clone of the DrawingAttributes object associated with a Stroke object, theStroke.

DrawingAttributes theClone = theStroke.DrawingAttributes.Clone();
                

[VB.NET]

This Microsoft® Visual Basic® .NET example creates a clone of the DrawingAttributes object associated with a Stroke object, theStroke.

Dim theClone As DrawingAttributes = theStroke.DrawingAttributes.Clone()
                

See Also