Book Image

Windows Phone 8 Application Development Essentials

By : Tomasz Szostak
Book Image

Windows Phone 8 Application Development Essentials

By: Tomasz Szostak

Overview of this book

<p>Windows Phone 8 replaces Windows Phone 7 devices with the Windows NT kernel found on many Windows 8 components. Windows 8 will give you more options to develop better and more visually appealing PC and Tablet applications.</p> <p>A practical guide that will show you how you how to create testable MVVM applications keeping in mind the best UI practices. You will learn how to integrate peripheral sensors and social portals like Facebook and Twitter into your applications. This book shows the advantages of using modern patterns instead of the traditional way of programming.</p> <p>Starting with a Windows Phone UI description, the guide then takes you through the world of fast and fluid design guidelines. After that, you will be shown the beauty of C# and MVVM advantages, finishing with clear descriptions of mobile-application integration with peripherals and social media. Clear and well-described examples throughout will help you become a WP8 developer.</p> <p>You will also learn how to test your applications using Unit Test cut dependencies in your methods using Mocks, and use the newest features of C# such as asynchronous methods. If you are more of a designer than a developer, then there is also an explanation on how to create a consistent look and feel for Windows Phone applications.</p>
Table of Contents (12 chapters)

The project structure

After creating the project in Visual Studio from the default template, we get Solution including one project. This project is ready to be launched in the emulator or deployed to the device — but has no functionality; it is our job to change this. From the beginning, the project contains the App.xaml file.

The App.xaml file and its code behind take care of the following:

  • Declaration of global resources

  • Handling application lifecycle events

  • Unhandled exception detection

Global resources declarations can be defined in App.xaml under the <Application.Resources> node, and their main advantage is accessibility—they can be reached from any place in the project. Global resources can be implemented as control styles, setters, and animations. However, we should use our common sense because application-level resource could impact the performance of our application. Why? Because global resources are loaded before any page is loaded while the splash screen is showing. If we will...