

- UNDOCK MAIN EDITOR SCREEN VISUAL STUDIO 2018 HOW TO
- UNDOCK MAIN EDITOR SCREEN VISUAL STUDIO 2018 CODE
UNDOCK MAIN EDITOR SCREEN VISUAL STUDIO 2018 CODE
Docking a panel to another panel via code will also create one of these containers.Ī split container is a dock panel which displays its child panels side by side (either vertically or horizontally). When an end-user docks a panel to another panel using drag-and-drop operations, a tab container or split container is created depending upon the point at which the drag-and-drop ends. It’s dock parameter should be set to DockingStyle.Left and its index to 0. To dock panel3 so that it occupies the form’s left edge entirely the DockPanel.DockTo overload can be used.
UNDOCK MAIN EDITOR SCREEN VISUAL STUDIO 2018 HOW TO
The following example shows how to dock an existing panel to the form at a specific position.Īssume that two dock panels are docked to the form as follows: As a result, the panels will be re-arranged to reflect the changes. The indexes of the subsequent panels in the collection will be increased by 1. This panel’s DockPanel.Index will be set to the specified index. The DockPanel.DockTo overload which takes the index parameter simply places the specified panel within the DockManager.RootPanels collection at the position specified by the index. The index of Panel 3 is 2 and thus it is docked to the corresponding (right) edge of the region not occupied by Panel 1 and Panel 2. The following image shows a more complex example of the layout of the panels within the form. panel2 will have an index of 1 and will occupy the corresponding (right) edge within the region not occupied by the first panel. In this case panel1 will be added at the first position in the collection, it’s index will be equal to 0, and it will occupy the edge it’s docked to (the bottom edge) entirely.

The DockManager.AddPanel method merely adds a new panel at the end of the DockManager.RootPanels collection.Īssume that in the above example the DockManager.RootPanels collection is empty before the panels are created and docked to the form. A panel which occupies any edge of this region entirely has an index of 1, etc. Other panels can be docked only within the region not occupied by the first panel. The panel which occupies one of the form’s edges entirely has the smallest index ( 0).

Assuming that the collection doesn’t include floating panels, the panels docked to the form are indexed as follows. It defines the panel’s position within the DockManager.RootPanels collection.įor panels docked to the form, the panels’ indexes also defines the layout of the panels within the form. Note that this collection doesn’t include visible panels which are docked to other panels ( tab containers or split containers).Įach panel in this collection is identified by a zero-based unique index which is specified by the DockPanel.Index property. Create a panel and dock it to the right.ĭockPanel panel2 = dockManager1.AddPanel(DockingStyle.Right) ĭim panel1 As DockPanel = dockManager1.AddPanel(DockingStyle.Bottom)ĭim panel2 As DockPanel = dockManager1.AddPanel(DockingStyle.Right)Īll the visible floating panels and panels docked to the form are called root panels and these can be accessed via the DockManager.RootPanels collection. Create a panel and dock it to the bottom.ĭockPanel panel1 = dockManager1.AddPanel(DockingStyle.Bottom) In the following code two panels are created and docked to the form’s bottom and right edges respectively: Usage: panel.DockTo(dockStyle) panel.DockTo(dockStyle, index) Usage: newPanel = dockManager1.AddPanel(dockStyle) ĭockPanel.DockTo method overloads which takes a dock parameter of the DockingStyle type.Īllow existing panels to be docked to the form. You can use the following methods to dock a panel to a form:Ĭreates and docks a new panel to the form. The panel can also be docked at the form’s center (fill the form’s empty space not occupied by other docked controls/panels), provided that the property is enabled. The current topic provides the following subsections:Ī dock panel can be docked to the top, left, bottom or right edge of a DockManager’s container (a form or user control). This can be useful if you create dock panels via code or change the layout of dock panels and then wish to revert to the saved layout. The Saving and Restoring the Layout of Dock Panels topic explains how to save and restore the layout of dock panels. To find out how to create and destroy panels, and add visual controls to panels in code, see the Creating and Destroying Dock Panels document. This topic describes how to perform these docking operations in code. Dock panels can be docked to a form (user control), other dock panels or they can float.
