This is a very first app we are going to create for Windows 8, an image browser using a FlipView control. The FlipView control lets people flip through views or items one at a time. Flip buttons appear on mouse hover and let people flip to the next or previous item.
First step: create a new Metro Style Blank App Project.
Now the project is created and the ‘MainPage.xaml’ is opened in the main window or you can open it from the solution explorer. Firstly we will add FlipView control which can be done by using the toolbox on left or writing some xaml code. The code for adding a FlipView is written below, we have used HorizontalAlignment and VerticalAlignment so that our control comes in center of the screen.
<FlipView HorizontalAlignment=”Center” VerticalAlignment=”Center”>
FlipView control can contain many FlipViewItem in it, which will flipped once at a time, inside the FlipViewItem we define what is to be displayed, since we are making a image gallery we will use Image control inside every FlipViewItem we add. Here is the complete snippet of the code.
I have added three images as a sample, you can add as many as u can or u can bind the image control programmatically to retrieve ‘n’ number of images. You might have noticed the beauty of Windows 8 SDK, i haven’t used any C# code and i have a nice light weight image browser. Debug the app.
Ask for source code. Cheers