Back to Devexpress

DashboardLayoutNode.Weight Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboardlayoutnode.md

latest2.9 KB
Original Source

DashboardLayoutNode.Weight Property

Gets or sets the relative size of the layout item/group.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
[DefaultValue(1)]
public double Weight { get; set; }
vb
<DefaultValue(1)>
Public Property Weight As Double

Property Value

TypeDefaultDescription
Double1

A Double value that specifies the relative size of the layout item/group.

|

Remarks

The Weight property specifies the size of the layout item/group relative to the total weight of the parent’s layout items/groups.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Weight 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.

winforms-dashboard-window-calculation-example/CS/WindowCalculationExample/TabPageLoadHelper.cs#L80

csharp
{
    copyTo.Weight = copyFrom.Weight;
    if ((copyTo is DashboardLayoutGroup) && (copyFrom is DashboardLayoutGroup))

winforms-dashboard-window-calculation-example/VB/WindowCalculationExample/TabPageLoadHelper.vb#L97

vb
Private Sub LayoutCopy(ByVal copyFrom As DashboardLayoutNode, ByVal copyTo As DashboardLayoutNode)
    copyTo.Weight = copyFrom.Weight
    If(TypeOf copyTo Is DashboardLayoutGroup) AndAlso (TypeOf copyFrom Is DashboardLayoutGroup) Then CType(copyTo, DashboardLayoutGroup).Orientation = CType(copyFrom, DashboardLayoutGroup).Orientation

See Also

DashboardLayoutNode Class

DashboardLayoutNode Members

DevExpress.DashboardCommon Namespace