I\'m trying to learn and grasp what and how C# does things. I\'m historically a Visual Foxpro (VFP) developer, and somewhat spoiled at the years of visual inheritance by cr
Here is a simple solution using the ReadOnlyAttribute in the derived class.
class MyLabel : Label
{
[ReadOnly(true)]
public override Font Font
{
get { return new Font(FontFamily.GenericMonospace, 10); }
set { /* do nothing */ }
}
}
The ReadOnlyAttribute will disable property editing in the VS.NET designer.