StylusPoint.Y Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the value for the y-coordinate of the StylusPoint.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<StylusPoint Y="double"/>
Property Value
Type: System.DoubleThe y-coordinate of the StylusPoint in a logical pixel grid. The default is 0.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | Y is set a value that evaluates to infinity or a value that is not a number. |
The following code example demonstrates how to get the member Y property. This is part of a larger example available in StylusPoint class overview.
//StylusPoint objects are collected from the MouseEventArgs and added to MyStroke private void MyIP_MouseMove(object sender, MouseEventArgs e) { if (MyStroke != null) { MyStroke.StylusPoints.Add(e.StylusDevice.GetStylusPoints(MyIP)); XTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].X; YTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].Y; PressureTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].PressureFactor; } }
Show: