0

我试图在后面的代码中更改根框架:

    // 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 ...               
        }

...我需要更改根框架(但清单中没有)。有人知道吗?非常感谢答案或提示。

4

1 回答 1

1

当应用程序刚刚初始化时,您可以使用另一个框架。只需修改中的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
}
于 2013-05-13T16:44:20.150 回答