Compartir a través de


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 void RemoveStrokes (
    Strokes strokesToRemove
)
public function RemoveStrokes (
    strokesToRemove : Strokes
)
Not applicable.

Parameters

  • strokesToRemove
    The strokes collection to remove.

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 a null reference (Nothing in Visual Basic).

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class
InkAnalyzer Members
Microsoft.Ink Namespace
Microsoft.Ink.InkAnalyzer.AddStroke
Microsoft.Ink.InkAnalyzer.AddStrokes
InkAnalyzer.RemoveStroke
InkAnalyzer.DirtyRegion