GetStylusPoints
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Returns a clone of the stylus points collected since the last mouse event.
retval = eventargs.GetStylusPoints(inkPresenter)
Arguments
inkPresenter |
The coordinates of the StylusPoints that are returned are relative to the InkPresenter that is passed into the method. |
Return Value
Type: StylusPointCollection
A collection of the stylus points collected since the last mouse event.
Remarks
If the active device is a mouse, the returned StylusPointCollection will contain a single point that corresponds to the mouse event.
Example
In the following example, the x and y coordinates of each StylusPoint are sent to a 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;
}
}