如何使Visual Studio 2010显示RadioButton的所有可用事件

时间:2014-06-22 08:34:03

标签: c# visual-studio-2010

我正在运行Visual Studio 2010,也许它也适用于其他版本。当我在设计师中并查看RadioButton的事件时,MouseDoubleClick事件不存在:

Visual Studio 2010 Designer Events

但是,如果我转到代码视图并查看那里的RadioButton事件,我可以看到MouseDoubleClick事件:

enter image description here

似乎VS设计师只显示继承的事件,而不是在RadioButton类中直接实现的事件。如何让所有这些都出现在设计师手中?

编辑:正如Hans Passant(对问题的评论)和lomed(接受的答案)所指出的那样,这是故意隐藏的。我使用的是ReSharper,这可能就是它出现在IntelliSense中的原因,在他接受的答案的评论中也指出了这一点。

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public event MouseEventHandler MouseDoubleClick;

1 个答案:

答案 0 :(得分:3)

使用Object Browser或代码元数据(右键单击>转到定义或F12)或MSDN

<{1>}中的

(F2)设置启用“显示隐藏的类型和成员”(请参阅​​:Did you know… You can hide or show hidden members and types in the Object Browser?Viewing the Structure of CodeRadioButton.MouseDobleClick in object explorer

隐藏在Object Browser

>中可以看到的事件的方式
Signature