dashboard-devexpress-dot-dashboardcommon-dot-dashboard-47550892.md
Provides access to the dashboard layout settings.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public LayoutOptions LayoutOptions { get; }
Public ReadOnly Property LayoutOptions As LayoutOptions
| Type | Description |
|---|---|
| LayoutOptions |
A LayoutOptions object that contains the dashboard layout settings.
|
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:
AutoThe height or width of a dashboard surface fits to content.FixedThe 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;
}
}
}
Imports DevExpress.DashboardCommon
Namespace WinDashboardlayout
Partial Public Class DesignerForm1
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
Public Sub New()
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
End Sub
End Class
End Namespace
See Also