Export (0) Print
Expand All

GetStylusInfo

Silverlight

Returns a StylusInfo object that gives information about the state of the stylus (or whichever device was responsible for the input event).

retval = eventargs.GetStylusInfo()

Type: StylusInfo

Information about the state of the stylus.

StylusDevice (a property, and not an exact equivalent)

For a mouse, the following is returned in the StylusInfo:

Type = Mouse

IsInverted = False

The following example demonstrates how to display the type of device that was used to create the current StylusPoint.

// Capture mouse movement when the left button is pressed, and create the stroke.
function InkPresenterMouseDown(sender,args)
{
  // Display the type of input device in a TextBlock.
  device.Text = args.GetStylusInfo().deviceType;
  
  inkPresenter.CaptureMouse();
  newStroke = agCtrl.content.createFromXaml('<Stroke/>');
  
  newStroke.StylusPoints.AddStylusPoints(args.GetStylusPoints(inkPresenter));
  inkPresenter.Strokes.Add(newStroke);
}

Community Additions

ADD
Show:
© 2015 Microsoft