【发布时间】:2011-01-01 07:01:13
【问题描述】:
我在this article 中阅读了有关 C# 中控件的 DragAllow 属性的信息。但我在 Visual Studio 2010 中找不到此属性。
我正在尝试为优化校准启用拖放功能。这里有人知道吗?
【问题讨论】:
标签: c# .net winforms controls drag-and-drop
我在this article 中阅读了有关 C# 中控件的 DragAllow 属性的信息。但我在 Visual Studio 2010 中找不到此属性。
我正在尝试为优化校准启用拖放功能。这里有人知道吗?
【问题讨论】:
标签: c# .net winforms controls drag-and-drop
从 Visual Studio 2005 开始,DragAllow 属性已重命名为 AllowDrop。
请参阅 MSDN 上的 relevant documentation。您阅读的文章必须是旧文章,或者是使用旧版本的 Visual Studio 编写的。
但是,您还应该注意 AllowDrop 属性对于 PictureBox 控件是隐藏的。函数签名将 BrowsableAttribute 设置为 False。根据documentation:
此 API 支持 .NET Framework 基础结构,不能直接从您的代码中使用。
为什么做出这个选择是anyone's guess,但您仍然可以在源代码中手动设置它(尽管没有 IntelliSense 的好处)。
【讨论】: