我有一个名为的页面Page1.xaml
,可以从Page2.xaml
和访问和访问Page3.xaml
。我不想从 to 转回来Page1
,Page3
只是 to Page2
。
现在,当我这样做时,会发生异常:
if (this.NavigationService.BackStack.Any())
{
}
这是:Attempted to read or write protected memory.
有人可以告诉我如何简单地按照我上面所说的方式为 WP7 和 WP8 工作(msdn 文档在这里和那里讨论,所以我错过了重点。)
更新:当我使用NavigationService.CanGoBack
相同的错误时:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.