BaseLayoutItem.Caption Property
Gets or sets the layout item’s caption.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
Property Value
Type | Description |
---|---|
Object | The layout item’s caption. |
Remarks
The Caption is displayed in the BaseLayoutItem‘s header.
Availability
The Caption is displayed when the item’s ShowCaption inherited property is true
.
In Layout Groups
Set the LayoutGroup GroupBorderStyle property to GroupBorderStyle.Group, GroupBorderStyle.GroupBox, or GroupBorderStyle.Tabbed to display the Layout Group’s Caption.
Tabbed Group Captions
When the BaseLayoutItem.IsTabPage is true
, the Caption object is duplicated in the tab area. You can set a different tab’s Caption with the BaseLayoutItem.TabCaption property.
The following code sample sets the LayoutPanel‘s Caption and BaseLayoutItem.TabCaption properties.
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup>
<dxdo:TabbedGroup DestroyOnClosingChildren="True" >
<dxdo:LayoutPanel
Caption="Personal"
CaptionLocation="Top"
TabCaption="Info">
...
</dxdo:LayoutPanel>
<dxdo:LayoutPanel Caption="Position" />
</dxdo:TabbedGroup>
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Window>
Customize Captions
Property | Description |
---|---|
CaptionImage | Gets or sets the image displayed within the item’s Caption. This is a dependency property. |
CaptionFormat | Gets or sets the format string used to format the layout item’s caption. This is a dependency property. |
CaptionLocation and CaptionHorizontalAlignment | Specify the Caption item’s position and horizontal alignment. |
CaptionTemplate and CaptionTemplateSelector | Specify the Caption appearance. |
CaptionWidth | Gets or sets the width of the item’s Caption area. This is a dependency property. |
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Caption 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.