Open Croppo opened 3 weeks ago
We've found some similar issues:
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
Note: You can give me feedback by 👍 or 👎 this comment.
@PureWeen will showing a modal page trigger the navigation from? The page is still technically there...
@Croppo if you navigate via a normal/non-modal page, does the event fire?
@mattleibow When navigating the event will fire, however, it will be on the flyout page instead of the detail within the flyout page.
In our app we have navigation implemented in the detail of the flyout page and all of the normal pages fire the event correctly it is only when a modal is pushed that is calls the event directly on the flyout page.
If you use the demo app in the linked repo you will see the behavior discussed :)
Description
In our app we use
FlyoutPage
to separate the apps content on tablets. We have theFlyoutLayoutBehavior
set toSplit
.This gives a persistent menu that allows the majority of the operations within the app to be done through the detail pane. This is where the majority of our navigation lies.
The issue we are currently facing is when a modal is opened from the
detail
pane theOnNavigatedFrom
method is not called from thedetail
itself. Rather it is triggered on theFlyoutPage
.Is this expected behavior? If so, what is the recommended way around this?
Re: similarity score: This was posted on wrong account initially. Have since closed on initial posting and shifted to re-posting on this one.
Link to public reproduction project repository
FlyoutPageMauiSample
Steps to reproduce
On the home screen click the "navigate to modal" button in the detail pane.
Expected outcome: A dialog should be raised stating, "Navigated from detail page".
Actual Outcome: No dialog is raised as the
OnNavigatedFrom
method is firing onMainPage.xaml.cs
rather thanDetailPage.xaml.cs
Demo_ Video
Affected Platforms
Android, iOS