Skip to main content

RepositoryItem.AutoHeight Property

Gets or sets a value specifying whether the editor’s height is calculated automatically to fit the editor’s content.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
public virtual bool AutoHeight { get; set; }

Property Value

Type Default Description
Boolean true

true if the editor’s height is calculated automatically to fit the editor’s content; otherwise, false.

Remarks

If the AutoHeight property value is true, editors automatically change their height to the minimum required to fit their content according to the style currently applied. Note: in this case, changing the editor’s Height property value will have no effect. If you need to specify the editor’s height manually, set the AutoHeight property to false.

Automatic height calculation is not supported by all editors. Thus, the AutoHeight property is overridden by some RepositoryItem descendants to hide it at design time and return false always.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AutoHeight property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also