Y (StylusPoint)


Gets or sets the y-coordinate of a StylusPoint in pixels.

<object Y="Double"  .../>
value = object.Y
object.Y = value

Type: Double

The y-coordinate of the StylusPoint in pixels.

This property is read/write. The default value is 0.

Specifying a StylusPoint in initial XAML is possible, but uncommon.

In the following example, the x-coordinate and y-coordinate of each StylusPoint are sent to a text TextBlock as they are added to a stroke.

// Add the new points to the Stroke we're working with, and display the StylusPoint coordinates.
function InkPresenterMouseMove(sender,args)
   if (newStroke != null)
      xCoord.Text = "" + args.GetStylusPoints(inkPresenter).GetItem(0).X;
      yCoord.Text = "" + args.GetStylusPoints(inkPresenter).GetItem(0).Y;
      pressureData.Text = "" + args.GetStylusPoints(inkPresenter).GetItem(0).PressureFactor;

Community Additions