我正在尝试在 windows phone8 移动应用程序中从 1 页导航到其他页面。其给出错误- System.Windows.ni.dll 中发生了“System.Reflection.TargetInvocationException”类型的未处理异常
附加信息:调用的目标已引发异常。
XAML:
<phone:PivotItem Header="item1">
<Grid>
<StackPanel>
<HyperlinkButton Content="Transfer" Click="hyperlinkButton1_Click" />
</StackPanel>
</Grid>
</phone:PivotItem>
C#代码:
private void hyperlinkButton1_Click(object sender, RoutedEventArgs e)
{
//NavigationService.Navigate(new Uri("/AboutUs.xaml", UriKind.Relative));
//NavigationService.Navigate(new Uri("/AboutUs.xaml", UriKind.Relative));
Dispatcher.BeginInvoke(() =>
{
this.NavigationService.Navigate(new Uri("/AboutUs.xaml", UriKind.Relative));
});
}