Book Image

Windows Phone 7.5 Application Development with F#

By : Lohith G N
Book Image

Windows Phone 7.5 Application Development with F#

By: Lohith G N

Overview of this book

Windows Phone is an OS which is also a platform in itself and provides an opportunity for application developers to build their apps and sell them on the Windows Phone Marketplace. Windows Phone is slowly catching up in the race with iOS and Android. Although well suited for scientific and mathematical calculations, the Windows Phone Platform provides an opportunity to program in F#. "Windows Phone 7.5 Application Development with F#"  focuses on making the user aware of Windows Phone App Development with the F# programming language in as short a time as possible. The book teaches you about the development environment, helps you understand the project structure, understand the controls, and ends with some of the cool features of the platform like sensors, launchers, and choosers. The book starts off with enabling the user with the right tools required to start developing. It focuses on getting the IDE ready, and project and item templates. By the end of the book the user will be familiarized with the different aspects of the platform itself. The transition from one chapter to another is short and focused so that you can get to the meat of the topic quickly.
Table of Contents (16 chapters)
Windows Phone 7.5 Application Development with F#
About the Author
About the Reviewers
Windows Phone Screen Orientations
Windows Phone Gesture Events
Windows Phone and Data Access


Windows Phone 7.5 Application Development with F# is a book for anyone who is familiar with F# and wants to try a hand at Windows Phone application development. This book will cover the basics of application building on the Windows Phone platform but using F# as the language. We will cover everything, from basic requirements to programming on the platform, to project templates, and to developing screens. This book will act as a ready reckoner for folks who want to quickly look at the concepts of Windows Phone application programming.

What this book covers

Chapter 1, Setting up Windows Phone Development with F#, is all about setting the stage for Windows Phone development with F#. Here we will take a look at the Windows Phone platform, the F# language, and the prerequisites required to start developing applications.

Chapter 2, F# Windows Phone Project Overview, is all about becoming familiar with the different project templates available for developing Windows Phone applications. We will decipher each project template and understand what each project type contains and how to work with each type. We will also look at some of the item templates required for app development.

Chapter 3, Working with Windows Phone Controls, helps us understand the controls provided by the platform. We will look at more than 10 controls provided by this platform. We will take one control and walk you through how to work with that control. By the end of this chapter you will be familiar with the "toys" you can use to play on this platform.

Chapter 4, Windows Phone Screen Orientations, introduces you to a concept called orientation and shows you how to deal with it in your applications. Since a phone is a handheld device, the user has all freedom to turn the phone upside down or rotate it left or right. This changes the orientation of your application, and as the developer, it is your responsibility to react to this. This chapter will help you understand the different orientations and how to code for handling orientation changes.

Chapter 5, Windows Phone Gesture Events, teaches you how to read the gestures performed by the user in your application. We will take a look at what gestures are and what gesture events are supported by the platform. We will also look at how to handle gesture events in your applications.

Chapter 6, Windows Phone Navigation, is all about understanding how to allow users to move from one screen to another screen in your application. We will look at the Windows Phone navigation model and different techniques to enable navigation.

Chapter 7, Windows Phone and Data Access, helps you understand how to store and access data on the Windows Phone platform since one of the fundamental aspects of any application is data. We will try to understand the different data source options available on the platform.

Chapter 8, Launchers and Choosers, introduces a whole set of built-in applications, also known as Launchers and Choosers. Launchers and Choosers help us make use of the built-in apps or call the built-in apps right from our own apps.

Chapter 9, Windows Phone Sensors, introduces you to multiple sensors supported by Windows Phone that allow apps to determine orientation and motion of the device. With sensors, it is possible to develop apps that make the physical device itself an input. Typical uses of these sensors are for games, location-aware apps, and so on. The Windows Phone platform provides APIs to retrieve data from the individual sensors.

What you need for this book

In order to work through this book and to learn Windows Phone 7.5 Application Development with F#, you will need to have the following software:

  • Visual Studio 2010

  • Windows Phone Software Development Kit 7.1

  • Windows Phone Project and Item Template for F#

Who this book is for

If you know F# and are interested in developing for the Windows Phone 7.5 platform, this book is for you. It gives you a jump-start to developing Windows Phone 7.5 apps using F#.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "This contains the launch point, which is App.XAML."

A block of code is set as follows:

public AppHost()
      // Standard Silverlight initialization
      app = new WindowsPhoneApp.App(this);

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on OK once you are done with naming the application."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.