-
Notifications
You must be signed in to change notification settings - Fork 769
Description
Proposal: Add light dismiss option to ContentDialogs
Summary
This proposal aims to add a light dismiss option to the ContentDialog class. The light dismiss behavior is functionally the same as if the user would close the dialog by pressing ESC or the Gamepad B button.
Rationale
Many times, ContentDialogs are displayed which show some information and the user would like to light dismiss the dialog after reading said information. See Windows Terminal's About dialog for example:
It would be great if developers could enable users to light dismiss the dialog in addition to the current dismiss options. Developers who currently want to provide light dismiss behavior for ContentDialogs need to either make use of implementation details or re-build the entire dialog using other controls, like Popup: https://stackoverflow.com/questions/39317526/uwp-light-dismiss-contentdialog.
As such, having a light dismiss behavior to opt-into would enable developers to built great dialog experiences without having to build the dialogs entirely from the ground up or make assumptions about the ContentDialog implementation.
Scope
Capability | Priority |
---|---|
Developers can opt-into a light dismiss behavior for a ContentDialog instance. | Must |
Important Notes
The proposed API to add to the ContentDialog
class matches the Popup's light dismiss API:
public static DependencyProperty IsLightDismissEnabledProperty { get; }
public bool IsLightDismissEnabled { get; set; }