【发布时间】:2014-03-09 11:34:26
【问题描述】:
我有一个应用程序可以在 SkyD 中显示某人的图像。哦,OneDrive!
这是场景:从MainPage.xaml 传递imageId 并转到ImagePage.xaml。然后从内部ImagePage.xaml 可以深入到一个新的ImagePage.xaml 等等。
ImagePage.xaml 有一张这样的大图:
<Image Source="{Binding ImageUrl}" Stretch="Uniform" Margin="12"/>
问题是当它更深入时,有时会达到内存限制并退出。
问题,如何防止OutOfMemoryException?我想了一种在更深入之前卸载页面的方法。谢谢。
更新:来自ImagePage:
NavigationService.Navigate(new Uri("/ImagePage.xaml?Id=" + id, UriKind.Relative));
【问题讨论】:
-
发布“转到”另一个/新页面的代码。
-
@HenkHolterman 没什么特别的,有 NavigationService。已更新。
标签: c# xaml windows-phone-7 windows-phone-8 windows-phone