Select to view content in your preferred language

Slider Inside Of Legend Does Not Work With Touch Screen (Only WPF)

695
0
01-13-2011 02:02 PM
RyanCoodey
Frequent Contributor
I have slider bars on my Legend control just like the example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates

These sliders work fine with the mouse but with touch they do not (they work in the Silverlight sample, but not in WPF).  You can tap and select the sliders thumb, but you cannot drag it.  After some investigation I found this is due to a ScrollViewer intercepting the drag gesture like this article here mentions: http://stackoverflow.com/questions/3258709/multi-touch-scrollviewer-eating-touch-events

So first thing was to try and disable the Legends ScrollViewer by doing:
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"

This did not work, scroll bars still come up.  So then I used Expression Blend to get the template/style for the Legend control and I did the same to the TreeView control, still has scroll bars. I then tried putting this disable code on everything in the template that would accept it, still scroll bars...

Any ideas on how to solve this issue?

I ideally would like to keep the scroll bars and just get the slider to work if it has the focus, but disabling the scroll bars (at least the horizontal one) is an option too. 

Thanks a lot!
0 Kudos
0 Replies