RichEditControl.AutoSizeMode Property

Gets or sets whether the RichEditControl resizes to accommodate the displayed text.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v20.1.dll

Declaration

[DXCategory("Appearance")]
[DefaultValue(AutoSizeMode.None)]
public AutoSizeMode AutoSizeMode { get; set; }
<DXCategory("Appearance")>
<DefaultValue(AutoSizeMode.None)>
Public Property AutoSizeMode As AutoSizeMode

Property Value

Type Default Description
AutoSizeMode

None

An AutoSizeMode enumeration value.

Remarks

Set the AutoSizeMode property to any value other than None to update the control's dimension(s) according to its content.

Set the control's MaximumSize property before the AutoSizeMode property to set a limit so that the RichEditControl cannot expand more than the specified value.

IMPORTANT

The Auto-size feature works only for the Simple View. Set the RichEditControl.ActiveViewType property to the RichEditViewType.Simple value to switch to the Simple view.

richEditControl.ActiveViewType = RichEditViewType.Simple;
richEditControl.AutoSizeMode = DevExpress.XtraRichEdit.AutoSizeMode.Horizontal;

Implements

See Also