C# PropertyGrid 拖放
我正在尝试使用 VS2005 (.NET 2.0) 在 C# 中实现对 propertygrid 的拖/放支持。 propertygrid 可以处理 Dragenter 等事件,但似乎没有办法在拖动事件期间获取指针下的 griditem。 到目前为止,我所能得到的最好的结果是使用 selectedgriditem 属性来检索自定义属性描述符并设置值,但这需要在开始拖/放操作之前已经选择网格项。
有没有人有幸实施这个?
谢谢 :-)
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?
Thanks :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你没有得到任何乐趣,你可以尝试 SmartPropertyGrid; 我不知道它是否有效,但也许值得一看。 您甚至可能会因为来自 3rd 方的“功能请求”而感到更加高兴,因为现在 WPF 已经接管了 MS 版本,因此几乎已经密封。
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.