MSDN Library

Y Property (StylusPoint)

Gets or sets the Y coordinate of the StylusPoint in pixels.

XAML
<StylusPoint Y="Double" .../>
Scripting
value = object.Y
object.Y = value

Property Value

Double

The Y coordinate of the StylusPoint in pixels.

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

Remarks

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

Examples

In this example the x and y coordinates of each StylusPoint are sent to a text TextBlock as they are added to a stroke.

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

Applies To

StylusPoint

See Also

Ink Support In Microsoft Silverlight

Community Additions

Show:
© 2016 Microsoft