我學習WP編碼和我有解決不了的問題:/NavigationService.navigate空引用異常
try
{
NavigationService.Navigate(new Uri("/edit.xaml", UriKind.Relative));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(),"Error!",MessageBoxButton.OK);
}
edit.xaml是在同一個目錄中MainPage.xaml中
它拋出「NullReferenceException」
我猜你打電話從'MainPage'這個代碼?你能向我們展示完整的callstack嗎? (只是複製/粘貼'ex.ToString()') – 2013-03-27 19:28:33