PopupControlContainer.BeforePopup Event
Fires when the pop-up is about to be displayed and allows you to adjust its settings (e.g., size), or cancel the action.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Event Data
The BeforePopup event's data class is CancelEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the event should be canceled. |
Remarks
To display the pop-up, call the PopupControlContainer.ShowPopup method. Before the pop-up is shown, the BeforePopup event fires. Within the event handler, you can adjust pop-up settings (e.g., size), or prohibit displaying the pop-up.
private void popupControlContainer1_BeforePopup(object sender, EventArgs e) {
PopupControlContainer popup = (PopupControlContainer)sender;
if (popup != null) {
popup.Width = 500;
popup.Height = 500;
}
//You can also prohibit to show the pop-up.
//e.Cancel = true;
}
See Also