Hello,
Welcome to our Microsoft Q&A platform!
1.The TabbedPage class doesn't provide a property or method to hide the tab. For this function, try to define the tabbedPage's children using the Remove and Insert method.
TabbedPage theTabbedPage = App.Current.MainPage as TabbedPage;
public void HideTab(int index)
{
if (index < theTabbedPage.Children.Count)
{
theTabbedPage.Children.RemoveAt(index);
}
}
public void AddTab(int index)
{
// Adjust this page as you want
if (!theTabbedPage.Children.Contains(thePage))
{
theTabbedPage.Children.Insert(index, thePage);
}
}
2.If you want to change the template of the application, you could create two tabbedPages to display the different status. Change the App.Current.MainPage
when the bool property is changed.
public partial class App : Application
{
public App()
{
InitializeComponent();
if (_value)
{
MainPage = new TabbedPage1();
}
else
{
MainPage = new TabbedPage2();
}
}
...
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.