C#PropertyGrid拖放 [英] C# PropertyGrid drag drop
问题描述
我正在尝试使用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屋!