I hava a Tabbed page Inside a Navigation Page As Detail Of Master Details Page, Clicking on tabs doesn't work, it always shows the last page.
public class TestTabMasterDetailPage : MasterDetailPage
{
public TestTabMasterDetailPage ()
{
Icon = "icon.png";
Master = new Page{ Title = "Login" };
var tabbedPage = new TabbedPage {
Children = { new TabbedViews("First Tab") , new TabbedViews("Second Tab"), new TabbedViews("Third Tab")
}
};
Detail = new TestTabNavigationPage(tabbedPage);
}
}
public class TestTabNavigationPage : NavigationPage
{
public TestTabNavigationPage (Page root):base(root)
{
Icon = "icon.png";
}
}
public class TabbedViews : ContentPage
{
public TabbedViews (string name)
{
Title = name;
Label label = new Label () {
HorizontalOptions = LayoutOptions.End,
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center,
BackgroundColor = Color.White,
Text = "powered by " + name,
};
var InsideStack = new StackLayout {
Orientation = StackOrientation.Vertical,
VerticalOptions = LayoutOptions.FillAndExpand,
Children = { label }
};
Content = InsideStack;
}
}
I am attaching the solution..