平移/缩放用户控件的最佳实践? [英] Best practice for panning/zooming a user control?

查看:33
本文介绍了平移/缩放用户控件的最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前有一个用户控件,它显示其他用户控件的动态矩阵.由于它是动态的,视图可能会变大,需要用户向上/向下滚动在浏览器中向左/向右查看所有内容.

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.

我想为用户提供一种具有平移和平移功能的用户控件视图.放大它,就像这个 Telerik 控件的感觉.我们拥有 Telerik 控件,并且我已尝试将 Map 控件用于我们的目的,但这似乎不是一个好的解决方案.

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.

我还在滚动查看器中放置了一个画布,并且能够使其平移(使用滚动条)&缩放(使用缩放变换).这很好用,但不像 Telerik 控件那样流畅.

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.

所以,我想知道还有什么其他方法可以做到这一点.我是否忽略了对我有用的 Silverlight 控件?任何输入将不胜感激!

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!

推荐答案

I found this on CodePlex 和我喜欢他们的方法.我可能会将它定制为我想要的,但这是一个好的开始.注意:它没有实现投掷"功能.

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.

这篇关于平移/缩放用户控件的最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆