views:

92

answers:

3

When I set the ViewportWidth of a Deepzoom image in Silverlight the zoom level changes very quickly. Is there a way I can set the time this zooming animation should take?

Thanks

A: 

Try using the MultiScaleImage.UseSprings = true and the ZoomAboutLogicalPoint() method.

Michael S. Scherotter
I can't set the time that the zoom animation takes with this method though
Tim
+1  A: 

The only way to do that would be to set UseSprings to false and animate the value of ViewportWidth yourself. This will also force you to animate the the ViewportOrigin as well when performing panning operations if you want to maintain the "spring" animation of panning.

You would need to test the performance of this. It could well be that MultiscaleImage may optimise its own animations differently than when these properties are being animated externally.

AnthonyWJones
Performance doesn't seem to bad. Thanks this looks like its going to be the best solution
Tim
A: 

Although you cannot set the timing directly, each "Spring" takes exactly 1.5 seconds. So, if you wanted to, you could leave springs on, and then calculate the difference between the current viewportwidth, the viewport width you want to go to, and try and massage the timing this way. That being said, it may look awkward, so you'd have to test it first.

Craig Huber