我怎样才能让我的用户控件的重写Text属性在VS2005表单设计展现出来?
-
05-09-2019 - |
题
我与在它下面的代码的用户控件。
[System.ComponentModel.Category("Appearance")]
public override string Text { ... }
private int myVar;
[System.ComponentModel.Category("Appearance")]
public int MyProperty { ... }
MyProperty
在属性网格显示了当控制被插入的形式,但Text
没有。我怎样才能得到它可见?
解决方案
如果您的System.ComponentModel.Browsable(真)属性添加到您的财产应在属性浏览器中显示。使用上面的例子我确认在VS2008的行为。
不隶属于 StackOverflow