GetStylusInfo Method
Returns a StylusInfo object which gives information about the state of the Stylus.
XAML |
Cannot use methods in XAML.
|
Scripting |
retval = eventargs.GetStylusInfo()
|
Return Value
Information about the state of the stylus.
Remarks
For a mouse, the following is returned:
Type = Mouse
IsInverted = False
Examples
The following example demonstrates how to display the type of device that was used to create the current StylusPoint.
JavaScript |
---|
// 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); } |