我的应用程序在这里的"Debugger.Break“上失败了:
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
}...and I get:"System.Reflection.TargetInvocationException是未处理的消息:System.Windows.ni.dll中出现了未处理的'System.Reflection.TargetInvocationException‘类型异常“
到目前为止,我的代码非常简单。我只是在主页面上有一个HyperlinkButton,试图导航到另一个页面:
//winrt-xaml:
<HyperlinkButton x:Name="hyperlinkButtonManageInvitations" Margin="24" Grid.Row="1" Tap="HyperlinkButtonManageInvitations_OnTap">Manage Invitations</HyperlinkButton>//C#代码-隐藏:
private void HyperlinkButtonManageInvitations_OnTap(object sender, GestureEventArgs e)
{
NavigationService.Navigate(
new Uri("//TaSLs_Pages/InvitationManagePage.xaml", UriKind.Relative));
}我确实使用了Resharper将MainPage.xaml (和*.cs)移动到我的TaSLs_Pages子文件夹中;这不会是一个问题,对吗?
发布于 2014-07-23 08:40:30
检查NavigationFailedEventArgs。您可以通过e.Exception.Message检查异常
https://stackoverflow.com/questions/14045223
复制相似问题