Skip to main content
A newer version of this page is available. .
All docs
V21.2

Dashboard.LayoutOptions Property

Provides access to the dashboard layout settings.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v21.2.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

public LayoutOptions LayoutOptions { get; }

Property Value

Type Description
LayoutOptions

A LayoutOptions object that contains the dashboard layout settings.

Remarks

The LayoutOptions property allows you to access the LayoutOptions object. You can use the Height and Width properties to adjust the dashboard layout. These properties return the LayoutDimensionOptions object that contains settings for the corresponding dimensions of the dashboard surface.

The LayoutDimensionOptions.Mode property allows you to specify whether a dashboard surface’s height or width is fixed or adjusted to fit its content:

Auto
The height or width of a dashboard surface fits to content.
Fixed
The height or width of a dashboard surface is set in pixels according to the LayoutDimensionOptions.Value property.

You can also mix layout modes for each dimension: for example, set the Auto value for width and Fixed for height to scroll dashboard layout vertically.

The following code snippet specifies the height and aligns the dashboard’s content horizontally:

using DevExpress.DashboardCommon;
namespace WinDashboardlayout {
    public partial class DesignerForm1 : DevExpress.XtraBars.Ribbon.RibbonForm {
        public DesignerForm1() {
            InitializeComponent();
            dashboardDesigner.CreateRibbon();
            dashboardDesigner.LoadDashboard(@"Dashboards\dashboard1.xml");
            dashboardDesigner.Dashboard.LayoutOptions.Width.Mode = LayoutDimensionMode.Auto;
            dashboardDesigner.Dashboard.LayoutOptions.Height.Mode = LayoutDimensionMode.Fixed;
            dashboardDesigner.Dashboard.LayoutOptions.Height.Value = 1080;
        }
    }
}
See Also