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 Settings API

Windows Phone SDK provides the ability to save some content in application storage. Application settings could be understood as a key-value pair that is saved within isolated storage. Settings API provides a class called IsolatedStorageSettings, and this mechanism is the best option to store some small pieces of data such as settings or application state. IsolatedStorageSettings is a kind of dictionary (a list of key and value properties) that contains unique keys and its values. The stored value is an object type, so we can store whatever we want there; just ensure you cast the proper class when getting it from the storage settings.

There are three methods that are used most often while dealing with settings:

  • Contains: This returns true or false according to the settings store contain key passed in the method parameter

  • Add: This adds a key-value pair to the settings dictionary; it is important that we do not try to add two items with the same key because the key is a unique...