Back to Devexpress

Length.UnitValue Property

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-widget-dot-length-e83fab8e.md

latest3.5 KB
Original Source

Length.UnitValue Property

Gets or sets the numeric representation for the length of a Stack Group, RowDefinition or ColumnDefinition.

Namespace : DevExpress.XtraBars.Docking2010.Views.Widget

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDefaultDescription
Double1

A Double value that specifies the Stack Group (RowDefinition, ColumnDefinition) length.

|

Remarks

The UnitValue property specifies either the precise number of pixels the object occupies, or this object’s relative length multiplier. The option chosen depends on the Length.UnitType property value. See the Widget View topic for details.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UnitValue 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-create-widgetview-runtime/CS/WidgetViewExample/Form1.cs#L48

csharp
group1.Length.UnitType = LengthUnitType.Star;
group1.Length.UnitValue = 2;
view.StackGroups.AddRange(new StackGroup[] { group1, group2 });

winforms-create-widgetview-runtime/VB/WidgetViewExample/Form1.vb#L48

vb
group1.Length.UnitType = LengthUnitType.Star
group1.Length.UnitValue = 2
view.StackGroups.AddRange(New StackGroup() {group1, group2})

See Also

UnitType

Widget View

Length Class

Length Members

DevExpress.XtraBars.Docking2010.Views.Widget Namespace