ストローク コレクションをインク アナライザから削除します。
名前空間 : 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