title: Silverlight - GestureService & GestureListner in code-behind
body: <p>I want to do the following XAML code in code behind and not sure how to add the GestureService and GestureListner onto the Image.</p>
  
  <p>Xaml code:</p>
  
  <pre><code>&lt;Image Grid.Row="1" x:Name="img" VerticalAlignment="Center" HorizontalAlignment="Center" Width="200"&gt;
              &lt;toolkit:GestureService.GestureListener&gt;
                  &lt;toolkit:GestureListener/&gt;
              &lt;/toolkit:GestureService.GestureListener&gt;
  &lt;/Image&gt;
  </code></pre>
  
  <p>Code behind equivalent:</p>
  
  <pre><code>Image image = new Image();
  //how do I add GestureService and GestureListner?
  ContentPanel.Children.Add(image);
  </code></pre>