windows 8 - Touch Scrolling ScrollViewer in WPF App with RealTimeStylus Disabled -


we working on wpf 4.5 application run on windows 8 computers touchscreen monitors.

we have disabled support realtimestylus following the directions on msdn, since have views need multitouch support through wm_touch.

the problem disabling realtimestylus support seems disable user's ability scroll scrollviewer using touch - user can pan around scrollviewers fingers, if realtimestylus support disabled, not seem possible this. scrollviewer's panningmode set "both".

is possible combine these things in wpf application, or mutually exclusive?

another option add arrow buttons around content. we've used great effect on touch screen kiosk. it's bit more work, made custom control. code have supports vertical scrolling.

it should easy enough add horizontal scrolling well. in code below, there 2 buttons, called less , more above , below scroller.

    double epsilon = .001;      private void scroller_scrollchanged(object sender, scrollchangedeventargs e)     {         if ( scroller.scrollableheight > 0 ) {             less.visibility = math.abs(scroller.verticaloffset - 0) > epsilon ? visibility.visible : visibility.hidden;             more.visibility = scroller.verticaloffset + scroller.viewportheight < scroller.extentheight ? visibility.visible : visibility.hidden;         } else {             less.visibility = more.visibility = visibility.hidden;         }          if (scroller.extentheight / scroller.viewportheight > 2)         {             searchpanel.visibility = visibility.visible;         }     }      private void less_click(object sender, routedeventargs e)     {         sounds.click();         scroller.pageup();     }      private void more_click(object sender, routedeventargs e)     {         sounds.click();         scroller.pagedown();     } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -