Back to Devexpress

LayoutOptions Class

dashboard-devexpress-dot-dashboardcommon-3588ae57.md

latest3.8 KB
Original Source

LayoutOptions Class

Contains dashboard layout settings.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public class LayoutOptions :
    IDisposable
vb
Public Class LayoutOptions
    Implements IDisposable

The following members return LayoutOptions objects:

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

Inheritance

Object LayoutOptions

See Also

LayoutOptions Members

DevExpress.DashboardCommon Namespace