Method OnDismissRequested OnDismissRequested() Invoked when the escape key is pressed or a user-initiated back navigation is triggered while the dialog is showing. Declaration void OnDismissRequested()