如何在VS2005中的表单设计器中显示我的用户控件的重写Text属性?

rec*_*ive 2 c# propertygrid user-controls visual-studio-2005 windows-forms-designer

我有一个用户控件,其中包含以下代码.

[System.ComponentModel.Category("Appearance")]
public override string Text { ... }

private int myVar;
[System.ComponentModel.Category("Appearance")]
public int MyProperty { ... }
Run Code Online (Sandbox Code Playgroud)

MyProperty当控件插入表单时,Text会显示在属性网格中,但不会.我怎样才能看到它?

Jim*_* H. 6

如果将System.ComponentModel.Browsable(true)属性添加到属性,它应该显示在属性浏览器中.使用上面的示例我确认了VS2008中的行为.