DeviceType Enumeration

Specifies the basic classes of pointing devices supported.

XAML
Cannot be used in XAML.
Scripting
value = "EnumerationValue"

Enumeration Values

Value Description
Mouse The device is being represented as a mouse. The device is a mouse or stylus that is not using the pen service (wisptis.exe).
Stylus The device is a stylus that is hooked up to the pen service (wisptis.exe).
Touch The device is a touch digitizer that is hooked up to the pen service (wisptis.exe).

Remarks

Detecting the device type lets you know whether device-specific properties are available. For details, see Ink Support In Microsoft Silverlight.

Examples

The following JavaScript 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);
}

Applies To

DeviceType (StylusInfo)

See Also

Ink Support In Microsoft Silverlight