StylusPoint

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

<StylusPoint   .../>

Managed Equivalent

StylusPoint

Remarks

Multiple StylusPoint objects typically make up a Stroke object.

Example

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;
   }
}

See Also

Reference