Magic Library Docking problem

K

ka

I'm using Corwnwood.Magic library for docking in my application. My
application to let the users to create their screen look to show some
particular data.

I treid to dock my things in the way,
Left Side: ToolBox
Middle: WorkPanel
Right: Package Explorer + PropertyWindow

WorkToolBox, Package Explore, PrepertyWindow : derived from Content
WorkPanel : derived from Panel

Below is the code I used, but the WorkPanel is filling the whole main
window, even the area "covered by" toolbox and package explorer. How can i
dock in my expected way ?


_dockManager = new DockingManager(applicationHostService.MainForm,
VisualStyle.IDE);

//create the UI's for the design studio
_workToolBox = new WorkToolBox(_dockManager);
_workPanel = new WorkPanel();
_packageExplorer = new PackageExplorer(_dockManager);
_propertyWindow = new PropertyWindow(_dockManager);

//put in the work panel
applicationHostService.MainForm.Controls.Add(_workPanel);

//add the dockable contents
_dockManager.Contents.Add(_workToolBox);
_dockManager.Contents.Add(_packageExplorer);
_dockManager.Contents.Add(_propertyWindow);

//dock the toolbox
_dockManager.AddContentWithState(_workToolBox, State.DockLeft);

//dock the package explorer
WindowContent wc = _dockManager.AddContentWithState(_packageExplorer,
State.DockRight);

//dock the property window in the same window as the package explorer
_dockManager.AddContentToZone(_propertyWindow, wc.ParentZone, 1);

//docking contents cannot dock inside work panel
_dockManager.InnerControl = _workPanel;

//docking cannot be in work panel
_dockManager.InnerControl = _workPanel;

//load up the studio menu
XmlMenu menu = xmlGuiService.GetXmlMenu("StudioMenu");

//install studio menu
applicationHostService.InstallApplicationMenu(menu);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top