windowsforms-devexpress-dot-xtraeditors-dot-tokenedit-dot-closepopup-x28-devexpress-dot-xtraeditors-dot-popupclosemode-x29.md
Forces the TokenEdit‘s pop-up to close in a specific mode.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public virtual void ClosePopup(
PopupCloseMode closeMode
)
Public Overridable Sub ClosePopup(
closeMode As PopupCloseMode
)
| Name | Type | Description |
|---|---|---|
| closeMode | PopupCloseMode |
A PopupCloseMode enumerator value that specifies the mode in which the TokenEdit‘s pop-up is closed.
|
The ClosePopup method, that forces the TokenEdit to close its pop-up in a specific mode, is used when assigning a custom drop-down control to the editor. See the TokenEdit with Custom Drop-Down Control topic to learn more.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ClosePopup(PopupCloseMode) method.
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-tokenedit-dropdown-with-treelist/CS/TokenEditTest/CustomTokenEditDropDownControl.cs#L30
TreeList.FilterNodes();
if(TreeList.VisibleNodesCount == 0) OwnerEdit.ClosePopup(PopupCloseMode.Cancel);
}
winforms-tokenedit-dropdown-with-treelist/VB/TokenEditTest/CustomTokenEditDropDownControl.vb#L33
If TreeList.VisibleNodesCount = 0 Then
OwnerEdit.ClosePopup(PopupCloseMode.Cancel)
End If
See Also