Back to Devexpress

TokenEdit.ClosePopup(PopupCloseMode) Method

windowsforms-devexpress-dot-xtraeditors-dot-tokenedit-dot-closepopup-x28-devexpress-dot-xtraeditors-dot-popupclosemode-x29.md

latest3.3 KB
Original Source

TokenEdit.ClosePopup(PopupCloseMode) Method

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

Declaration

csharp
public virtual void ClosePopup(
    PopupCloseMode closeMode
)
vb
Public Overridable Sub ClosePopup(
    closeMode As PopupCloseMode
)

Parameters

NameTypeDescription
closeModePopupCloseMode

A PopupCloseMode enumerator value that specifies the mode in which the TokenEdit‘s pop-up is closed.

|

Remarks

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

csharp
TreeList.FilterNodes();
    if(TreeList.VisibleNodesCount == 0) OwnerEdit.ClosePopup(PopupCloseMode.Cancel);
}

winforms-tokenedit-dropdown-with-treelist/VB/TokenEditTest/CustomTokenEditDropDownControl.vb#L33

vb
If TreeList.VisibleNodesCount = 0 Then
    OwnerEdit.ClosePopup(PopupCloseMode.Cancel)
End If

See Also

TokenEdit with Custom Drop-Down Control

TokenEdit Class

TokenEdit Members

DevExpress.XtraEditors Namespace