共用方式為


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

適用於