Enlarge for WP7 Application

I am looking for a control for a WP7 application to scale it. I saw on codeplex smth how DeepZoomContener, but this is not very good. Any ideas? I just need to increase to 150%, holding everything.

Sincerely.

+4
source share
2 answers

thanks Mick, but it messed up my layout a bit. I did something simpler.

I use the Silverlight Toolkit for WP7 and add a GetureListener pinch to my grid

<toolkit:GestureService.GestureListener> <toolkit:GestureListener PinchDelta="GestureListener_PinchDelta" /> </toolkit:GestureService.GestureListener> 

and code in the event

 private void GestureListener_PinchDelta(object sender, PinchGestureEventArgs e) { if (e.DistanceRatio < 1.0 || e.DistanceRatio > 1.4) { return; } // Create the animation for pinch Storyboard storyboard = new Storyboard(); DoubleAnimation pinchXAnimation = new DoubleAnimation(); pinchXAnimation.To = e.DistanceRatio; pinchXAnimation.Duration = TimeSpan.FromSeconds(0.3); storyboard.Children.Add(pinchXAnimation); Storyboard.SetTargetProperty(pinchXAnimation, new PropertyPath("GridScaling.ScaleX")); Storyboard.SetTarget(pinchXAnimation, GridScaling); DoubleAnimation pinchYAnimation = new DoubleAnimation(); pinchYAnimation.To = e.DistanceRatio; pinchYAnimation.Duration = TimeSpan.FromSeconds(0.3); storyboard.Children.Add(pinchYAnimation); Storyboard.SetTargetProperty(pinchYAnimation, new PropertyPath("GridScaling.ScaleY")); Storyboard.SetTarget(pinchYAnimation, GridScaling); storyboard.Begin(); } 
+5
source

Source: https://habr.com/ru/post/1333365/


All Articles