WPF 拖放 [英] WPF Drag and Drop

查看:18
本文介绍了WPF 拖放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现拖拽&放弃 WPF 应用程序?我可以打开 2 个相同的应用程序并将一个对象从一个拖到另一个.这是我要拖动的内容:

How to implement drag & drop for a WPF application? I could open 2 the same apps and drag an object from one to another. Here's what I want to drag:

<Grid Width="100" Height="50">
 <Rectangle BackGround="Red"/>
 <TextBlock>Hello World</TextBlock>
</Grid>

网格必须在另一个应用程序中看起来与拖动它的应用程序相同.有什么解决办法吗?

The Grid has to look the same in the other app where it is dragged as the one from it was dragged. Any solutions?

推荐答案

我之前成功使用过Gong Solutions Drag and Drop,是一个非常好用的DLL.你可以在这里看到它的一个小例子:Gong Solutions

I've used Gong Solutions Drag and Drop successfully in the past, it's a very easy DLL to use. You can see a small sample of it here: Gong Solutions

这篇关于WPF 拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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