1

我有一个新应用程序,我正在尝试导航到另一个页面:

private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(MultiView));
        }

相同的代码适用于我以前制作的应用程序。我不明白为什么它不再工作了。

抛出的异常是:

System.ArgumentNullException was unhandled by user code   HResult=-2147467261   Message=Value cannot be null. Parameter name: key   Source=mscorlib   ParamName=key   StackTrace:
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
       at MyAppName.Common.LayoutAwarePage.OnNavigatedFrom(NavigationEventArgs e) in c:\Users\UserName\Documents\Visual Studio 2013\Projects\MyAppName\MyAppName\Common\LayoutAwarePage.cs:line 373
       at MyAppName.MainPage.OnNavigatedFrom(NavigationEventArgs e) in c:\Users\UserName\Documents\Visual Studio 2013\Projects\MyAppName\MyAppName\MainPage.xaml.cs:line 804   InnerException:

如何导航到另一个页面?(我使用的代码与 MSDN 文档中描述的代码相同。而且我已经经历过很多次了。直到现在这从来都不是问题。

4

0 回答 0