How to prevent Panorama scrolling from last item to first item in a Windows Phone 7 app

£可爱£侵袭症+ 提交于 2020-01-02 09:29:13

问题


Can it be prevented that, when the user is viewing the last PanoramaItem, that he can scroll further to the right? - which moves back to the the first PanoramaItem. (and, vice-versa, preventing to scroll from the first to the last by swiping to the left)

I'm asking this because in my app I have a panorama-page with only 2 PanoramaItems. The user can scroll from one to the other by swiping to the left or to the right. I want to prevent that other animation when scrolling beyond the last PanoramaItem. Is it possible?


回答1:


Sounds to me that you perhaps you shouldn't be using the Panorama at all. Looking at your other question about making the items smaller, it seems you want to push the Panorama beyond its designed purpose.

Perhaps you need is ScrollViewer with your two items (laid out using Grids) in a StackPanel with a horizontal orientation.




回答2:


This is apparently how panorama is designed to work. There isn't a parameter to disable the capability.

Breaking from this behaviour would likely confuse users by introducing inconsistent behaviour between apps.

There are visual cues to indicate to the user that they are wrapping around with their scrolling action. The Title is displayed from the begining again and if your background image supports it, the join of the right side and left side indicates that the panorarma is wrapping around.



来源:https://stackoverflow.com/questions/4620896/how-to-prevent-panorama-scrolling-from-last-item-to-first-item-in-a-windows-phon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!