How to have TabbedContainer and SingleContainer within the same stack?

20 views Asked by At

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.

1

There are 1 answers

2
Adam On

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.