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 相对应的点。

示例

以下示例演示如何擦除套索包围的笔划。 该示例假定有一个名为 InkPresenterpresenter

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

适用于