StylusPointCollection.Explicit(StylusPointCollection to Point[]) 運算子
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 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