【发布时间】:2014-11-05 19:00:47
【问题描述】:
我需要根据登录用户更改我的应用中的起始页。在 Silverlight 8.1 版本中,我需要做的就是删除清单文件和 App.xaml.cs 中的起始页:
private void Application_Launching(object sender, LaunchingEventArgs e)
{
Uri uriMain = new Uri("/PivotPage.xaml", UriKind.Relative);
Uri uriLogin = new Uri("/MainPage.xaml", UriKind.Relative);
var settings = IsolatedStorageSettings.ApplicationSettings;
if (!settings.Contains("user_id"))
{
RootFrame.Navigate(uriLogin);
}
else
{
RootFrame.Navigate(uriMain);
}
}
但在通用版本中,我不知道该怎么做。我需要做什么才能在 WP 8.1 通用应用程序中实现这一目标?
编辑: 发现重复的Change default startup page for windows phone 8.1 app,抱歉
【问题讨论】:
标签: c# windows-phone-8.1