I would like to add a property to my form and have it show up in the designer.
I understand how to add a property to a custom control and have that visible in the designer, but it seems if I add a property directly to the form it is not showing up in the properties window.
I've seen articles that are close, but nothing seems to directly answer this question!
I've tried rebuilding the solution, loading/unloading project, tried a bunch of different design time attributes, tried using a private backing field.
namespace property_in_designer
{
public partial class Form1: Form
{
public Form1()
{
InitializeComponent();
}
[Category("Layout")]
[Description("Why Doesn't this show up in designer?")]
[Browsable(true)]
public int MyProp
{
get; set;
}
}
}
Any help is appreciated, thanks for reading!