Dynamically dock content to another content

Jun 12, 2012 at 11:13 AM

How can I dynamically create and dock a new DockableContent?

Right now I have something like this:

var dockableContent = new DockableContent()
{
     Name = "mynewContent",
     Title = "New Dock Content!"
 };
 dockableContent.Content = new UserControl();
 dockableContent.Show(dockManager);
 
 But this docks the new window in the application. What I want is to dock it inside an already existing DockableContent panel without having to use the mouse.
 Something like this:
 
 dockableContent.Content = new UserControl();
 dockableContent.Show(existingDockableContent);
 
Any way to do this?