title: Zoom and scroll image in wp7
body: <p>Thanks in advance..</p>
  
  <p>In my WP7 application I have used following code for zooming an image. </p>
  
  <pre><code>&lt;Image Name="imgThumbnail" Width="480" Height="740" VerticalAlignment="Center" HorizontalAlignment="Center" RenderTransformOrigin="0.5, 0.5" CacheMode="BitmapCache"&gt;
      &lt;Image.RenderTransform&gt;
          &lt;CompositeTransform x:Name="transform" /&gt;
      &lt;/Image.RenderTransform&gt;
      &lt;toolkit:GestureService.GestureListener&gt;
          &lt;toolkit:GestureListener PinchDelta="OnPinchDelta" PinchStarted="OnPinchStarted" /&gt;
      &lt;/toolkit:GestureService.GestureListener&gt;
  &lt;/Image&gt;
  
  private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e)
  {
      var image = sender as System.Windows.Controls.Image;
      if (image == null) return;
      var transform = image.RenderTransform as CompositeTransform;
      if (transform == null) return;
      initialScale = transform.ScaleX;
  }
  private void OnPinchDelta(object sender, PinchGestureEventArgs e)
  {
      var image = sender as System.Windows.Controls.Image;
      if (image == null) return;
      var transform = image.RenderTransform as CompositeTransform;
      if (transform == null) return;
      transform.ScaleX = initialScale * e.DistanceRatio;
      transform.ScaleY = initialScale * e.DistanceRatio;
  }
  </code></pre>
  
  <p>Zooming is working properly, but I cannot scroll the image. When add a scrollviewer, the zooming is not working. What is the issue and how can I fix this problem?</p>