Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 7 Touch Screen "Shrug"

We've got a WPF app that runs on Win 7. With touch gestures on in Win 7, while scrolling a ListView, the application "shrugs" on the screen when the end of the list is reached.

This can be reproduced in Internet Explorer as well. If you load a web page that is long enough to produce a scroll bar, Windows "shrugs" IE when the bottom of the page is reached while scrolling with touch gestures.

Is there a way to turn off the shrug in Windows or disable it in some way with code in my WPF app? I need to keep touch on, just turn off the shrug.

like image 570
Brent Lamborn Avatar asked Dec 15 '10 15:12

Brent Lamborn


3 Answers

Handle the ManipulationBoundaryFeedback (i.e. e.Handled = true).

like image 146
calin dragan Avatar answered Oct 19 '22 12:10

calin dragan


If you want to disable the boundary for all controls in a window, you should put the ManipulationBoundaryFeedback handle on the first panel of the window, not on the window itself.

Doesn't work:

<Window x:Class="TestControls.BoundaryFeedback"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        ManipulationBoundaryFeedback="Control_ManipulationBoundaryFeedback"
        >
</Window>

Works:

<Window x:Class="TestControls.BoundaryFeedback"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        >
    <Grid ManipulationBoundaryFeedback="Control_ManipulationBoundaryFeedback">
    </Grid>
</Window>

In code behind:

private void Control_ManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)
{
    e.Handled = true;
}
like image 22
Bruno V Avatar answered Oct 19 '22 12:10

Bruno V


You can disable boundary feedback system-wide.

It's on the Panning tab of the "Pen and Touch" control panel.

http://www.youtube.com/watch?v=OObTOSglE1w

like image 1
Ben Voigt Avatar answered Oct 19 '22 13:10

Ben Voigt