XtraBars - Docking Functionality
In this lesson, you will learn the basics of the docking functionality provided by the XtraBars Library. I’ll show you how to create a layout, which is similar to the layout used in Microsoft Visual Studio.
- To provide docking functionality for our form, I drag and drop a DockManager component onto it.
- Now I’ll need to create dock panels.
- To do this, I’ll use the functionality provided by the DockManager.
- I’ll select it and add a new panel by clicking the “Add Panel” link.
- Once created, this dock panel is automatically added to the DockManager’s Panels Collection.
- I drag the panel by its caption, and dock it to the form’s right edge.
- Small markers indicate the sides where the panel can be docked.
- In the same way, I’ll add another panel, and locate it above the first.
- Now let’s create another panel, a third one, and add it to the form’s bottom edge.
- Finally, I’ll create a fourth panel and drop it onto the third panel.
- As a result of this, the third and fourth panels are displayed as tabbed pages.
- Once the fourth panel has been dropped, a container panel has automatically been created for me.
- This panel can be selected by clicking its caption, and its settings will be displayed within the properties window.
- Now I’ll proceed with the customization of the dock panels themselves.
- First I assign the source of the images to the DockManager’s Images property.
- Then, I can select each “dock panel” in turn, specify its caption, and associate the corresponding image with it by using the ImageIndex property.
- Note that images are only displayed when the dock panels are auto-hidden or when they represent tabbed pages.
- I proceed to the second panel, let it be “Solution Explorer” and I’ll select the corresponding image.
- Then, I can do the same with the third panel.
- Let this one be called “Command Window”.
- Once assigned, the image will be displayed within the tab header.
- Finally, I’ll select the fourth panel, edit its caption, and set its ImageIndex value.
- After that, I’m done with the dock panel’s customization for this particular demo.
- I can now run the application to see the result.
- I can change the docking layout by using drag and drop.
- I can maximize dock panels and unnecessary panels can be closed.
- Or they can be auto-hidden.
For detailed information on the docking functionality within XtraBars, please refer to the XtraBars documentation (