Mobile Zone is brought to you in partnership with:

I started my interest in IT sector from class 11th and from then I never stopped, cover page designing was my first step towards it. Then I started my organization for PHP web development. After entering my college life, I was elected as Microsoft Student Partner which was a great turning point in my life, now I'm also a Most Valuavle Professional (MVP) for Mindcracker Network. I also write blog. Application development and web development can be counted as my hobby, my organization now deals in technical trainings also. Shubham has posted 2 posts at DZone. You can read more from them at their website. View Full User Profile

Building an Image Browser for Windows 8

01.24.2013
| 3802 views |
  • submit to reddit

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>

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 :)

Published at DZone with permission of its author, Shubham Saxena.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)