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.v18.2.dll
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 DXBars 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 Bar.DockInfo.ContainerName property. This name matches the name of the LayoutPanel.HeaderBarContainerControlName property’s value.
Note
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>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the HeaderBarContainerControlName property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.