How to embed a bar into a dock panel
This example shows how to embed a bar from the Bars library into a dock panel.
Dock panels embed bar containers at their top edges, allowing bars to be displayed in these containers. To add a bar to a dock panel's bar container, the name of the target bar container is assigned to the BarDockInfo.ContainerName property. This name matches the name of the LayoutPanel.HeaderBarContainerControlName property's value.
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-embed-a-bar-into-a-dock-panel-e1610.
<dxb:Bar x:Name="bar1" Caption="Bar 1"> <dxb:Bar.DockInfo> <dxb:BarDockInfo ContainerName="paneBarContainer1" /> </dxb:Bar.DockInfo> <dxdo:LayoutPanel x:Name="paneToolbox1" Caption="Toolbox1" HeaderBarContainerControlName="paneBarContainer1"> </dxdo:LayoutPanel>