Share via


StylusPoint Object

Represents a single point collected while the user is inking with the stylus or mouse.

XAML
<StylusPoint .../>
Scripting
To create an object using scripting, see CreateFromXAML.

Properties

Name, PressureFactor, X, Y

Methods

Equals, FindName, GetHost, GetValue, SetValue

Remarks

Multiple StylusPoint objects typically make up a Stroke.

Examples

In the following example the x and y coordinates and pressure data 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;
   }
}

See Also

Ink Support in Microsoft Silverlight
StylusPointCollection Object