StrokeCollection.Remove(StrokeCollection) メソッド

定義

指定したストロークをコレクションから削除します。

public:
 void Remove(System::Windows::Ink::StrokeCollection ^ strokes);
public void Remove (System.Windows.Ink.StrokeCollection strokes);
override this.Remove : System.Windows.Ink.StrokeCollection -> unit
Public Sub Remove (strokes As StrokeCollection)

パラメーター

strokes
StrokeCollection

コレクションから削除する StrokeCollection

次の例では、指定したなげなわ内の少なくとも 80% のストロークをすべて から削除する方法を StrokeCollection示します。 これは、ユーザーがなげなわを使用してインクを選択できるカスタム コントロールの場合に便利です。 ユーザーがなげなわのあるインクを選択できるようにするコントロールを作成するには、「 方法: カスタム コントロールからインクを選択する」を参照してください。

// Remove the strokes within the lasso from the InkPresenter
public void RemoveStrokes(Point[] lasso)
{
    StrokeCollection strokes = presenter.Strokes.HitTest(lasso, 80);

    presenter.Strokes.Remove(strokes);
}
' Remove the strokes within the lasso from the InkPresenter
Public Sub RemoveStrokes(ByVal lasso As Point())

    If lasso Is Nothing Then
        Return
    End If

    Dim strokes As StrokeCollection = _
        presenter.Strokes.HitTest(lasso, 80)

    presenter.Strokes.Remove(strokes)

End Sub

注釈

メソッドは Remove 、削除する StrokesChanged ごとに Stroke イベントを発生させます。

適用対象