Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Tab Navigation behavior not same as the top Navigation after save button clicked.

MeteMete Member ✭✭
edited October 20 in Xamarin.Forms

I have a Dashboard Page, Dashboard Page has a Hamburger menu which contains (Dashboard, Newform) On the bottom of the each views have 2 tabs. These to tabs same as flyout menu on hamburger menu. Dashboard, Newform. On the Dashboard view, From the hamburger menu, clicking on New Form displays fine and filling the form and saving the form displays details view fine, and clicking on the back arrow, On detail view, brings you all the way back to the dashboard view fine. however, Same flow, Dashboard, New Form, Fill, Save, Detail view, and this time, instead of back arrow, clicking on the dashboard tab on the bottom brings you the dashboard page fine, however, this time On hamburger menu click on new item shows detail page, also clicking on tab new item on bottom display detail page, instead of new item form. Navigation top works fine, tabs gets confused. If I check the navigation stack on dashboard page before I click anything, count is 1 but no view available.
On dashboard view I have applied below, but no luck
{
base.OnAppearing();
await Task.Delay(1000);
wm = new DashboardVime();
this.BindingContext = vm;
//Navigation.PopAsync();
//if (Navigation != null && Navigation.NavigationStack.Count() > 0)
//{
// var existingPages = Navigation.NavigationStack.ToList();
// foreach (var page in existingPages)
// {
// if (page != null)
// {
// Navigation.RemovePage(page);
// }
// }
//}
}

Tagged:

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    It is really a complicated process from your descriptions.
    It seems you are using shell to build the architecture.
    Could you please share a basic sample to clarify your issue?
    It could be more helpful if you can provide a video to reveal the steps to reproduce your issue.

  • MeteMete Member ✭✭

    Shell application with Navigation and 2 tabs below
    Dashboard View
    1.Hamburger Menu
    1.New Item Selected
    2.New Item Form Displayed
    2.Form filled, Button Clicked
    3a.Display/Detail View
    3b.Back Button Clicked
    1.Dashbaord View Displayed Fine.
    Now Repeat the same process works like a charm.
    Non working scenario is,
    Repeat the same till 3b and then instead of back button on navigation, click on Dishoard tab on bottom
    and Dashboard view displays fine However,
    Now On hamburger Menu, clicking on new item displays Detail pages, Click on New Item Tab Details page shows up instead of New Item view
    Cant reach New Item form anymore either from Hamburger menu or New Item Tab. Need to log out log in again.
    On dashboard view, I try to utilize task.Delay to clear out the cache and history. But no use

  • LandLuLandLu Member, Xamarin Team Xamurai

    Could you please post a small sample to reproduce the issue?

  • MeteMete Member ✭✭
    edited October 22

    Appreciate the help, I assume, its time to get rid of the tab. I just remove the tab.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Glad you solved it.
    Please mark the reply as the answer.

  • MeteMete Member ✭✭

    LandLu, Its is not solved. Tabs And Navigation working together on some views are problem when you use buttons to navigate
    I just removed / disabled tabs from certain views.

  • LandLuLandLu Member, Xamarin Team Xamurai

    If you still want to make it with tabs, please share a sample here to help reproduce this issue.
    I don't know what happened on your side without it.

  • MeteMete Member ✭✭

    Its a pretty large project and files to share the code. I see if I can put together a sample project with the issue
    Thanks

  • LandLuLandLu Member, Xamarin Team Xamurai

    Yeah.
    We don't need your whole project.
    Try to reproduce this with a small sample and share it here.

  • MeteMete Member ✭✭

    Here is the link to sample Project
    https://www.dropbox.com/s/unecnluss2p2li9/AppTestSheelNavigation.zip?dl=0
    Dashboard Page opens up, Hamburger Menu, Create, Type any Name, Click on Save, Display page Comes up, Click on Dashboard tab, Dashboard View Comes up, Click on Hamburger, Select Create......
    Instead of Create Page, Display page shows up. That is the problem.

Sign In or Register to comment.