windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-9b950624.md
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
[DefaultValue(TokenEditAutoHeightMode.Default)]
[DXCategory("Behavior")]
public TokenEditAutoHeightMode AutoHeightMode { get; set; }
<DXCategory("Behavior")>
<DefaultValue(TokenEditAutoHeightMode.Default)>
Public Property AutoHeightMode As TokenEditAutoHeightMode
| Type | Default | Description |
|---|---|---|
| DevExpress.XtraEditors.TokenEditAutoHeightMode | Default |
Specifies the auto-hide mode.
|
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
rep.Tokens.BeginUpdate();
rep.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand;
rep.MaxExpandLines = 1;
winforms-grid-tokenedit-in-unbound-column/VB/Form1.vb#L34
rep.Tokens.BeginUpdate()
rep.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand
rep.MaxExpandLines = 1
See Also