windowsforms-devexpress-dot-xtraeditors-dot-popupbaseedit-35bb62b2.md
Fires when the editor’s pop-up is about to be displayed.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public virtual event EventHandler BeforePopup
<DXCategory("Events")>
Public Overridable Event BeforePopup As EventHandler
The BeforePopup event's data class is EventArgs.
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;
}
}
}
Imports DevExpress.XtraEditors.Popup
Imports DevExpress.XtraEditors
Imports DevExpress.Utils
Imports System
Namespace DXApplication
Public Partial Class Form1
Inherits XtraForm
Public Sub New()
InitializeComponent()
AddHandler dateEdit1.BeforePopup, AddressOf DateEdit1_BeforePopup
End Sub
Private Sub DateEdit1_BeforePopup(sender As Object, e As EventArgs)
Dim popupForm As PopupDateEditForm = CType(CType(sender, DateEdit).GetPopupEditForm(), PopupDateEditForm)
popupForm.Calendar.CalendarTimeEditing = DefaultBoolean.True
End Sub
End Class
End Namespace
The RepositoryItemPopupBase.BeforePopup event is equivalent to the BeforePopup event.
See Also