InkAnalyzer.RemoveStroke Method

Removes a Stroke from the ink analyzer.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

'Declaration
Public Sub RemoveStroke ( _
    strokeToRemove As Stroke _
)
'Usage
Dim instance As InkAnalyzer
Dim strokeToRemove As Stroke

instance.RemoveStroke(strokeToRemove)
public void RemoveStroke (
    Stroke strokeToRemove
)
public:
void RemoveStroke (
    Stroke^ strokeToRemove
)
public void RemoveStroke (
    Stroke strokeToRemove
)
public function RemoveStroke (
    strokeToRemove : Stroke
)
Not applicable.

Parameters

  • strokeToRemove
    The stroke to remove.

Remarks

RemoveStroke 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 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 ArgumentNullException when strokeToRemove is a null reference (Nothing in Visual Basic).

Example

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 Not (theStroke Is Nothing) AndAlso theStroke.GetBounds().Left < leftBound Then
    Me.theInkAnalyzer.RemoveStroke(theStroke)
End If
// Remove the stroke if its bounding box falls outside of the left bound.
if (theStroke != null && theStroke.GetBounds().Left < leftBound)
{
    this.theInkAnalyzer.RemoveStroke(theStroke);
}

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
System.Windows.Ink Namespace
System.Windows.Ink.InkAnalyzer.AddStroke
System.Windows.Ink.InkAnalyzer.AddStrokes
System.Windows.Ink.InkAnalyzer.RemoveStrokes
InkAnalyzer.DirtyRegion