Hello One and All,
I have been kicking around a problem (for a bit of fun) for the last few days and haven't made much progress and am wondering if anyone can point me in the correct direction...
My problem: Consider a type that has a custom type property - eg (using an mvc paradigm on a visual component) a tree (the view) which is seperated out from its tree model (the data model).
Now I've rooted around at the MSDN docs at design time support and various other hints but they don't seem to answer my question of being able, to say have an instance of the data model instantiated in a section of code and from the properties viewer at design time set a "model attribute" of the tree to point to that model instance.
eg:
Anyone got any helpful pointers or more clear examples of messing around in the CodeDom, Design time stuff and type converters?
Regards
I have been kicking around a problem (for a bit of fun) for the last few days and haven't made much progress and am wondering if anyone can point me in the correct direction...
My problem: Consider a type that has a custom type property - eg (using an mvc paradigm on a visual component) a tree (the view) which is seperated out from its tree model (the data model).
Now I've rooted around at the MSDN docs at design time support and various other hints but they don't seem to answer my question of being able, to say have an instance of the data model instantiated in a section of code and from the properties viewer at design time set a "model attribute" of the tree to point to that model instance.
eg:
C#:
class Foo
{
// a simple tree model for this example
TreeModel model = new TreeModel();
private void initialize() {
Tree treeView = new Tree();
// this is the line that I want the designer to be able to
// insert into my code from the properties view. The
// properties view should autodiscover that a TreeModel
// instance has been created in the class already and
// offer its name in a drop down combo
treeView.setModel( model );
}
}
Anyone got any helpful pointers or more clear examples of messing around in the CodeDom, Design time stuff and type converters?
Regards
Last edited: