C#PropertyGrid拖放 [英] C# PropertyGrid drag drop

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

问题描述

我正在尝试使用VS2005(.NET 2.0)在C#中实现对属性网格的拖放支持.propertygrid可以处理dragenter等事件,但是似乎没有办法在拖动事件期间将griditem放在指针下.到目前为止,我能得到的最好的结果是使用selectedgriditem属性检索自定义propertydescriptor并设置值,但这要求在开始拖放操作之前已经选择了网格项.

I'm trying to implement drag/drop support to a propertygrid in C# using VS2005 (.NET 2.0). The propertygrid can handle the dragenter etc. events, but there doesn't seem to be a way to get the griditem under the pointer during a drag event. The best I've been able to get so far is to use the selectedgriditem property to retrieve a custom propertydescriptor and set the value, but this requires a grid item to already be selected before starting the drag/drop operation.

有人有幸实现这一目标吗?

Has anyone had any luck with implementing this?

谢谢:-)

推荐答案

如果没有任何乐趣,可以尝试

If you don't get any joy, you could try SmartPropertyGrid; I have no idea whether it'll work, but it perhaps worth a look. You might even have more joy as a "feature request" from a 3rd-party, since the MS version is pretty-much sealed now that WPF has taken over.

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

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