答案 0 :(得分:1)
因为所有内容都包含在NavigationPage中,所以您需要设置NavigationPage的标题。最简单的方法是通过Stack。
当您通过新的NavigationPage时,请设置它的标题,如下所示。
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));
}
}