开发者

Silverlight, DeepZoom zooming animation

When I set the ViewportWidth of a Deepzoom image in Silverlight the zoom level changes very quickly. Is there a way I can se开发者_如何学Ct the time this zooming animation should take?

Thanks


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜