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 に対応するポイントを格納するポイント配列。

次の例では、なげなわで囲まれているストロークを消去する方法を示します。 この例では、 という名前presenterInkPresenter があることを前提としています。

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

適用対象