Rediger

Del via


StylusPointCollection.Explicit(StylusPointCollection to Point[]) Operator

Definition

Converts a StylusPointCollection into a point array.

public:
 static explicit operator cli::array <System::Windows::Point> ^(System::Windows::Input::StylusPointCollection ^ stylusPoints);
public static explicit operator System.Windows.Point[] (System.Windows.Input.StylusPointCollection stylusPoints);
static member op_Explicit : System.Windows.Input.StylusPointCollection -> System.Windows.Point[]
Public Shared Narrowing Operator CType (stylusPoints As StylusPointCollection) As Point()

Parameters

stylusPoints
StylusPointCollection

The stylus point collection to convert to a point array.

Returns

Point[]

A point array that contains points that correspond to each StylusPoint in the StylusPointCollection.

Examples

The following example demonstrates how to erase the strokes that are surrounded by a lasso. The example assumes that there is an InkPresenter called presenter.

// Erase the selected strokes.
public void EraseStrokes(Stroke lasso)
{
    Point[] strokePoints = (Point[])lasso.StylusPoints;
    presenter.Strokes.Erase(strokePoints);
}
' Erase the selected strokes.
Public Overloads Sub EraseStrokes(ByVal lasso As Stroke)

    If lasso Is Nothing Then
        Return
    End If

    Dim strokePoints() As Point = CType(lasso.StylusPoints, Point())

    presenter.Strokes.Erase(strokePoints)

End Sub

Applies to