共用方式為


Touch Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Provides an application-level service that processes touch input from the operating system and raises the Silverlight-specific FrameReported event.

Inheritance Hierarchy

System.Object
  System.Windows.Input.Touch

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

Syntax

'Declaration
Public NotInheritable Class Touch
public static class Touch

The Touch type exposes the following members.

Events

  Name Description
Public eventStatic memberSupported by Silverlight for Windows Phone FrameReported Occurs when the input system promotes a Windows 7 touch message for Silverlight.

Top

Remarks

Touch events do not use the same event model as other Silverlight input events such as MouseLeftButtonDown. Rather than being exposed as an element-specific event that potentially routes through the object tree of a UI, the touch input event is a single event handled at the level of the application. You then use the TouchFrameEventArgs and call GetPrimaryTouchPoint versus specific UI elements and their bounds. This determines the specific touch point frame of reference within your application's UI layout.

Touch input requires hardware that is touch-sensitive, as well as an environment that supports the infrastructure needed to expose touch events to individual applications. For more information, see Touch Input in Silverlight.

Version Notes

Silverlight for Windows Phone uses an entirely different touch input model. For more information on touch input, manipulations and gestures for Silverlight for Windows Phone, see How to: Handle Manipulation Events.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Other Resources