Ink.DeleteStrokes Method
Deletes all of the Stroke objects in the Ink object.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub DeleteStrokes
'Usage
Dim instance As Ink
instance.DeleteStrokes()
public void DeleteStrokes()
public:
void DeleteStrokes()
public function DeleteStrokes()
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The Ink object is disposed. |
Remarks
The DeleteStrokes method can result in an error if called while the user is actively laying down ink.
Note
A Strokes collection that points to an Ink.Strokes property become invalid when Stroke objects that are contained in the original collection are deleted from the Ink object. For example, if there is a named Strokes collection, theStrokesToo, that is based on an Ink object's Strokes property, theStrokes, and you call the DeleteStrokes method on theStrokes, then theStrokesToo becomes invalid.
To delete only one Stroke object at a time, call the DeleteStroke method.
Examples
This C# example function deletes all of the Stroke objects in the Ink object and redraws the panel, thePanel, to which the InkCollector object, theInkCollector, is attached.
theInkCollector.Ink.DeleteStrokes();
thePanel.Refresh();
This Microsoft Visual Basic.NET example function deletes all of the Stroke objects in the Ink object and redraws the panel, thePanel, to which the InkCollector object, theInkCollector, is attached.
theInkCollector.Ink.DeleteStrokes()
thePanel.Refresh()
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