Back to Devexpress

Dashboard.LayoutOptions Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboard-47550892.md

latest3.8 KB
Original Source

Dashboard.LayoutOptions Property

Provides access to the dashboard layout settings.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public LayoutOptions LayoutOptions { get; }
vb
Public ReadOnly Property LayoutOptions As LayoutOptions

Property Value

TypeDescription
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:

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:

csharp
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;
        }
    }
}
vb
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

Dashboard Class

Dashboard Members

DevExpress.DashboardCommon Namespace