Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Switching UserControl at runtime
Message
De
29/01/2011 18:09:46
 
 
À
28/01/2011 17:51:44
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01497625
Message ID:
01497799
Vues:
50
>>>If the UserControls are added at design time I don't think they will go out of scope when they are moved from the Controls collection.
>>
>>Pete said he was adding to the TabPage programmatically, but I don't know how he instantiated them in the first place.
>
>But even if they were instantiated programatically, all that is required is a reference that is locally scoped to the form....


Yes, that's correct. I guess one of the things I had been thinking about when I replied, was some of the dynamic instantiation I used to do at a past company, using Reflection to load and display various UserControls in a Panel ... kind of an Outlook-style of design using SideBars on the left side and the Panel with the UserControl on the right. We never kept any references to the UserControl once we switched to another, but that design was way different than what Pete was talking about with TabPages.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform