Back to Devexpress

BaseLayoutItem.ItemHeight Property

wpf-devexpress-dot-xpf-dot-docking-dot-baselayoutitem-65bf1c54.md

latest6.8 KB
Original Source

BaseLayoutItem.ItemHeight Property

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

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public GridLength ItemHeight { get; set; }
vb
Public Property ItemHeight As GridLength

Property Value

TypeDescription
GridLength

The height of the BaseLayoutItem object.

|

Remarks

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

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

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

Note

Use the MDISize property to specify a DocumentPanel size.

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

xaml
<Window ...
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <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>
            <dxdo:DocumentPanel Caption="Document2"/>
              <!-- ... -->
            </dxdo:DocumentGroup>
      </dxdo:LayoutGroup>
      <dxdo:TabbedGroup>
        <dxdo:LayoutPanel Caption="Solution Explorer"/>
        <dxdo:LayoutPanel Caption="Properties"/>
      </dxdo:TabbedGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
<Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemHeight 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.

wpf-dock-layout-manager-define-prism-regions-for-dock-layout-manager-elements/CS/PrismOnDXDocking/Shell.xaml#L77

xml
<dxdo:LayoutGroup Orientation="Vertical" >
    <dxdo:LayoutGroup ItemHeight="0.7*" Orientation="Horizontal">
        <dxdo:LayoutGroup Name="leftGroup" prism:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.LeftRegion}" ItemWidth="0.2*" />

wpf-dock-layout-manager-limit-layout-group-customization-at-runtime/CS/DXDockingForLayoutPurposes/MainWindow.xaml#L41

xml
<dxd:LayoutGroup Name="victimHomeLayoutGroup" GroupBorderStyle="GroupBox" ShowCaption="True" Caption="Home Location" Orientation="Vertical" VerticalAlignment="Top" local:Helper.DisableCrossingGroupBoundaries="True">
    <dxd:LayoutGroup ItemHeight="0.44*" Caption="lgAddress">
        <dxd:LayoutControlItem Name="victimHomeAddress" Caption="Address" VerticalAlignment="Top">

wpf-docklayoutmanager-serialize-docklayoutmanager-when-tabbeddocumentuiservice-is-used/CS/MainWindow.xaml#L19

xml
<dxdo:LayoutGroup x:Name="RootGroup" Orientation="Vertical">
    <dxdo:LayoutPanel x:Name="lPanel1" Caption="{Binding StrValue}" ItemHeight="Auto">
        <Grid>

wpf-dock-layout-manager-serialize-custom-panels-and-their-properties/CS/DX_WPF_Application10/MainWindow.xaml#L21

xml
<dxd:LayoutGroup x:Name="group1" Orientation="Vertical" ItemWidth="3*">
    <local:MyCustomPanel x:Name="panel2" Caption="MainView" ItemHeight="3*" CaptionImage="Images/Icons/MainView.png">
        <dxg:GridControl AutoPopulateColumns="True" ShowBorder="False">

wpf-docklayoutmanager-use-services-that-implement-the-idocumentmanagerservice/CS/DXDocumentUIServiceSample/MainWindow.xaml#L44

xml
Caption="Documents"
                        ItemHeight="*" />
</dxdo:LayoutGroup>

See Also

ItemWidth

BaseLayoutItem Class

BaseLayoutItem Members

DevExpress.Xpf.Docking Namespace