The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.
.NET Core 3.0+

WinApplication.AskConfirmation(ConfirmationType) Method

Requests an end-user confirmation via the dialog window.

Namespace: DevExpress.ExpressApp.Win

Assembly: DevExpress.ExpressApp.Win.v19.2.dll

Declaration

public override ConfirmationResult AskConfirmation(
    ConfirmationType confirmationType
)
Public Overrides Function AskConfirmation(
    confirmationType As ConfirmationType
) As ConfirmationResult
public override ConfirmationResult AskConfirmation(
    ConfirmationType confirmationType
)
Public Overrides Function AskConfirmation(
    confirmationType As ConfirmationType
) As ConfirmationResult

Parameters

Name Type Description
confirmationType ConfirmationType

A ConfirmationType enumeration value specifying the confirmation dialog type.

Parameters

Name Type Description
confirmationType ConfirmationType

A ConfirmationType enumeration value specifying the confirmation dialog type.

Returns

Type Description
ConfirmationResult

A ConfirmationResult enumeration value, specifying the end-user choice.

Returns

Type Description
ConfirmationResult

A ConfirmationResult enumeration value, specifying the end-user choice.

Remarks

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:

AskConfirmation_Save

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:

AskConfirmation_Cancel

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.

See Also