Back to Devexpress

DateTimeOffsetEdit.Closed Event

windowsforms-devexpress-dot-xtraeditors-dot-datetimeoffsetedit-5e8256d8.md

latest3.1 KB
Original Source

DateTimeOffsetEdit.Closed Event

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

Declaration

csharp
[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override event ClosedEventHandler Closed
vb
<Browsable(True)>
<EditorBrowsable(EditorBrowsableState.Always)>
<DXCategory("Events")>
Public Overrides Event Closed As ClosedEventHandler

Event Data

The Closed event's data class is ClosedEventArgs. The following properties provide information specific to this event:

PropertyDescription
CloseModeGets a value that specifies why the popup editor’s dropdown window was closed.

Remarks

Read the ClosedEventArgs.CloseMode property to learn how a menu was closed.

csharp
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;
    }
}
vb
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

DateTimeOffsetEdit Class

DateTimeOffsetEdit Members

DevExpress.XtraEditors Namespace