Hi,
Does anybody know of any good resources for learning the intricacies if IDesignerHost?
I about halfway to where I want to be, but I can't implement my main feature: pre-specified individual controls.
E.g. Our configurable dialog has two possible button controls, OK and Cancel. I want to show the user a list of possible controls that will contain an entry for each of these buttons. The ToolboxItem class only handles control
types, so I can only specify 'add a button', and not 'add the OK button'. I have tried deriving my own ToolboxItem based classes, but then the built-in drag drop between the toolbox service and the designer host stops working.
It's starting to drive me nuts. Configuration is a major feature of our product, so I
have to find a way to do this.
Any resources or guidance would be very much appreciated.
Dr Herbie
-
-
Sorry, I've not played with this before, but I have seen this article: Hosting Windows Forms Designers which talks about using IDesignerHost.
Don't know if you've seen it, or even whether or not it'll actually be any use to you though. -
Thanks, but I found that one already (I actually found it on two different sites).
I also found an MSDN article which covered pretty much the same ground.
I used both of these to get as far as I got so far, but now I'm bogged down and motivation is starting to flag.
-
OK, progress.
For the drag and drop to work the derived ToolboxItem class must have proper serialization support and the IToolboxService DeserializeToolboxItem method must deserialise the correct (derived) type.
Web site that helped was: Egghead Cafe
Herbie
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.