I think I know the answer to this but hoping someone has a neat solution. We are currently using two kinds of drop down controls (telerik and .net). I'm hoping to combine these into one control but struggling with a user friendly design.
Ideally the control would be created in the design file with a bool property of say "SimpleBox", to determine which kind of control to inherit. The instantiation would then be generated in the code behind design file and the constructor would then dynamically load the base (which isn't possible). The easy solution would be for me to create a IDropDown interface then have a factory create the correct one. The only real problem with this is the fact the instantiation has to be manually written every time. Which is a hassle, and does not speed up our process at all.
Although it isn't directly possible i'm looking for a solution along the lines of a factory which is ran inside the object constructor for setting the base, based on a bool property.
Cheers