StylusPoint.Explicit(StylusPoint to Point) Operator

Definition

Casts the specified StylusPoint to a Point.

C#
public static explicit operator System.Windows.Point(System.Windows.Input.StylusPoint stylusPoint);

Parameters

stylusPoint
StylusPoint

The StylusPoint to cast to a Point.

Returns

A Point that contains the same (x,y) coordinates as stylusPoint.

Remarks

The following example demonstrates how to cast a StylusPoint to a Point object to draw a circle at the beginning of every stroke. This example assumes that there is an InkCanvas object called inkcanvas1 and that the StylusDown event is connected to the event handler in the example.

       :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet13":::
       :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PacketSpy/VisualBasic/Window1.xaml.vb" id="Snippet13":::

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10