Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageNavigationService should check for MultiPage Parent #1232

Closed
dansiegel opened this issue Nov 1, 2017 · 2 comments · Fixed by #1248
Closed

PageNavigationService should check for MultiPage Parent #1232

dansiegel opened this issue Nov 1, 2017 · 2 comments · Fixed by #1248
Labels

Comments

@dansiegel
Copy link
Member

Problem

In the event that your navigation stack looks like:
NavigationPage/TabbedPage?createTab=ViewA&createTab=ViewB and you navigate from either ViewA or ViewB like: _navigationService.NavigateAsync("ViewC"), the Navigation Service will navigate modally. It is far more likely that your intent is to navigate non-modally.

Proposal

If useModalNavigation is null, the PageNavigationService will attempt to determine the correct way to navigate by determining if the parent of the Current Page is a NavigationPage. This should be updated to accommodate when the Page's parent is a MultiPage<> with a NavigationPage parent.

@dansiegel dansiegel added the XF label Nov 1, 2017
@brianlagunas
Copy link
Member

Do you think this would work?

        internal static bool HasNavigationPageParent(Page page)
        {
            if (page?.Parent != null)
            {
                if (page.Parent is NavigationPage)
                {
                    return true;
                }
                else if (page.Parent is TabbedPage || page.Parent is CarouselPage)
                {
                    return page.Parent.Parent != null && page.Parent.Parent is NavigationPage;
                }
            }

            return false;
        }

@lock
Copy link

lock bot commented Jan 29, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants