Rediger

Del via


StylusPoint.Explicit(StylusPoint to Point) Operator

Definition

Casts the specified StylusPoint to a Point.

public:
 static explicit operator System::Windows::Point(System::Windows::Input::StylusPoint stylusPoint);
public static explicit operator System.Windows.Point (System.Windows.Input.StylusPoint stylusPoint);
static member op_Explicit : System.Windows.Input.StylusPoint -> System.Windows.Point
Public Shared Narrowing Operator CType (stylusPoint As StylusPoint) As Point

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