StylusPointCollection.Explicit(StylusPointCollection to Point[]) Operator
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Converteert een StylusPointCollection naar een puntmatrix.
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()
Parameters
- stylusPoints
- StylusPointCollection
De styluspuntverzameling die moet worden geconverteerd naar een puntmatrix.
Retouren
Een puntmatrix die punten bevat die overeenkomen met elk StylusPoint punt in de StylusPointCollection.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de pennenstreken kunt wissen die zijn omgeven door een lasso. In het voorbeeld wordt ervan uitgegaan dat er een InkPresenter aangeroepen presenternaam is.
// 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