Export (0) Print
Expand All

TouchFrameEventArgs.SuspendMousePromotionUntilTouchUp Method

Disables automatic mouse-event promotion for the primary touch point until all touch points report as Up.

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

public void SuspendMousePromotionUntilTouchUp()

ExceptionCondition
InvalidOperationException

No primary touch point was recorded.

-or-

The primary touch point has an action other than Down.

Mouse-event promotions restart after a primary touch down if they are not suspended again.

You might call this method if you are sure that the client has full multi-touch capabilities. You can determine multi-touch capabilities through user-agent checks or other techniques that are available in the hosting environment.

This method enables you to cancel mouse-event promotion on a per-event basis, which is appropriate because the method exists in event data. Also, some input-capable surfaces in your Silverlight application might not be touch-enabled. Some sources, such as a button, might still need mouse promotion to work as expected. If you want to cancel mouse-event promotion for a longer period, such as a session or the application lifetime, you can routinely call SuspendMousePromotionUntilTouchUp for all registered touch-event handlers.

Touch input requires hardware that is touch-sensitive and an environment that supports the infrastructure that exposes touch events to individual applications. The need for mouse-event promotion is often related to how you handle the client cases where touch or multi-touch is not supported. For more information, see Touch Input in Silverlight.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

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

Community Additions

ADD
Show:
© 2014 Microsoft