Back to Devexpress

RepositoryItemTokenEdit.AutoHeightMode Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-9b950624.md

latest3.4 KB
Original Source

RepositoryItemTokenEdit.AutoHeightMode Property

Specifies how the TokenEdit adjusts its height to fit its content.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(TokenEditAutoHeightMode.Default)]
[DXCategory("Behavior")]
public TokenEditAutoHeightMode AutoHeightMode { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(TokenEditAutoHeightMode.Default)>
Public Property AutoHeightMode As TokenEditAutoHeightMode

Property Value

TypeDefaultDescription
DevExpress.XtraEditors.TokenEditAutoHeightModeDefault

Specifies the auto-hide mode.

|

Remarks

TokenEditAutoHeightMode.RestrictedExpandAutomatically increases the TokenEdit‘s height when its content cannot be fully displayed within the current bounds. Use the RepositoryItemTokenEdit.MaxExpandLines property to limit the editor’s height.TokenEditAutoHeightMode.Expand / TokenEditAutoHeightMode.DefaultAutomatically expands the TokenEdit‘s height to fully display all tokens. The RepositoryItemTokenEdit.MaxExpandLines setting is ignored.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutoHeightMode 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.

winforms-grid-tokenedit-in-unbound-column/CS/Form1.cs#L32

csharp
rep.Tokens.BeginUpdate();
rep.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand;
rep.MaxExpandLines = 1;

winforms-grid-tokenedit-in-unbound-column/VB/Form1.vb#L34

vb
rep.Tokens.BeginUpdate()
rep.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand
rep.MaxExpandLines = 1

See Also

MaxExpandLines

Token Edit Control

RepositoryItemTokenEdit Class

RepositoryItemTokenEdit Members

DevExpress.XtraEditors.Repository Namespace