Back to Devexpress

LabelControl.RealAutoSizeMode Property

windowsforms-devexpress-dot-xtraeditors-dot-labelcontrol-92dd25e1.md

latest2.9 KB
Original Source

LabelControl.RealAutoSizeMode Property

Gets the actual auto-size mode.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public virtual LabelAutoSizeMode RealAutoSizeMode { get; }
vb
<Browsable(False)>
Public Overridable ReadOnly Property RealAutoSizeMode As LabelAutoSizeMode

Property Value

TypeDescription
LabelAutoSizeMode

A LabelAutoSizeMode value.

|

Available values:

NameDescription
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

AutoSizeMode

LabelControl Class

LabelControl Members

DevExpress.XtraEditors Namespace