1

I would like to provide a drawer for navigation. There are TabbedContainer pages (for example the home or main page) and also there are SingleContainer pages.

Currently I have to switch stack to trigger calling of SetStack in IMasterDetailView which will change the Details page. However this way the navigation is broken.

g.pickardou
  • 32,346
  • 36
  • 123
  • 268

1 Answers1

1

If you are talking about changing the Stack on the DetailPage, from a MasterPage navigation link, the best way to do this is with the container and region mapping.

In your TabbedViewContainer, in the constructor, label your Master and Detail pages, as such.

RegionMapping.Add("Master", ContainerType.Master);
RegionMapping.Add("Detail", ContainerType.Detail);

Next, also note the name you assigned your container, e.g.

public TabbedViewContainer(MainStack mainStack, SecondStack secondStack)
        : base(Containers.Tabbed.ToString(), null)

Then when you do a navigate, make sure you specify the Container and Region, in this case Containers.Tabbed.ToString() and "Detail", and it will cause the navigation in that particular region.

Adam
  • 16,089
  • 6
  • 66
  • 109
  • Adam, many thanks for the answer. I am going to check, just overwhelmed a bit, I have much more question/problem to solve, but do not want to flood SO (and you). I'll be back a few hours later, or weekend with feedback – g.pickardou Sep 22 '17 at 09:46
  • Talking about ExrinSampleMobileApp: I do not want to navigate out from MainContainer, because MainContainer implements the drawer menu via the Xam built in MasterDetailPage. If I navigate out, from that container, then the drawer disappears. I understand the region concept inside, so I concluded I also have to navigate in Regions.Main. Initially the TabbedContainer shows there. From the menu I want to navigate to say a Settings page, but do not want to show the settings page within a tabbed page instead I want to see it in solo. The only way to do this to force SetStack be called... – g.pickardou Sep 23 '17 at 05:41