开发者

Disable Ripple feedback on Microsoft Surface

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜