Best practice for panning/zooming a user control?

主宰稳场 提交于 2019-12-20 05:41:42

问题


We currently have a user control which displays a dynamic matrix of other user controls. Since it's dynamic, the view can become large, requiring the user to scroll up/down & left/right in the browser to view everything.

I would like to give the users one view of the user control with the ability to pan & zoom on it, much like the feel of this Telerik control. We own the Telerik controls and I've tried to use the Map control for our purpose, but it doesn't seem like that is going to be a good solution.

I have also placed a Canvas inside of a scroll viewer, and was able to make it pan (using scroll bars) & zoom (using Scale Tranform). This works pretty well, but it's not smooth like the Telerik control is.

So, I'm wondering what other ways there are to do this. Am I overlooking a Silverlight control that would work for me? Any input would be greatly appreciated!


回答1:


I found this on CodePlex and I like their approach. I will probably be customizing it to be exactly what I want, but it's a good start. Note: It does not implement the 'throwing' capabilities.



来源:https://stackoverflow.com/questions/2929472/best-practice-for-panning-zooming-a-user-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!