Silverlight - GestureService & GestureListner in code-behind

Posted by Rajah on Stack Overflow See other posts from Stack Overflow or by Rajah
Published on 2010-12-25T03:50:04Z Indexed on 2010/12/25 3:54 UTC
Read the original article Hit count: 423

I want to do the following XAML code in code behind and not sure how to add the GestureService and GestureListner onto the Image.

Xaml code:

<Image Grid.Row="1" x:Name="img" VerticalAlignment="Center" HorizontalAlignment="Center" Width="200">
            <toolkit:GestureService.GestureListener>
                <toolkit:GestureListener/>
            </toolkit:GestureService.GestureListener>
</Image>

Code behind equivalent:

Image image = new Image();
//how do I add GestureService and GestureListner?
ContentPanel.Children.Add(image);

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about windows-phone-7