Skip to main content

BaseLayoutItem.ControlBoxContentTemplate Property

Gets or sets the template that defines how the object assigned to the BaseLayoutItem.ControlBoxContent property is displayed onscreen. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.dll

NuGet Package: DevExpress.Wpf.Docking

Declaration

public DataTemplate ControlBoxContentTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object that defines the control box region’s presentation.

Remarks

The following code sample displays the Open button at the panel header’s right (ControlBoxContentTemplate property) and the X button next to the tab caption (CaptionTemplate property):

<Window ...
    xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
    <dxdo:DockLayoutManager>
        <dxdo:LayoutGroup>
            <dxdo:TabbedGroup>
                <dxdo:LayoutPanel Caption="Error List">
                    <dxdo:LayoutPanel.ControlBoxContentTemplate>
                        <DataTemplate>
                            <Button Content="Open" />
                        </DataTemplate>
                    </dxdo:LayoutPanel.ControlBoxContentTemplate>
                    <dxdo:LayoutPanel.CaptionTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding}" />
                                <Button Content="X" />
                            </StackPanel>
                        </DataTemplate>
                    </dxdo:LayoutPanel.CaptionTemplate>
                </dxdo:LayoutPanel>
                <dxdo:LayoutPanel Caption="Solution Explorer" />
                <dxdo:LayoutPanel Caption="Find Replace" />
            </dxdo:TabbedGroup>
        </dxdo:LayoutGroup>
    </dxdo:DockLayoutManager>
</Window>

DockLayoutManager - Caption Buttons

See Also