How does the Control class, provide the ForeColor, BackColor and Font default values?
- by Miguel Angelo
I know that component-model indicates whether a property has a default value or not, by means of ShouldSerializeValue method of PropertyDescriptor.
The base windows-forms Control class, has some properties like ForeColor, BackColor and Font, that defaults to the same value of the parent, but I could not find any TypeDescriptor or PropertyDescriptor that provides these default values. The Control class does not implement ICustomTypeDescriptor nor has a TypeDescriptionProviderAttribute.
How does the Control class indicates that these properties should be serialized or not?
Where does it provide the PropertyDescriptors for these properties??
Thanks!!!