Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top