Skip to main content
All docs
V21.2

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to dock a panel to another panel in code

This example shows how to dock a panel in code using the methods provided by the DockLayoutManager.DockController object. In the Button1_Click event handler, a panel is docked to another panel forming a split container (two panels are displayed side by side). In the Button2_Click event handler, a panel is docked to another panel forming a tabbed group.

View Example

Private Sub Button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Dock the Properties panel at the bottom of the Output panel.
    dockManager1.DockController.Dock(paneProperties, paneOutput, DockType.Bottom)
End Sub

Private Sub Button2_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Dock the Properties panel to the Output panel, creating a tab container.
    dockManager1.DockController.Dock(paneProperties, paneOutput, DockType.Fill)
End Sub