MasterDetailPage with TabbedPage in master page, bug ?

PhilippeAntoinePhilippeAntoine FRMember
edited September 2015 in Xamarin.Forms

I'm not sure if i'm doing something wrong or if this is a bug but in certain condition, the tabbedpage don't draw the tab in the master page.
(Ipad, iOS 9.0, seems to work fine on the 8.4 images of the simulator)

  • Create a Form Shared Solution
  • Create a MasterDetailPage as your MainPage
  • Add a TabbedPage as your Master page with some children
  • Add a ContentPage as your detail page
  • Set MasterBehavior as default (for ipad, split on landscape / popover on portrait)

  • Launch it on the simulator in portrait mode,

  • Turn your device left or right
  • you have no tab
  • go in portrait mode, slide left -> tab are here.
  • If you turn now your ipad in landscape mode :
    • If your master page was left open, you will see the tabs
    • If your master page was closed on portrait mode, you will not see the tabs

A little code :
public class App : Application { public App( ) { MainPage = new MasterDetailPage() { Master = new TabbedPage() { BackgroundColor = Color.Blue, Title = "Master", Children = { new ContentPage(){Title = "T1", BackgroundColor = Color.Blue,}, new ContentPage(){Title = "T2", BackgroundColor = Color.Red, }, new ContentPage(){Title = "T3", BackgroundColor = Color.Green}, } }, MasterBehavior = MasterBehavior.Default, Detail = new ContentPage(){ Title = "Detail", Content = new StackLayout() { Children = { new Label() { Text = "Detail", VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, } } }} }; } }



  • RHudsonRHudson CAMember ✭✭✭

    Could you try using a different approach? Seems to me there isn't enough room on the Master side to display tabs.

    And if you target Android, the tabs will appear at the top and will look confusing underneath the titlebar. If they even work at all.

    Instead of tabs can you not display your T1 T2 T3 in a list?

  • For the moment, i've iOS for primary target.
    Each tabbed page children is a specific content page with navigation.

    And it's working fine with iOS 8.4, but not iOS 9.0 images.

    If the app start in landscape, the tabs appeared, but if you rotate the screen in portrait and then in landscape, the tabs are not there anymore.

    I'm not sure what to do...

  • EilelEilel Member

    Have you found a solution or work around for this. I'm experiencing the exact same bug and with everything we've tried we aren't able to get the TabBar displayed when you rotate back to landscape with a "closed" master page

Sign In or Register to comment.