VS PropertyGrid 中的 'AllowDrop' 在哪里?

Where's 'AllowDrop' in the VS PropertyGrid?

我在 RichTextBox 控件上找不到 AllowDrop 属性(按字母顺序排序):

我确定有这个 属性 因为它编译得很好(并且使 RichTextBox 的拖放工作正常)

msg_textBox.AllowDrop = true;

我不明白,因为VS没有显示。

.NET Framework Reference Source 是寻找此类问题答案的绝佳方式。引用 RichTextBox.AllowDrop 属性 上的评论(已编辑以适合):

/// RichTextBox controls have built-in drag and drop support, but
/// AllowDrop, DragEnter, DragDrop may still be used:
/// this should be hidden in the property grid, but not in code

"built-in drag and drop support" 实际上看起来有点神秘顺便说一下。相当肯定它是为了允许拖动嵌入的 OLE 对象。 RichTextBox 是最后剩下的仍支持 OLE 的 Microsoft 软件之一。否则它就像门钉一样死了,我已经没有安装过它的程序了,反正我知道。

所以,激光击晕并按照评论中的指导进行操作,只需在表单构造函数中将 AllowDrop 设置为 true