StylusPointCollection.Explicit(StylusPointCollection to Point[]) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a StylusPointCollection into a point array.
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
The stylus point collection to convert to a point array.
Returns
Point[]
A point array that contains points that correspond to each StylusPoint in the StylusPointCollection.
Examples
The following example demonstrates how to erase the strokes that are surrounded by a lasso. The example assumes that there is an InkPresenter called 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
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.