How does the Control class, provide the ForeColor, BackColor and Font default values?
Posted
by Miguel Angelo
on Stack Overflow
See other posts from Stack Overflow
or by Miguel Angelo
Published on 2010-04-01T17:22:16Z
Indexed on
2010/04/01
17:23 UTC
Read the original article
Hit count: 420
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!!!
© Stack Overflow or respective owner