ManagedContent : Window

Sep 16, 2008 at 8:54 AM
Salam (== peace to you all),

Can you please advice me on the best way to change the base class of ManagedContent to Window rather than ContentControl? And if this is possible what are the side effects please?

I need to do so so that I can add controls dynamically to my application tool windows and register them with the ManagedContent window not the main window, otherwise I would get duplicate name registration when constructing multiple instances of the same tool window.

Another reason is I want to keep all the event-to-eventhandlers binding alive when floating the tool windows.

All ideas are greatly appreciated.

ThanQ
God > infinity
Sep 16, 2008 at 9:53 AM
Sorry but you can't derive ManagedContent from Window. Everything won't work!
Which kind of controls are you instancing (WPF or WinForms)?

You can get a working example on how to create controls at runtime for tool windows in SharpDevelop 4 code here.

Cheers!