When a touch-enabled application is running and users touch the screen, the Microsoft Surface Toolkit for Windows Touch Beta software displays generalized visual feedback called a touch visualization.
In the following illustration, the system displays a glow under two touches (labeled 1) and provides a tether (labeled 2) between the point of touch and an item on the screen.
Touch visualizations are intended to improve user interactions with your application in three ways:
When a user touches the screen, the application should clearly indicate to the user that it received the touch. Otherwise, the user might think that the system is broken or that the user is trying to interact with it incorrectly. Touch visualizations display visual feedback to users that the system has captured the touch.
For example, if a user attempts to drag an object beyond a certain location, the Surface Toolkit software displays visualizations that inform the user that the system is aware that the user is trying to do something (rather than simply ignoring further attempts to move the object in that direction).
Hit-testing on touch-enabled controls is associated with a single screen point. A user might touch a control outside of its hit-testing area. If so, the touch will not be captured by the control.
To help the user understand this situation, the Surface Toolkit software displays different visuals for captured and uncaptured touches. In both situations, when the user lifts a finger, the touch visualization shrinks to show the point that is used for hit-testing.
Visualize captured touches
Some controls can capture a touch that then slides outside the control's bounds. If a user then tries to use such a control with another touch, the control will not work. Touch visualizations provide a visual indication that the control still has the original touch captured.
For example, suppose that a user touches a button and then slides the touch aside. A second touch-and-release on the button will not activate its associated action because all touches must be released before a button is considered pressed. In this situation, touch visualizations provide visual clues that the button is still associated with the first touch.
Implementing Touch Visualizations
Certain Surface Toolkit controls include touch visualizations automatically. For example, the SurfaceButton control uses touch visualizations to show that a touch on the button continues to be associated with the button until the touch is lifted.
For many applications, the built-in touch visualizations provide excellent usability and offer consistency in the look-and-feel with other Surface Toolkit applications.
|A TouchVisualizer can only be placed at the root of a window. This location is the default in the SurfaceWindow template. A TouchVisualizer should occupy the whole window. If you add a TouchVisualizer control to an item that is smaller than the whole window, the TouchVisualizer will not show visualizations.|
The Surface Toolkit includes several ways to modify touch visualizations:
Modify the colors that touch visualizations use. For more information, see Touch Visualization Colors.
Note Consider minimizing the number of colors used in your application as it may affect performance.
Change the adapter that a control uses. Changing the adapter can change the anchor point that is used for the tethers, or it can change whether visualizations are shown in certain situations. For more information, see Touch Visualization Adapters.
Disable touch visualizations on one or more controls in an application. For more information, see Disabling Touch Visualizations on Controls.
Note Make sure that any control on which you disable touch visualizations still provides clear visual feedback to users.