DisplayAlertAsync

How to display this from the popup?


3 Replies

MM Muthukumar Madasamy Syncfusion Team January 20, 2026 05:50 AM UTC

Hi Ed Staffin,

You can show DisplayAlertAsync from inside an SfPopup by calling it through the page, since the popup itself is not a Page. For example:
private async void OnPopupButtonClicked(object sender, EventArgs e)
{
    await Application.Current.MainPage.DisplayAlertAsync(
        "Alert",
        "This alert is shown from inside the popup.",
        "OK");
    // or, if you are using Shell:
    // await Shell.Current.DisplayAlertAsync("Alert", "Shown from popup.", "OK");
}

We have also attached a simple sample demonstrating how to trigger DisplayAlertAsync from a button inside SfPopup for your reference.

Please let us know if this works at your end or if you need any further assistance.

Best Regards,
Muthu Kumar Madasamy.

Attachment: PopupSample_d5a828ae.zip


AB Andrew Bell August 2, 2026 11:12 PM UTC

Thank you for sharing this solution and the sample project. The explanation makes it clear why DisplayAlertAsync cannot be called directly from SfPopup and how using Application.Current.MainPage.DisplayAlertAsync() (or Shell.Current.DisplayAlertAsync() for Shell-based apps) is the correct approach. This is a simple yet effective solution that can save developers time when working with .NET MAUI popups. I appreciate the clear guidance and the attached sample, as practical examples make implementation much easier. Thanks to the Syncfusion team for the prompt and helpful support. 👍😊



SN Santhosh Natarajan Syncfusion Team August 3, 2026 12:37 PM UTC

Hi Ed Staffin,

Thank you for your response.

We are glad to hear that the explanation and sample project were helpful and that the solution clarified the correct approach for displaying alerts from an SfPopup in .NET MAUI.

If you have any further questions or require additional assistance in the future, please do not hesitate to reach out to us.

As the reported requirement has been addressed, we are closing this forum thread now.

Thank you for choosing Syncfusion.

Best regards,

Syncfusion Support Team


Loader.
Up arrow icon