Jan & Patrick Tisseghem did a great job with the SmartPart… life saver if you ask me. Version 1 is a HUGE help… if you haven't checked it out, you really need to. I won't rehash the whole thing, you can read more about version 188.8.131.52 here and here and get it here.
So what's next? You know there's bound to be enhancements coming. The biggest one I can think of deals with the public properties. Right now the public properties are exposed as textboxes in the custom toolpane. But wouldn't it be so much nicer if our user control could tell the SmartPart something like “this property is really a selection (dropdownlist) and here are the available choices” or a radio button list, etc. How to implement this? Not sure… maybe there's a way using a custom attribute to tell the SmartPart where what type of a control it should build and where to get the data. Going off this implementation idea… let's say we have two extra attributes: PropertyControlType & PropertyControlData. The second would be the name of a public property of type string.
Another idea is validators… but I have no idea how I'd control that. Maybe just a flag saying it is required OR that it matches a range OR that it matches a regular expression. Maybe when the user clicks APPLY or OK on the tool pane, the SmartPart passes it to the user control for validation.
I don't know if these ideas are technically possible. Once I roll off my current project I'll take a look and see what's involved.comments powered by Disqus