StylusPointCollection.Explicit(StylusPointCollection to Point[]) Opérateur

Définition

Convertit StylusPointCollection en un tableau de points.

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()

Paramètres

stylusPoints
StylusPointCollection

Collection de points du stylet à convertir en tableau de points.

Retours

Point[]

Tableau de points qui contient les points correspondant à chaque objet StylusPoint dans StylusPointCollection.

Exemples

L’exemple suivant montre comment effacer les traits qui sont entourés d’un lasso. L’exemple suppose qu’il existe un InkPresenter appelé 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

S’applique à