XtraLayoutControl feature preview: Expanded groups

WinForms Team Blog
04 May 2006

The XtraLayoutControl has LayoutControlGroup items which represent Group boxes. In v6.2.x the LayoutControlGroup will be able to expand / collapse its client area. Let’s call this feature – expanded groups.  This article demonstrates how to unlock the Expanded groups feature in the XtraLayoutControl v6.1.4.

Warning: The expanded groups feature will only be officially supported from v6.2.x. The names of properties and methods in the code below are subject to change.

Expanded groups functionality will be implemented in two additional fields in the LayoutControlGroup: Expanded, IsExpandedButonVisible. To unlock these properties you should inherit from the XtraLayoutControl and LayoutControlGroup as below

    class MyLayoutGroup : LayoutControlGroup {

        protected override LayoutGroup CreateLayoutGroup() {

            return new MyLayoutGroup();


        public bool IsExpandButtonVisible {

            get {

                return isExpandedButtonVisibleInternal;


            set {

                isExpandedButtonVisibleInternal = value;

                shouldResetBorderInfo = true; ComplexUpdate();



        public bool IsExpanded {

            get { return Expanded; }

            set { Expanded = value; }



    class MyLayoutControl : LayoutControl {

        protected override LayoutControlGroup CreateRoot() {

            return new MyLayoutGroup();



Here are steps by step instruction to unlock the expanded groups feature.

-         Create a new WindowsApplication form the VS2005.

-         Add a new class to the WindowsApplication.

-         Insert MyLayoutGroup and MyLayoutControl code to the new created file

-         Rebuild

-         Find MyLayoutControl in a WindowsApplication1Componets tab in the Toolbox.


If the above steps are completed successfully, you will be able to place a         MyLayoutControl on the form and set its IsExpandButtonVisible to true for LayoutGroups. The result is shown below.





The benefits of this feature are evident. You can replace all the NavBar controls in your application with the XtraLayoutControl and take advantage of all the XtraLayoutControl's features:

-         runtime layout serialization

-         runtime user customization

-         appropriate and customizable taborder

-         total flexibility in tuning the layout (padding, spacing, alignment)

And many other cool features


The expanded groups feature is currently being tested. Here are the known problems

-         Not supported by skin based paintstyles

-         DesignTime support is not fully implemented


Feel free to send us your ideas, suggestions and bugs related to this coming feature.


Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.