StylusPointCollection.Explicit(StylusPointCollection to Point[]) Оператор

Определение

Преобразует StylusPointCollection в массив точек.

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

Параметры

stylusPoints
StylusPointCollection

Коллекция точек пера для преобразования в массив точек.

Возвращаемое значение

Point[]

Массив точек, содержащий точки, соответствующие каждому StylusPoint в StylusPointCollection.

Примеры

В следующем примере показано, как стереть штрихи, окруженные лассо. В примере предполагается, что существует объект с InkPresenter именем 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

Применяется к