I have a prblem: If I enter this kind of xaml:
<Grid Grid.Row="1">
<ScrollViewer Name="scrolViewer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="AliceBlue"
BorderThickness="5" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Image Name="mapImage" CacheMode="BitmapCache" RenderTransformOrigin="0.5 0.5">
<Image.RenderTransform>
<CompositeTransform x:Name="transform" />
</Image.RenderTransform >
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener PinchStarted="OnPinchStarted" PinchDelta="OnPinchDelta" />
</toolkit:GestureService.GestureListener>
Gestures does not work, but image slides as it is expected to. If I remove tag - gestures begin to work. How do I enable guestures to zoom and rotate image inside scrollviewer or how do I create my own scrollviewer based on gestures. Thanx in advance!
I'm not sure putting your image in a ScrollViewer
is a great idea as it's possible the gesture handling between ScrollViewer
and GestureListener
will compete.
See Jeff Prosise's blog for an example of how to zoom/rotate using GestureListener
. The whole blog post series is very useful if you want to learn more about WP7 touch.
(Thanks to Derek's answer to a previous SO question .)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.