從筆墨分析器移除筆劃集合。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Sub RemoveStrokes ( _
strokesToRemove As Strokes _
)
'用途
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
)
參數
- strokesToRemove
型別:Microsoft.Ink.Strokes
要移除的筆劃集合。
備註
這個方法會從 InkAnalyzer 移除 strokesToRemove。
這個方法會從參考筆劃的分葉內容節點移除 strokesToRemove 中的每個筆劃。如果內容節點不再參考任何筆劃,這個方法會刪除內容節點以及不再有任何子節點的任何祖系節點。
這個方法從內容節點移除筆劃之後,會更新 DirtyRegion 以包括所移除筆劃的週框方塊。
這個方法會忽略任何與筆墨分析器沒有關聯的筆劃。如果 strokesToRemove 中的筆劃都與筆墨分析器沒有關聯,這個方法仍會傳回,但是不會更新筆墨分析器。
當 strokesToRemove 為 nullNull 參照 (即 Visual Basic 中的 Nothing) 時,這個方法會擲回 System.ArgumentNullException。
範例
這個範例會移除筆墨分析器中所有與 InkAnalyzer (theInkAnalyzer) 相關聯的筆劃,同時也會從與 theInkAnalyzer 相關聯的 Microsoft.Ink.Ink 物件移除這些筆劃。
' 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);
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0