Export (0) Print
Expand All
Run
Expand Minimize

StylusPoint

Silverlight

Represents a single point collected while the user is making ink strokes with the stylus or mouse.

<StylusPoint   .../>

Multiple StylusPoint objects typically make up a Stroke object.

The following example sends the x-coordinate, y-coordinate, and pressure data of each StylusPoint to a text TextBlock object as they are added to a stroke.

// Add the new points to the Stroke 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:
© 2014 Microsoft