Display dialog from menu + Navigation

Hello,

From the menu I'd like open a dialog box :

<RadzenPanelMenuItem Text="Dashboard" Click=@ShowCloseableFromOverlayDialog/>

@code {
    await DialogService.OpenAsync("Closeable from overlay Dialog", ds =>
    @<div>
     Click outside to close this Dialog
    </div>, new DialogOptions() { CloseDialogOnOverlayClick = true });
}

There is a problem when I do this. The dialog appear and disappear immediately and I change page and arrive on the Dashboard page.

I'd would like :

  • Stay on the current page when my dialog is open If I click on cancel button the dialog closed but I stay on the same page.
  • When I click on "Save", call my backend and be redirect to an URL.

Testing for now but after I will use the " Open page as a dialog" sample.

Thanks,

This will not navigate to anything actually since there is no Path specified and this is the answer to your question. Now you can manually use the NavigationManager to navigate when needed and how to check what result is returned from the dialog you can find in our dialog demos.