Επεξεργασία

Κοινή χρήση μέσω


StrokeCollection.Remove(StrokeCollection) Method

Definition

Removes the specified strokes from the collection.

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)

Parameters

strokes
StrokeCollection

The StrokeCollection to remove from the collection.

Examples

The following example demonstrates how to remove all strokes that are at least 80 percent within the specified lasso from a StrokeCollection. This is useful when a custom control enables the user to select ink with a lasso. To create a control that enables a user to select ink with a lasso, see How to: Select Ink from a Custom Control.

// 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

Remarks

The Remove method raises the StrokesChanged event for each Stroke it removes.

Applies to