[2.0] Usercontrols and Interfaces confusion
I have an application that has a handful of UserControls that all implement the same interface.... they are different variations of a display with a couple of mehtods for raising events.
The trouble is, I want to generically reference these guys, Ideally as a user control when I need to place them and as the Interface when I need to set data and register for events. I've gotten away with this in the past by casting them as the concrete type upon creation, but this time, I plan on loading them into a LIST<whatever> to call up as needed. I'm trying to avoid having a separate referece of the concrete type hanging out in my app.
I'll try and post some c0d if I get some time.
Re: [2.0] Usercontrols and Interfaces confusion
In your project is it possible to use a base class for your user controls instead of an interface? It would allow you to put the interface methods into the base class and allow you to derive from UserControl. Then you would have a List<MyUserControlBase> which allows access to both sets of methods.