我在哪里错了?
private void lstCars_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string currCar = (sender as ListBox).SelectedItem as string;
NavigationService.Navigate(new Uri("/ViewCarDetails.xaml?info=" + currCar, UriKind.Relative));
}
这是我试图导航到的页面
public ViewCarDetails(string registrationNum)
{
//stuff
}
这是我收到错误时程序跳转到的代码(在 App.xaml.cs 中)
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
System.Diagnostics.Debugger.Break();
}
}
我检查了 URI 但没有拼写错误 谢谢