Blogs

SilverVlad

Silverlight Layout Control: Tabbed and Collapsible Groups - v2010 vol 1

     

Coming in DXperience v2010 vol 1 are two big new features of AgLayoutControl: tabbed groups and collapsible groups.

Tabbed Groups

Before you could make LayoutGroup look like an invisible (lookless) container or like a group box:

Silverlight Layout Control - Group and GroupBox Views

Now, just by changing one property, you can turn it into a tabbed group:

Silverlight Layout Control - Tabbed Group

Notice that every child of the tabbed LayoutGroup is now represented by a separate tab. The SelectedTabIndex property can be used to determine and set the active tab index.

There are two ways to define a tab's header:

  1. Header and HeaderTemplate properties - can be used for LayoutGroup that is a child of a tabbed group.
  2. TabHeader and TabHeaderTemplate attached properties - can be used for any type of control (including LayoutGroup) that is a child of a tabbed group.

I used the Header property for the first child (LayoutGroup) of my tabbed group and the TabHeader property for the second one (LayoutItem):

Silverlight Layout Control - Tabbed Group - Header and TabHeader

        <lc:LayoutControl Name="layoutControl1">
            <
lc:LayoutGroup Header="Information" Name="layoutGroup1" View="Tabs" VerticalAlignment
="Top">
                <
lc:LayoutGroup Orientation="Vertical" Header
="Personal Information">
                    <
lc:LayoutItem Label="First Name:" Name
="layoutItem1">
                        <
dxe:TextEdit Name
="textEdit1" />
                    </
lc:LayoutItem
>
                    <
lc:LayoutItem Label="Last Name:" Name
="layoutItem2">
                        <
dxe:TextEdit Name
="textEdit2" />
                    </
lc:LayoutItem
>
                    <
lc:LayoutItem Label="Age:" Name
="layoutItem4">
                        <
dxe:TextEdit Name
="textEdit4" />
                    </
lc:LayoutItem
>
                </
lc:LayoutGroup
>
                <
lc:LayoutItem Label="Address:" Name="layoutItem3" LabelPosition
="Top"
                              
VerticalAlignment="Stretch" lc:LayoutControl.TabHeader="Contact Information"
>
                    <
dxe:TextEdit Name
="textEdit3" />
                </
lc:LayoutItem
>
            </
lc:LayoutGroup
>
        </
lc:LayoutControl
>

Our DXTabControl is used internally to visually represent a tabbed group. You can use the TabsStyle and TabStyle properties of LayoutGroup to customize the look of this tab control and its tabs. Changing the same properties of LayoutControl will affect all tabbed groups inside this LayoutControl.

            <lc:LayoutGroup Header="Information" Name="layoutGroup1" View="Tabs" VerticalAlignment="Top">
                <lc:LayoutGroup.TabsStyle>
                    <Style TargetType="dx:DXTabControl">
                        <Setter Property="View">
                            <Setter.Value>
                                <dx:TabControlMultiLineView HeaderLocation="Right"/>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </lc:LayoutGroup.TabsStyle>

Silverlight Layout Control - Tabbed Group - Custom Style

And of course you can drag&drop controls inside a tab, from the tab and to the tab from any other LayoutGroup. This functionality is available at both design-time and runtime (via the customization mode).

Collapsible Groups

Now you can add the collapsing capability to any LayoutGroup represented as a group box (View = GroupBox). One property makes this happen: IsCollapsible = True. Another property - IsCollapsed - allows you to collapse/expand a group:

Silverlight Layout Control - Collapsible Groups

 

I hope these new features of LayoutControl will allow you to build complex UI even easier than before.

Published May 11 2010, 05:40 PM by Vlad Filyakov (DevExpress)
Bookmark and Share

Comments

 

Mathew Alex said:

Nice work as usual--

Is there is a WPF version ?

May 12, 2010 2:09 AM
 

Pietro Allegretti said:

Looks great,

are collapsible groups planned for WinForms version?

May 12, 2010 2:41 AM
 

Giannis said:

i've been waiting for this for a long time. great news.

May 12, 2010 2:46 AM
 

Brien King said:

Hmmmm... 2001 Vol 1.  I'd say you're a bit behind schedule... :)

May 12, 2010 12:53 PM
 

Vlad Filyakov (DevExpress) said:

Mathew, WPF version of LayoutControl will appear in v2010.1 as a beta and will be released in one of the minor updates. If you are a current subscriber you can already try it out.

May 12, 2010 12:54 PM
 

Vlad Filyakov (DevExpress) said:

Oops :-) Brien, thanks for noticing this. Fixed now.

May 12, 2010 1:07 PM
 

Twitter Trackbacks for Silverlight Layout Control: Tabbed and Collapsible Groups - v2010 vol 1 - SilverVlad [devexpress.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Silverlight Layout Control: Tabbed and Collapsible Groups - v2010 vol 1 - SilverVlad         [devexpress.com]        on Topsy.com

May 13, 2010 3:31 AM
 

SilverVlad said:

Now that Visual Studio 2010 is released you can start using its Silverlight designer. And, of course

May 20, 2010 12:16 AM
 

David Schneider said:

Can we change the orientation of the collapsable group so it opens from left to right instead of opening from top to bottom?

June 16, 2010 11:16 AM
 

Vlad Filyakov (DevExpress) said:

David, yes you can, but you will need to provide your own template/style for group boxes (via the GroupBoxStyle property) because the default one designed for the top to bottom opening.

June 20, 2010 6:44 PM
 

SilverVlad said:

Some of you already know that we merged our WPF and Silverlight source codebases. One of the benefits

September 7, 2010 2:29 PM
 

SilverVlad said:

Some of you already know that we merged our WPF and Silverlight source codebases. One of the benefits

September 7, 2010 2:37 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.