Reputation: 187
I am developing windows store app in c#/XAML.Since it is mandatory for my app to support the snapped view of windows 8 so that it passes certification.I have decided to show a static image or add an scrollviewer to my pages like most of other apps do when snapped. The thing is I want to know how to determine whether my app has been put into snapped or filled view? I want to detect it and I want to add a horizontal scroll to my app pages so that user can scroll even though it is in snapped or filled view. I glanced this Tutorial,but I need more guidance for applying my logic.
Upvotes: 0
Views: 437
Reputation: 2891
The usual method is to create two layouts(grids) on the same page that bind to the same data, one for full screen and one for snapped(you can also create more if you want to support portrait vs landscape). By default the full screen layout is Visible and the Snapped is Collapsed. Listen for the SizeChanged event and then show/hide the correct layout depending on the new size.
Upvotes: 0