我试图改变代码背后的根框架:
// Do not add any additional code to this method
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
{
// Set the root visual to allow the application to render
if (RootVisual != RootFrame)
{
RootVisual = RootFrame; // here or somewhere before ...
}
...我需要更改根框架(但清单中没有)。 有谁有任何想法?答案或提示非常感谢。
答案 0 :(得分:1)
当app刚刚初始化时,您可以使用另一个框架。只需修改InitializePhoneApplication()
中的App.xaml.cs
方法:
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
// Instead of creating a PhoneApplicationFrame, use your own
RootFrame = new YourSuperCoolFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
... // rest of the original code
}