Sdílet prostřednictvím


InkAnalyzer.ClearStrokeData Method

Clears the cached data from the InkAnalyzer for the specified Stroke.

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

Syntax

'Declaration
Public Sub ClearStrokeData ( _
    strokeToClear As Stroke _
)
'Usage
Dim instance As InkAnalyzer 
Dim strokeToClear As Stroke

instance.ClearStrokeData(strokeToClear)
public void ClearStrokeData(
    Stroke strokeToClear
)
public:
void ClearStrokeData(
    Stroke^ strokeToClear
)
public function ClearStrokeData(
    strokeToClear : Stroke
)

Parameters

Remarks

The InkAnalyzer maintains a cache for all strokes associated with the InkAnalyzer. Changes to stroke data are not automatically reflected in the cache. If stroke information changes (for example, if you move a stroke), call this method to clear old stroke data.

Examples

This example updates the dirty region of the InkAnalyzer, named theInkAnalyzer, and clears the analyzer's cache while preparing to move the StrokeCollection, named selectedStrokes.

' Update the analyzer's dirty region to include the original 
' bounding box of the strokes that are moving. 
Me.theInkAnalyzer.DirtyRegion.Union(selectedStrokes.GetBounds())

' Clear the analyzer's cache for each stroke that is moving. 
Dim theStroke As Stroke
For Each theStroke In selectedStrokes
    Me.theInkAnalyzer.ClearStrokeData(theStroke)
Next theStroke
// Update the analyzer's dirty region to include the original 
// bounding box of the strokes that are moving. 
this.theInkAnalyzer.DirtyRegion.Union(selectedStrokes.GetBounds());

// Clear the analyzer's cache for each stroke that is moving. 
foreach (Stroke theStroke in selectedStrokes)
{
    this.theInkAnalyzer.ClearStrokeData(theStroke);
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

System.Windows.Ink Namespace

InkAnalyzerBaseUpdateStrokeData(Int32, Int32, Guid)