Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

LayoutGroup.GroupBorderStyle Property

Gets or sets the group’s border style. This option is in effect when the LayoutGroup is used to combine layout items. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

#Declaration

public virtual GroupBorderStyle GroupBorderStyle { get; set; }

#Property Value

Type Description
GroupBorderStyle

A GroupBorderStyle value that specifies the group’s border style.

Available values:

Name Description
NoBorder

A container has no borders.

Group

A container is displayed with borders and a caption.

LayoutGroup_GroupBorderStyle_Group

GroupBox

A container is displayed with borders and a title bar.

LayoutGroup_GroupBorderStyle_GroupBox

Tabbed

Child items are displayed as tabs.

LayoutGroup_GroupBorderStyle_Tabbed

#Remarks

Set the BaseLayoutItem.ShowCaption property to false to hide the group’s caption that the BaseLayoutItem.Caption property specifies.

You can increase indents for groups without borders. Refer to the LayoutGroup.HasAccent for more information.

Note

Group border styles can vary based on the application’s DevExpress Theme.

#Expand a LayoutGroup on the TitleBar Click

The following code snippet expands the myGroup LayoutGroup when you click its group box title:

<Window ...
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
    <dxdo:DockLayoutManager >
        <dxdo:LayoutGroup Orientation="Vertical" >
            <dxdo:LayoutGroup Name="myGroup" GroupBorderStyle="GroupBox" Caption="Group" ShowCaption="True"  PreviewMouseLeftButtonUp="myGroup_PreviewMouseLeftButtonUp">
                <dxdo:LayoutControlItem>
                    <dxe:TextEdit EditValue="Text"/>
                </dxdo:LayoutControlItem>
                <dxdo:LayoutGroup.CaptionTemplate>
                    <DataTemplate>
                        <TextBlock Background="White" PreviewMouseLeftButtonDown="TextBlock_PreviewMouseLeftButtonDown" Text="{Binding}" />
                    </DataTemplate>
                </dxdo:LayoutGroup.CaptionTemplate>
            </dxdo:LayoutGroup>
            <dxdo:LayoutPanel/>
        </dxdo:LayoutGroup>
    </dxdo:DockLayoutManager>

</Window>
using System;
using DevExpress.Xpf.Docking;

// ...

    private void myGroup_PreviewMouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e) {
        LayoutGroup layoutGroup = (LayoutGroup)sender;
        if (layoutGroup != null) {
            if (!layoutGroup.IsExpanded) {
                layoutGroup.Expanded = true;
                e.Handled = true;
            }
        }
    }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GroupBorderStyle 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.

See Also