检查异常
我的应用程序在此处的" debugger.break"上失败:
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
}
在消息:system.windows.ni.dll " system.trection.targetInvocation exception"类型" system.targetInvocation exception"类型的例外到目前为止,我的代码非常简单。我只是在主页上只有一个超链接,试图导航到另一页:
//winrt-xaml:
<HyperlinkButton x:Name="hyperlinkButtonManageInvitations" Margin="24" Grid.Row="1" Tap="HyperlinkButtonManageInvitations_OnTap">Manage Invitations</HyperlinkButton>
//c#code-behind:
private void HyperlinkButtonManageInvitations_OnTap(object sender, GestureEventArgs e)
{
NavigationService.Navigate(
new Uri("//TaSLs_Pages/InvitationManagePage.xaml", UriKind.Relative));
}
我确实使用resharper将mainpage.xaml(and *.cs)移至我的tasls_pages subfolder;那不是问题吗?
检查navigationfailedeventargs。您可以通过e.exception.message