Building a Windows Store Application

As with most concepts in the IDE, the best way to truly understand how the Visual Studio tools work is to go through the process of creating an application using those tools. Our inspiration will be the WPF image viewer application that we built in Chapter 21. But instead of just constructing the same image editor, we’ll create an application that enables you to rate pictures. We’ll try to reuse as many of the concepts and actual code as we can from our earlier WPF effort, but we’ll have some unique constructs to deal with in the WinRT world.

As a base set of requirements, here are the capabilities we will try to deliver:

Image Display a list of pictures from the user’s Pictures library.

Image Click a photo that will provide details about it.

Image Edit the picture’s rating value and save it back to disk.

Image Make everything inherently usable on touch-enabled devices. (That is, the application will work as well for touch only as it will for keyboard and mouse setups.)

The application will make use of the GridView and the app bar and will use capabilities to tie into the Pictures library. With the end goal now in sight, let’s get started.


Note

It is worthwhile to reinforce the fact that the Windows Runtime Library (WinRT), although powerful in many different ways, is not a complete replacement either for Win32 or for the .NET Framework. In other words, there will still be some things that are extremely difficult or impossible to do with WinRT. For example, our WPF sample application from Chapter 21 was able to do some simple image manipulations (such as blurring an image) in just a few lines of code. WinRT, however, doesn’t have the required pixel shader classes to do this. Trying to implement that same functionality using C#, XAML, and WinRT is nearly impossible (or at best, prohibitively difficult without third-party libraries).

Keep in mind that WinRT was first and foremost designed to equip a certain class of applications with what they need to implement their feature set. Writing a full-fledged image-editing application like Adobe Photoshop is an exercise still best left in the desktop, and not Windows Store, world.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset