GroupedItemsPage:从明细页导航时,视图跳回以开始 [英] GroupedItemsPage: View jumps back to start when navigating back from detailpage

查看:30
本文介绍了GroupedItemsPage:从明细页导航时,视图跳回以开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为报纸开发了一个非常受欢迎的新闻应用程序.不幸的是,我的用户报告了我可以重现的以下问题:

I developed a quite popular news app for a newspaper. Unfortunately, my users reported the following problem that I can reproduce:

该应用程序基本上由 GroupedItemsPage ItemDetailPage (以及其他几个页面,此处不重要)组成. GroupedItemsPage显示按类别分组的新闻.当用户向右滚动时,他单击感兴趣的项目之一,被重定向到ItemDetailPage并向后导航.回到GroupedItemsPage上,视图跳回到第一个组,而不是停留在用户所处的最后一个位置(组).当我创建一个新的Windows应用商店"Grid App"时,可以发现完全相同的行为(在我的环境中).

The App basically consists of a GroupedItemsPage and a ItemDetailPage (and several other pages, not important here). The GroupedItemsPage shows the news grouped by category. As the user scrolls to the right, he clicks on one of the items of interests, gets redirected to the ItemDetailPage and navigates back. Back on the GroupedItemsPage the view jumps back to the first group and does not stay at the last position (group) the user has been. The exact same behaviour can be found (in my environment) when I create a new Windows Store "Grid App".

不幸的是,我无法独自解决此问题,也没有在网络上找到一些有用的评论.我看到其他一些应用程序可以解决此问题,而其他应用程序则无法解决.任何评论都将得到赞赏.谢谢!

Unfortunately, I was not able to resolve this problem on my own, nor have I found some useful comments in the web. I saw several other apps who could solve this issue and others didn't. Any comment would be very much appreciated. Thank you!

推荐答案

我找到了另一个更简单的解决方案.我想分享:

I found another, easier solution. I'd like to share it:

在GroupedItemsPage(XAML)中,我添加了:

In the GroupedItemsPage (XAML) i added:

<common:LayoutAwarePage
NavigationCacheMode="Enabled" ...

这篇关于GroupedItemsPage:从明细页导航时,视图跳回以开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆