BaseLayoutItem.HeaderBarContainerControlName Property
Gets or sets the name of the bar container, used to embed bars from the DXBars library. This is a dependency property.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
Property Value
Type | Description |
---|---|
String | A string that specifies the name of the bar container. |
Remarks
Each dock panel contains a bar container at the top edge that accepts bars from the DXBars library. This allows you to display bars within dock panels. To display a bar within a dock panel, do the following:
- Assign a unique name to the dock panel’s bar container via the HeaderBarContainerControlName property.
- Assign the same name to the Bar.DockInfo.ContainerName (BarDockInfo.ContainerName) property.
Note
The HeaderBarContainerControlName property is supported for LayoutPanel and DocumentPanel objects.
Example
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.
<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>