Silverlight 拖放任何 UIElement?
我看到了大量有关 Silverlight 4 对拖放支持的文章。然而,这都是关于文件的。我只想使普通用户控件可拖动。这可能吗,还是仅限于文件?
I see a great deal of writing about Silverlight 4's support for drag and drop. However, it is all about files. I want to just make normal user controls draggable. Is this possible, or is it limited to files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您当然可以向 Silverlight 应用程序的任何元素添加拖放功能 - 不限于文件(这在 4.0 中变得更容易)。使用附加行为和一些拖放管理代码,您应该能够实现交互需求。在不确切知道您希望完成什么的情况下,我最好的建议是去查看一些项目,例如:
http://silverlightdragdrop .codeplex.com/
并阅读此处的讨论:
Silverlight 4 拖放放弃替代品
You can certainly add drag-and-drop capabilities to any element of you Silverlight application - it is not limited to files (this just became easier in 4.0). Using attached behaviors and some drag-and-drop management code you should be able to achieve the interaction need. Without knowing exactly what you hope to accomplish, my best advice would be to go check out some projects like:
http://silverlightdragdrop.codeplex.com/
and read about the discussion here:
Silverlight 4 Drag and Drop Alternatives