This documentation is archived and is not being maintained.

InkAnalyzer.RemoveStroke Method

Removes a Stroke from the ink analyzer.

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

public void RemoveStroke(
	Stroke strokeToRemove
)

Parameters

strokeToRemove
Type: Microsoft.Ink.Stroke

The stroke to remove.

This method removes strokeToRemove from the InkAnalyzer.

This method removes strokeToRemove 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 stroke from the context node, it updates the DirtyRegion to include the bounding box of the removed stroke.

If the stroke is not associated with the ink analyzer, this method returns without updating the ink analyzer.

This method throws a System.ArgumentNullException when strokeToRemove is null.

This example determines if a Stroke, theStroke, has a bounding box with a left bound lower than the 32-bit signed integer, leftBound. If so, it removes theStroke from the InkAnalyzer, theInkAnalyzer.

// Remove the stroke if its bounding box falls outside of the left bound. 
if (theStroke != null && theStroke.GetBoundingBox().Left < leftBound)
{
    this.theInkAnalyzer.RemoveStroke(theStroke);
}

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.

.NET Framework

Supported in: 3.0
Show: