-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Windows Application Development Cookbook
By :
As already mentioned, the StackPanel control does not automatically allow you to scroll its content. For this reason, when the screen is not big enough, some parts could just disappear. Of course, such a situation should not occur. For this reason, in this recipe, you will learn how to use ScrollViewer to scroll the photo gallery created as a collection of images, presented in StackPanel.
To step through this recipe, you only need the automatically generated project.
To arrange controls in a scrollable view to form a simple photo gallery, perform the following steps:
Add four images (named Gallery1.jpg, Gallery2.jpg, Gallery3.jpg, and Gallery4.jpg) to the Assets directory, as explained in the Adding an image recipe.
Modify the content of the MainPage.xaml file as follows:
<Page (...)>
<ScrollViewer
Padding="10"
ScrollViewer.VerticalScrollBarVisibility...