3

I'm doing some WPF development on a Microsoft Surface, and I'd like to disable the ripples feedback (the visual animations you get for each contact down, up, move etc). I can't find a way to disable it, is it possible to do this?

1 Answers1

4

Yes it's possible - you can disable touch/contact visualizations for any control or surfacewindow by calling

ContactVisualizer.SetShowsVisualizations(ctrl, false);

or by adding the following attributes to the XAML:

xmlns:s="http://schemas.microsoft.com/surface/2008"
s:ContactVisualizer.ShowsVisualizations="False"

If you'd like to disable it for the entire application, add the following line to the appsettings section of the application's config file:

<add key="SupportsContactVisualizations" value="False" />

As Robert correctly pointed out, for surface 1.0 you need to use the ContactVisualizer, for WPF 4 the class has been renamed to TouchVisualizer. Examples for the second one on MSDN can easily be adapted for surface 1.0 by changing Touch to Contact.

marapet
  • 54,856
  • 12
  • 170
  • 184
  • You need to include the `xmlns:s="http://schemas.microsoft.com/surface/2008"` part, otherwise the `s:` makes no sense. – Gabe Mar 31 '11 at 16:21
  • This is correct for WPF4. For Surface 1.0 however, you need to replace the word "Touch" on all of these APIs with "Contact" in order to achieve the same effect. – Robert Levy Apr 01 '11 at 13:32
  • Thx Robert, I should have tested... I have now, and I updated the answer. – marapet Apr 01 '11 at 16:59