windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitempopupcontaineredit-1878c583.md
Gets or sets a value indicating whether the close button is displayed within the popup window.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(true)]
[DXCategory("Behavior")]
public virtual bool ShowPopupCloseButton { get; set; }
<DXCategory("Behavior")>
<DefaultValue(True)>
Public Overridable Property ShowPopupCloseButton As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to display the close button; otherwise, false
|
The ShowPopupCloseButton property allows you to specify whether the close button is displayed in the left bottom corner of the popup window. The image below shows a popup editor with the close button drawn using an XP theme.
When the end-user clicks the button, the dropdown window is closed without invoking the RepositoryItemPopupContainerEdit.QueryResultValue event. This is similar to pressing the ESC key or calling the PopupBaseEdit.CancelPopup method.
After clicking the close button, the following events are raised:
The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowPopupCloseButton 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-use-layoutview-as-master-view/CS/WindowsApplication3/MasterDetailHelper.cs#L98
item.PopupControl = CreatePopupControl();
item.ShowPopupCloseButton = item.ShowPopupShadow = false;
item.PopupSizeable = false;
winforms-popup-container-edit-with-default-ok-button/CS/PopupContainerFormOkButton.cs#L36
this.fShowOkButton = Properties.ShowOkButton;
if (Properties.ShowPopupCloseButton)
this.fCloseButtonStyle = Properties.ShowOkButton ? BlobCloseButtonStyle.Caption : BlobCloseButtonStyle.Glyph;
winforms-create-editable-grid-lookup/CS/PopupContainerEditSelection/Form1.cs#L29
popupContainerEdit1.Properties.PopupControl = popupContainerControl1;
popupContainerEdit1.Properties.ShowPopupCloseButton = false;
popupContainerEdit1.QueryDisplayText += new DevExpress.XtraEditors.Controls.QueryDisplayTextEventHandler(popupContainerEdit1_QueryDisplayText);
winforms-grid-use-layoutview-as-master-view/VB/WindowsApplication3/MasterDetailHelper.vb#L109
item.ShowPopupShadow = False
item.ShowPopupCloseButton = item.ShowPopupShadow
item.PopupSizeable = False
winforms-popup-container-edit-with-default-ok-button/VB/PopupContainerFormOkButton.vb#L30
fShowOkButton = Properties.ShowOkButton
If Properties.ShowPopupCloseButton Then
fCloseButtonStyle = If(Properties.ShowOkButton, BlobCloseButtonStyle.Caption, BlobCloseButtonStyle.Glyph)
winforms-create-editable-grid-lookup/VB/PopupContainerEditSelection/Form1.vb#L22
popupContainerEdit1.Properties.PopupControl = popupContainerControl1
popupContainerEdit1.Properties.ShowPopupCloseButton = False
AddHandler popupContainerEdit1.QueryDisplayText, New DevExpress.XtraEditors.Controls.QueryDisplayTextEventHandler(AddressOf popupContainerEdit1_QueryDisplayText)
See Also
RepositoryItemPopupContainerEdit Class