windowsforms-devexpress-dot-xtraeditors-dot-datetimeoffsetedit-5e8256d8.md
Occurs when the editor drop-down menu is closed. Allows you to identify what caused the menu to close.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override event ClosedEventHandler Closed
<Browsable(True)>
<EditorBrowsable(EditorBrowsableState.Always)>
<DXCategory("Events")>
Public Overrides Event Closed As ClosedEventHandler
The Closed event's data class is ClosedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| CloseMode | Gets a value that specifies why the popup editor’s dropdown window was closed. |
Read the ClosedEventArgs.CloseMode property to learn how a menu was closed.
void DateTimeOffsetEdit1_Closed(object sender, ClosedEventArgs e) {
switch (e.CloseMode) {
case PopupCloseMode.ButtonClick:
//a user clicked the editor drop-down button
break;
case PopupCloseMode.Cancel:
//a user clicked "Cancel" or pressed Esc
break;
case PopupCloseMode.CloseUpKey:
//a user pressed Alt+DownArrow, or another hotkey assigned
//to the CloseUpKey property
break;
case PopupCloseMode.Immediate:
//a user clicked ouside the drop-down menu
break;
case PopupCloseMode.Normal:
//a user clicked "OK"
break;
}
}
Private Sub DateTimeOffsetEdit1_Closed(ByVal sender As Object, ByVal e As ClosedEventArgs)
Select Case e.CloseMode
Case PopupCloseMode.ButtonClick
'a user clicked the editor drop-down button
Case PopupCloseMode.Cancel
'a user clicked "Cancel" or pressed Esc
Case PopupCloseMode.CloseUpKey
'a user pressed Alt+DownArrow, or another hotkey assigned
'to the CloseUpKey property
Case PopupCloseMode.Immediate
'a user clicked ouside the drop-down menu
Case PopupCloseMode.Normal
'a user clicked "OK"
End Select
End Sub
See Also