Hello Chris, Hmmm? I tested it now with a simple user control which has a button on it. I placed it on a baseform and inherit a formclass from that baseform. And.. Same effect than you have!! I have no real explination for that, but it hs something todo with the timing of the designer. The designer runns the constructor code of your controls, maybe at the time where he whants to get youre property, the button is not initialized. (Just out of my head.) I would suggest you aworkaround like this:
private bool testProp = true;
\[Browsable(true), Category("Icons Visible"), DefaultValue(true)\]
public bool TestProp
{
get
{
return testProp;//button1.Visible;
}
set
{
testProp = value;
button1.Visible=value;
}
}
Hope it helps! All the best, Martin