SimpleLabelItem.AutoSizeMode Property
Gets or sets whether the item’s maximum width, height, or both are calculated automatically based on the item’s content. This property is only in effect if the SizeConstraintsType property is set to Default. The Default value is equivalent to Vertical.
Namespace: DevExpress.XtraLayout
Assembly: DevExpress.XtraLayout.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(SimpleLabelAutoSizeMode.Default)]
[DXCategory("Layout")]
[XtraSerializableProperty]
public SimpleLabelAutoSizeMode AutoSizeMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
SimpleLabelAutoSizeMode | Default | A value that specifies whether the maximum width, height, or both are calculated automatically. |
Available values:
Name | Description |
---|---|
Default | The mode is not specified explicitly. Enables the Vertical mode. |
None | The item’s maximum width and height are not calculated automatically based on the item’s content. The maximum width and height are not limited. |
Horizontal | The item’s maximum width is calculated automatically based on the item’s content. |
Vertical | The item’s maximum height is calculated automatically based on the item’s content. |
Both | The item’s maximum width and height are calculated automatically based on the item’s content. |
Remarks
If the SizeConstraintsType property is not set to Default, the MinSize and MaxSize properties specify the item’s minimum and maximum width and height.
If the SizeConstraintsType property is set to Default, the maximum width and height depend on the AutoSizeMode
property value:
- Default or Vertical — the item’s maximum height is calculated automatically based on the content’s height.
- Horizontal — the item’s maximum width is calculated automatically based on the content’s width.
- Both — the item’s maximum width and height are calculated automatically based on the content.
- None — the maximum width and height are not specified.
See the following topic for more information about size constraints: Size and Alignment.