Skip to main content

BaseLayoutItem.ItemWidth Property

Gets or sets the width for the specified BaseLayoutItem object. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking


public GridLength ItemWidth { get; set; }

Property Value

Type Description

A GridLength object, which is the width of the specified BaseLayoutItem object.


This property does not allow you to specify the width of the following items:

If a LayoutPanel object is positioned within an AutoHideGroup, the panel’s ItemWidth property is not updated when an end user resizes the auto-hide group horizontally at runtime.

When items are horizontally lined up inside a LayoutGroup (the LayoutGroup.Orientation property is set to Horizontal), you can use the ItemWidth property to change the width of individual items, while the item height (BaseLayoutItem.ItemHeight) cannot be changed in this case.


Use the MDISize property to specify the DocumentPanel size.

The following code sample sets the TopGroup height to 150 pixels (ItemHeight property), the DocumentGroup width to 3/4 of the window width, and the Toolbox width to 1/4 of the window width (ItemWidth property):

<dx:ThemedWindow ...
            <dxdo:LayoutGroup x:Name="LayoutRoot" Orientation="Vertical">
                <dxdo:LayoutGroup x:Name="TopGroup" ItemHeight="150">
                    <dxdo:LayoutPanel Caption="Toolbox" ItemWidth="*"/>
                    <dxdo:DocumentGroup ItemWidth="3*">
                        <dxdo:DocumentPanel Caption="Document1">
                          <!-- ... -->
                        <dxdo:DocumentPanel Caption="Document2"/>
                          <!-- ... -->
                    <dxdo:LayoutPanel Caption="Solution Explorer"/>
                    <dxdo:LayoutPanel Caption="Properties"/>

DockLayoutManager - ItemHeight and ItemWidth Properties

See Also