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,
}
}
}}
};
}
}