TouchDevice::Id Property

 

Gets the unique identifier of the TouchDevice, as provided by the operating system.

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

public:
property int Id {
	int get();
}

Property Value

Type: System::Int32

The unique identifier of the TouchDevice.

A TouchDevice represents a single touch on a screen. If multiple touches are present, use the Id property to distinguish between them.

The following example handles the TouchMove events that occur on a Canvas. When a touch moves on the Canvas, the Id is checked. If the move came from the first touch, its location is recorded. If the move came from the second touch, a line is drawn from the position of the first touch to the position of the second touch.

This example is part of a larger example available in the TouchDevice class overview.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 4.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: