Our WinForms component suite includes a feature-complete Dock Manager component. It was designed to help you create panels within your app and to dock those panels to a form’s edge or float the panel as necessary.
From a layout perspective, our Dock Manager is quite flexible – it’s only limitation is that panels cannot be docked to the center of a given container.
To populate the central region of a form or UserControl, you need to add a different component to your form – the DevExpress Document Manager. This component works with its own child objects (Documents), but it accepts our Dock Manager’s panels as well.
The following list summarizes the major benefits of our Document Manager:
- By using the Document Manager, you can separate the central “content” region from form edges;
- The Document Manager gives you the ability to load Document content dynamically. Dynamic content loading improves application performance.
- The Document Manager can scan your application for UserControls and create Documents for each automatically;
- The Document Manager can be used in non-Document Mode for non-MDI (multi-document interface) apps.
If you are not interested in any of the benefits outlined above, but still wish to dock panels to the center of your form, we have some good news for you. In our next major release (v19.2), you’ll be able to dock DockManager panels to the center of your container.
This new behavior will be available by default. You will be able to revert to the old behavior by using disabling the AllowDockToCenter property (DockManager.DockingOptions settings group). If you wish to retain the option but prevent users from docking panels to the central region, you’ll simply handle the ShowingDockGuides event.
1
2
3
4
5
6
7
8
usingDevExpress.XtraBars.Docking2010.Customization;
//. . .
privatevoidDockManager1_ShowingDockGuides(objectsender,
ShowingDockGuidesEventArgse)
{
if (e.Panel == panToolbox&& e.TargetPanel == null)
e.Configuration.Disable(DockGuide.Center);
}
Your Feedback Matters
This blog is the first in a series of posts related to v19.2 features. Our goal is to share as much information as possible so you can express your thoughts and tell us how you’d like to see us improve our next release. If you’re using our DockManager or DocumentManager, we’d love to hear your feedback. Do you currently allow users to dock panels to the center of your form?