Building an Image Browser for Windows 8
Join the DZone community and get the full member experience.Join For Free
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
Opinions expressed by DZone contributors are their own.