DisplayName and Description attributes are being ignored for my user control properties, but not Category.
Pretty much the same question as this, except that in my case the proposed answers do not work.
My code:
[DisplayName("Custom String"),
Category("Custom Properties"),
Description("String to display.")]
public string CustomString
{
get { return customString; }
set { customString = value; }
}
private string customString;
Properties window, showing that only the Category Attribute is working.
EDIT2 --------------------
Different webforms project, new user control created from scratch with same code (different values). Same results as before, only Category is applied.
public partial class AttributedUserControl : System.Web.UI.UserControl
{
[DisplayName("New Control Text"),
Category("New control Properties"),
Description("Text to show inside the user control.")]
public string TextString
{
get { return _TextString; }
set { _TextString = value; }
}
private string _TextString;
protected void Page_Load(object sender, EventArgs e)
{
}
}
- Visual Studio Professional 2015 - Version 14.0.25431.01 Update 3
- .NET Framework 4.7.03056