Requests an end-user confirmation via the dialog window.
public override ConfirmationResult AskConfirmation(
Public Overrides Function AskConfirmation(
confirmationType As ConfirmationType
) As ConfirmationResult
A ConfirmationType enumeration value specifying the confirmation dialog type.
A ConfirmationResult enumeration value, specifying the end-user choice.
Overrides the XafApplication.AskConfirmation method. Uses the WinApplication.GetUserChoice method to display a confirmation dialog window of the required type. The user choice is logged.
The following dialog is displayed when the ConfirmationType.NeedSaveChanges value is passed:
The "Do you want to save changes?" text is obtained from the Application Model's Localization | Confirmations | Save node, and is localizable.
The following dialog is displayed when the ConfirmationType.CancelChanges value is passed:
The "Do you want to cancel your changes?" text is obtained from the Application Model's Localization | Confirmations | Cancel node, and is localizable.
This method is used in the WinModificationsController Controller, to display confirmation dialogs when the ModificationsController.CancelAction Action is executed, or the View is closed. To use the AskConfirmation method in a custom Controller, access the WinApplication object via the Controller.Application property.