Share via


InkAnalyzer.RemoveStrokes Method

Removes a strokes collection from the ink analyzer.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Sub RemoveStrokes ( _
    strokesToRemove As Strokes _
)
'Usage
Dim instance As InkAnalyzer 
Dim strokesToRemove As Strokes

instance.RemoveStrokes(strokesToRemove)
public void RemoveStrokes(
    Strokes strokesToRemove
)
public:
void RemoveStrokes(
    Strokes^ strokesToRemove
)
public function RemoveStrokes(
    strokesToRemove : Strokes
)

Parameters

Remarks

This method removes strokesToRemove from the InkAnalyzer.

This method removes each stroke in strokesToRemove from the leaf context node that references the stroke. If the context node no longer references any strokes, this method deletes the context node and any ancestor nodes that no longer have any child nodes.

After this method removes the strokes from the context node, it updates the DirtyRegion to include the bounding box of the removed strokes.

This method ignores any strokes that are not associated with the ink analyzer. If none of the strokes in strokesToRemove are associated with the ink analyzer, this method returns without updating the ink analyzer.

This method throws a System.ArgumentNullException when strokesToRemove is nulla null reference (Nothing in Visual Basic).

Examples

This example removes all the strokes associated with the InkAnalyzer, theInkAnalyzer, from the ink analyzer and also removes them from the Microsoft.Ink.Ink object associated with theInkAnalyzer.

' Get all the strokes associated with the ink analyzer. 
Dim theStrokes As Microsoft.Ink.Strokes = Me.theInkAnalyzer.RootNode.Strokes

If Nothing IsNot theStrokes Then 
    ' Remove the strokes from the analyzer. 
    Me.theInkAnalyzer.RemoveStrokes(theStrokes)

    ' Deleted the strokes from the associated Ink object. 
    Me.theInkAnalyzer.Ink.DeleteStrokes(theStrokes)
End If
// Get all the strokes associated with the ink analyzer.
Microsoft.Ink.Strokes theStrokes = this.theInkAnalyzer.RootNode.Strokes;

if (null != theStrokes)
{
    // Remove the strokes from the analyzer. 
    this.theInkAnalyzer.RemoveStrokes(theStrokes);

    // Deleted the strokes from the associated Ink object. 
    this.theInkAnalyzer.Ink.DeleteStrokes(theStrokes);
}

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

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

Microsoft.Ink Namespace

InkAnalyzer.AddStroke

InkAnalyzer.AddStrokes

InkAnalyzer.RemoveStroke

InkAnalyzer.DirtyRegion