I have a user control that inherits from UserControl. It’s a button so I’m trying to make the text in the button, change-able by using the Text property like the real buttons, instead of naming my own like _Text. I have the following code but it doesn’t work (ie it doesn’t show up in the Property Window). The name of the label is ContentPresenter
public override string Text
{
get
{
return ContentPresenter.Text;
}
set
{
ContentPresenter.Text = value;
}
}
UserControl goes to significant effort to hide the Text property. From the metadata:
You can make it visible by overriding those attributes in your code:
I’m not promising that’s enough to make it work, but it probably is.