How set tab 2 in a xamarin forms Tabbed Page as the default tab on startup
You can access the enumerator of the TabbedPage
's children and advance its position two times to get your "second tab". Assign that page as your CurrentPage
:
public HomePage()
{
InitializeComponent();
var pages = Children.GetEnumerator();
pages.MoveNext(); // First page
pages.MoveNext(); // Second page
CurrentPage = pages.Current;
}
public HomePage()
{
InitializeComponent();
CurrentPage = Children[2];
}