Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

X (StylusPoint)

Silverlight

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

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

Type: Double

The x-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)
   {
      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;
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft