|
Hi everyone,
I want to create a base control that allows the implementor to be able to configure certain aspects of it in design time, and I want this behavior to control how code is generated for the subclassed control. More specifically, I want to be able to generate new properties on the subclass from the designer, based on some user selections (e.g data sources) in the designer. If it is possible, I want to do this from the designer classes so that I can work. I'm not quite sure how much control I have over code generation (also, I'm not sure how desigers work with inherited controls), but I poked around the framework with Reflector and saw some use of the CodeDomSerializer and I thought that may be a way, but before I dig into that I'm hoping for some directions, howtos, other people's experiences, or anything along that line. If the above approach turns out to be impossible, I guess I have to roll my own designer. In that case, can I select different designers based on the base class like the Windows Forms designer does? Also, does anyone have a good tutorial on how to write a designer (I have some docs, but I prefer something easy to read).
Phew... That's a lot of questions. I'm grateful for a response to even one of them :-)
Thanks for any help
|