Context
I am using the ExrinSampleMobileApp from the Exrin repository.
Question
How can I set the main and detail tab's title?
I tried to set the appropriate view's title with no effect (DetaiView and MainView)
Context
I am using the ExrinSampleMobileApp from the Exrin repository.
Question
How can I set the main and detail tab's title?
I tried to set the appropriate view's title with no effect (DetaiView and MainView)
Because everything is wrapped in a NavigationPage, you need to set the Title of the NavigationPage. The easiest way to do this is via the Stack.
When you pass through a new NavigationPage, set it's title, as shown here.
public class MainStack : BaseStack
{
public MainStack(IViewService viewService)
: base(new NavigationProxy(new NavigationPage() { Title = "My Title" }),
viewService,
Stacks.Main,
nameof(Main.Main))
{
ShowNavigationBar = false;
}
protected override void Map()
{
base.NavigationMap<AboutView, AboutViewModel>(nameof(Main.About));
base.NavigationMap<MainView, MainViewModel>(nameof(Main.Main));
base.NavigationMap<SettingsView, SettingsViewModel>(nameof(Main.Settings));
base.NavigationMap<View.ListView, ListViewModel>(nameof(Main.List));
base.NavigationMap<DetailView, DetailViewModel>(nameof(Main.Detail));
}
}