清除 InkAnalyzer 中指定之 Stroke 的快取資料。
命名空間: System.Windows.Ink
組件: IAWinFX (在 IAWinFX.dll 中)
語法
'宣告
Public Sub ClearStrokeData ( _
strokeToClear As Stroke _
)
'用途
Dim instance As InkAnalyzer
Dim strokeToClear As Stroke
instance.ClearStrokeData(strokeToClear)
public void ClearStrokeData(
Stroke strokeToClear
)
public:
void ClearStrokeData(
Stroke^ strokeToClear
)
public void ClearStrokeData(
Stroke strokeToClear
)
public function ClearStrokeData(
strokeToClear : Stroke
)
參數
- strokeToClear
型別:System.Windows.Ink.Stroke
要清除的快取筆劃。
備註
InkAnalyzer 會維護與 InkAnalyzer 相關聯之所有筆劃的快取。筆劃資料的變更不會在快取中自動反映。如果筆劃資訊變更 (例如,您移動筆劃),請呼叫這個方法清除舊的筆劃資料。
範例
這個範例會更新名為 theInkAnalyzer 之 InkAnalyzer 的已變更區域,並且清除分析器的快取,同時準備移動名為 selectedStrokes 的 StrokeCollection。
' 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);
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
InkAnalyzerBaseUpdateStrokeData(Int32, array<Int32[], array<Guid[])