All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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.v20.2.dll

Declaration

[XtraSerializableProperty]
[DefaultValue(SimpleLabelAutoSizeMode.Default)]
[DXCategory("Layout")]
public SimpleLabelAutoSizeMode AutoSizeMode { get; set; }
<XtraSerializableProperty>
<DefaultValue(SimpleLabelAutoSizeMode.Default)>
<DXCategory("Layout")>
Public Property AutoSizeMode As SimpleLabelAutoSizeMode

Property Value

Type Default Description
SimpleLabelAutoSizeMode

Default

A value that specifies whether the maximum width, height, or both are calculated automatically.

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.

See Also