Back to Devexpress

RepositoryItemPopupBase.CloseUpKey Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitempopupbase-1ccc0d75.md

latest3.3 KB
Original Source

RepositoryItemPopupBase.CloseUpKey Property

Gets or sets the key combination used to open and close the pop-up window.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Behavior")]
public virtual KeyShortcut CloseUpKey { get; set; }
vb
<DXCategory("Behavior")>
Public Overridable Property CloseUpKey As KeyShortcut

Property Value

TypeDescription
KeyShortcut

A KeyShortcut object specifying the key combination used to open and close the popup window.

|

Remarks

When the editor is focused, users can press F4 to open or close the pop-up window. The CloseUpKey property allows you to customize the shortcut: you can select a predefined key combination, provide a custom shortcut, or disable the shortcut.

Tip

When you specify a custom shortcut, press the key combination on the keyboard.

The QueryPopUp and QueryCloseUp events fire before the pop-up window is opened or closed and allow you to prevent the action.

Note

Users can also press Alt+Down to show the pop-up window regardless of the CloseUpKey property value.

Example

The following example assigns the Ctrl+Enter shortcut to the RepositoryItemPopupBase.CloseUpKey property. This allows the end-user to press this key combination in order to open and close the dropdown window while accepting the selected value.

csharp
popupContainerEdit1.Properties.CloseUpKey = new KeyShortcut(Keys.Control | Keys.Enter);
vb
PopupContainerEdit1.Properties.CloseUpKey = New KeyShortcut(Keys.Control Or Keys.Enter)

See Also

QueryCloseUp

QueryResultValue

CloseUp

QueryPopUp

QueryProcessKey

RepositoryItemPopupBase Class

RepositoryItemPopupBase Members

DevExpress.XtraEditors.Repository Namespace