BaseLayoutItem.Caption Property

Gets or sets the layout item’s caption.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v21.1.dll

Declaration

public object Caption { get; set; }

Property Value

Type Description
Object

A string value that specifies 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>

DXDocking Captions And TabCaptions

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 item Caption‘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.
See Also