To add simple pinch zoom (that I used in my Spirit Level) use the Silverlight Toolkit for WP7 and add the pinch GetureListener to a grid
<toolkit:GestureListener PinchDelta="GestureListener_PinchDelta" />
and code in event
private void GestureListener_PinchDelta(object sender, PinchGestureEventArgs e)
if (e.DistanceRatio < 1.0 || e.DistanceRatio > 1.4)
// Create the animation for pinch
Storyboard storyboard = new Storyboard();
DoubleAnimation pinchXAnimation = new DoubleAnimation();
pinchXAnimation.To = e.DistanceRatio;
pinchXAnimation.Duration = TimeSpan.FromSeconds(0.3);
Storyboard.SetTargetProperty(pinchXAnimation, new PropertyPath("GridScaling.ScaleX"));
DoubleAnimation pinchYAnimation = new DoubleAnimation();
pinchYAnimation.To = e.DistanceRatio;
pinchYAnimation.Duration = TimeSpan.FromSeconds(0.3);
Storyboard.SetTargetProperty(pinchYAnimation, new PropertyPath("GridScaling.ScaleY"));
- Copy and paste text.
- Preview of back button stack.
- Battery api.
- Camera – movie api.
- Silverlight integration with XNA.
- Exposed MAC address of WIFI.
- Tile tap and hold option to unintall the app.
There are rumors that Copy and paste will be fixed on February. Will see.
Charles Petzold has released ebook about Windows Phone 7 for free!
Thanks a lot!
A few tips that make your life easer.
- Run your Visual Studio as an administrator (Right-click -> run as administrator) to get better FPS.
- Do not place IsTrial() in a loop. It take 60ms or more to return.
- Code generation in the compact framework is not the same as Windows’ code. Jitter is optimized to run fast, not to produce the fastest code.
- Property is just a function for .Net CF.
- To input text into emulator press Page-up (while editing a texbox f.e.) and then use your keybord to enter some text.
- Use F9 and F10 to change the volume
- To see app on marketplace if you are not from the country that has own marketplace go to Control Panel -> Location and change it to United States.
- Do not use transparent images at all!
- Take as much as you can from Compositor Thread (for callback animations use BitmapCache).
- Use Canvas or custom popup instead of default one (Popup class) – lack of hardware acceleration.
- If your app loads very fast get rid off the spash screen.
- Use DXT format for textures and pack them into 1 file (faster loading and fewer GPU texture switches).
- For things like game stats avoid using strings( immutable). SpriteBatch.DrawString can take a StringBuilder directly for drawing text.
- Avoid using/abusing LINQ and foreach (it may causes garbage).
- Use Jagged arrays( arrays of arrays) instead of 2d arrays.