VS Designer and DefaultValueAttribute

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gianluca

    VS Designer and DefaultValueAttribute

    Properties of inherited controls have the default value set to the value
    that is assigned in the InitializeCompo nent method in the base form class.
    Which is correct and useful. In the derived form you can always select the
    "Reset" option and restore the inherited property.

    However, if you extend an existing control class, say Button, and initialize
    some properties in the constructor and then use your own class in a form,
    the customizer will not reset to your default values. Obviously it makes no
    sense to override every property and add the DefaultValueAtt ribute
    declaration. This appears to be a bug in the designer deserializer. Does
    anyone know if the next version of VS.NET includes a fix for this?

    Thanks,
    Gianluca



Working...