Skip to main content

LabelControl.RealAutoSizeMode Property

Gets the actual auto-size mode.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
public virtual LabelAutoSizeMode RealAutoSizeMode { get; }

Property Value

Type Description
LabelAutoSizeMode

A LabelAutoSizeMode value.

Available values:

Name Description
Default

In Visual Studio 2002 and 2003, the same as the None option.

In Visual Studio 2005 and more recent versions, the same as the Horizontal option.

None

Disables the auto size mode. An end-user is allowed to change both the label’s width and height.

Horizontal

The label is automatically resized to display its entire contents horizontally. The label’s size depends only on the length of the text and the font settings, the label cannot be resized by an end-user.

Vertical

The label’s height is automatically changed to display its entire contents. In this instance, an end-user can change the label’s width while its height is automatically adjusted to fit the label’s text.

Remarks

The LabelControl‘s auto-size feature can be enabled via the LabelControl.AutoSizeMode property. By default, this property is set to LabelAutoSizeMode.Default. In this instance, the control’s behavior differs in VS2002/2003 and VS2005, and the actual auto-size mode is determined by the RealAutoSizeMode property. In VS2002/2003, in Default mode the auto-size feature is disabled, and the RealAutoSizeMode property returns the LabelAutoSizeMode.None value. In VS2005, in Default mode the horizontal auto-size feature is enabled, and the RealAutoSizeMode property returns the LabelAutoSizeMode.Horizontal value.

See Also