Skip to main content

PopupBaseEdit.BeforePopup Event

Fires when the editor’s pop-up is about to be displayed.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public virtual event EventHandler BeforePopup

Event Data

The BeforePopup event's data class is EventArgs.

Remarks

The following code snippet enables time editing in the DateEdit‘s popup:

using DevExpress.XtraEditors.Popup;
using DevExpress.XtraEditors;
using DevExpress.Utils;
using System;

namespace DXApplication {
    public partial class Form1 : XtraForm {
        public Form1() {
            InitializeComponent();
            dateEdit1.BeforePopup += DateEdit1_BeforePopup;
        }

        void DateEdit1_BeforePopup(object sender, EventArgs e) {
            PopupDateEditForm popupForm = ((DateEdit)sender).GetPopupEditForm() as PopupDateEditForm;
            popupForm.Calendar.CalendarTimeEditing = DefaultBoolean.True;
        }
    }
}

The RepositoryItemPopupBase.BeforePopup event is equivalent to the BeforePopup event.

See Also