O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Gesture Sample Code

This section looks at the GesturesView page in the downloadable sample code and demonstrates the various events of the GestureListener class. You see how to move, rotate, and resize a UIElement using gestures. You also see how to provide an animation that responds to a flick gesture to send a UIElement hurtling across a page.

The view contains a Border. Within the Border we attach the GestureListener and subscribe to its various events:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">    <TextBlock x:Name="messageBlock"            Style="{StaticResource PhoneTextNormalStyle}"            VerticalAlignment="Top" />    <Button Content="reset" Click="Button_Click"            VerticalAlignment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required