Hello,

I have an application(Shell) that creates a new AppDomain, which dynamically loads another assembly, that contains a form(Cell).

I would like the Shell to be able to display the Cell (specifically the Shell has a DockingManager, and I would like to add the Cell form as a docking window, Crownwood Magic Library).

My question is, is there a way to use/share Forms between AppDomains?

Details below...

When I attempt to add the Cells form as a docking window, like so...

Content c = new Content(cell.Control, "Cell");
_dockManager.Contents.Add(c);
_dockManager.AddContentWithState(c, State.DockLeft);

(cell.Control being a property to the cells form) 

I get the following error:

"Serialization will not deserialize delegates to non-public methods."

And if I try to do this...

cell.Control.Parent = (Control)this;

(this being a Form)

I get the following error:

"The type System.Windows.Forms.Control+ControlCollection in Assembly System.Windows.Forms, is not marked as serializable."


So my question is, is there a way to use/share Forms between AppDomains?


Thanks!