Share via


Strokes.Clear Method

Strokes.Clear Method

Clears all the Stroke objects from the Strokes collection.

Definition

Visual Basic .NET Public Sub Clear()
C# public void Clear();
Managed C++ public: void Clear();

Exceptions

ObjectDisposedException Leave Site: The Stroke object is disposed.

Remarks

This method does not delete the Strokes collection from its containing Ink object. To permanently delete strokes, use the Ink.DeleteStroke or Ink.DeleteStrokes method.

Examples

[C#]

This C# example removes all the Stroke objects contained in the first Strokes collection in a CustomStrokes collection. The CustomStrokes collection belongs to the Ink object associated with an InkOverlay, theInkOverlay.

theInkOverlay.Ink.CustomStrokes[0].Clear();
                

[VB.NET]

This Microsoft® Visual Basic® .NET example removes all the Stroke objects contained in the first Strokes collection in a CustomStrokes collection. The CustomStrokes collection belongs to the Ink object associated with an InkOverlay, theInkOverlay.

theInkOverlay.Ink.CustomStrokes(0).Clear()
                

See Also