What Changed
We marked the CloseButtonClick event as obsolete.
Reasons for Change
In previous versions, users could close the Popup only using the Close button in the header. The CloseButtonClick
event fired in response to this action.
In v21.1, users can also press Escape or click outside the Popup's boundaries to close the Popup. We implemented the common Closing and Closed events instead. They fire in response to any close action (the Close button, the Escape key, or an outer click) and when the Visible property is set to false
.
Impact on Existing Apps
This change affects applications if you handle the CloseButtonClick
event.
Razor<DxPopup ...
CloseButtonClick="OnCloseButtonClick">
</DxPopup>
@code {
void OnCloseButtonClick() {
// Event handler...
}
}
How to Update Existing Apps
Handle one of the following events:
Closing
- Raises before the Popup is closed.Closed
- Raises after the Popup is closed.
Razor<DxPopup ...
Closing="OnClosing"
Closed="OnClosed">
</DxPopup>
@code {
void OnClosing(PopupClosingEventArgs args) {
// Event handler...
}
void OnClosed(PopupClosedEventArgs args) {
// Event handler...
}
}