Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.