Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does Visual Inheritance work in .Net?
Message
De
19/06/2007 13:14:49
 
 
À
19/06/2007 11:15:58
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Divers
Thread ID:
01234107
Message ID:
01234324
Vues:
13
For Properties for which there is no "system default", then your above steps will not work because the "reset" will be disabled in the Property Sheet ... so it becomes even more important to have a DefaultValue attribute for that Property in your own class.

That's true, but not sure that's applicable to any property that a developer would ever be specifying in a subclassed winform control. I just did a quick scan through all the props that I set in my subclass (and even some that I don't) - for each one, if I override it in my form, and then right-click, reset is available. Since you can drop a label or a textbox on a form, not change ANYTHING, and run it....

But regardless, while not using it probably still provides more than some might first think (how's that for a lawyer-like sentence!), I agree with you, DefaultValue is the best practice.

Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform