TabletDeviceType Enumeration
TOC
Collapse the table of content
Expand the table of content

TabletDeviceType Enumeration

 

Defines values for the type of devices the tablet device uses.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public enum TabletDeviceType

Member nameDescription
Stylus

Indicates the tablet device is a stylus.

Touch

Indicates the tablet device is a touch screen.

The following example demonstrates how to determine the type of tablet device.

// Get the type of tablet device
TabletDeviceType myTabletDeviceType = myTabletDevice.Type;

// Display the type of tablet device
textbox1.AppendText("Type: ");

switch (myTabletDeviceType)
{
    case TabletDeviceType.Stylus:
        textbox1.AppendText("Stylus\n");
        break;

    default: // TabletDeviceType.Touch:
        textbox1.AppendText("Touch Pad\n");
        break;
}

.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft