RadPopup doesn't close when navigating to new page

1 Answer 138 Views
Popup
Kevin
Top achievements
Rank 1
Kevin asked on 04 Aug 2023, 04:35 PM

I have a RadPopup with buttons that navigate to new pages via shell navigation.  When I click to navigate to the new page it remains open.  

 

I would like the popup to disappear like the rest of the page, but when I press back, I would expect it to still be open

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 08 Aug 2023, 10:03 AM

Hi Kevin,

You have to close the popup when navigation to a new page. For example: 

 private async void ClosePopup(object sender, EventArgs e)
    {
        await Shell.Current.GoToAsync("NewPage1");
        this.popup.IsOpen = false;
    }

 

And then open the popup when returning to this page. You can use the shell navigation events, page events, etc. 

 

protected override void OnNavigatedTo(NavigatedToEventArgs args)
    {
        base.OnNavigatedTo(args);
        this.popup.IsOpen = true;
    }

 

 

 

Kevin
Top achievements
Rank 1
commented on 10 Aug 2023, 01:32 PM

Shouldn't this behavior be built into the popup?

Didi
Telerik team
commented on 16 Aug 2023, 08:38 AM

Hi Kevin,

I have logged the behavior so the team can research this in details: https://feedback.telerik.com/maui/1620083-popup-does-not-close-in-shell-navigation When there is an update, the item status will be changed. For now use the suggested approach. 

Tags
Popup
Asked by
Kevin
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or