Home > Store

Essential Windows Phone 8, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Essential Windows Phone 8, 2nd Edition


  • Sorry, this book is no longer in print.
Not for Sale

eBook (Watermarked)

  • Your Price: $31.99
  • List Price: $39.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.


  • Copyright 2013
  • Dimensions: 7" x 9-1/8"
  • Pages: 624
  • Edition: 2nd
  • Book
  • ISBN-10: 0-321-90494-X
  • ISBN-13: 978-0-321-90494-2

“Shawn has created a guide that is easy to read, up-to-date, and comprehensive–covering the entire application surface area for Windows Phone developers. Enjoy!”
–Jeff Wilcox, Senior Software Development Engineer, Microsoft

Essential Windows® Phone 8 is the definitive guide to creating powerful mobile apps with Microsoft’s dramatically improved Windows Phone 8 platform. Ten-time Microsoft MVP Shawn Wildermuth draws on his extensive experience teaching Windows Phone development, helping you to get started fast and master techniques that lead to truly outstanding solutions.

Updated throughout, this edition reflects new APIs and development best practices, ranging from new WinRT APIs to voice integration. It also contains a comprehensive new chapter on developing enterprise solutions for business.

After introducing the platform and its key improvements, Shawn dives directly into the essentials. Using realistic code, he illustrates today’s best techniques for delivering robust, well-performing apps. You’ll build a complete app from start to finish and then deepen your skills with increasingly sophisticated techniques.

From planning through delivery, Shawn guides you through the entire lifecycle, helping you make the most of Windows Phone 8’s valuable capabilities. Whether you’re a Windows developer going mobile or a mobile developer moving to Windows Phone, here are all the skills you’ll need.

Coverage includes

  • Setting up the WP8 development environment, including the emulator
  • Using XAML to fully control the look and feel of your app’s interface
  • Providing robust user interactivity through controls
  • Creating mobile experiences built around the real needs of Windows Phone users
  • Localizing your app for native languages and global markets
  • Utilizing vibration, motion, sound, the camera, or other hardware features
  • Supporting voice commands such as “Call Mom” or “Open Twitter”
  • Integrating features that use Contacts, Appointments, Alarms, the media library and hubs, and the lock screen
  • Storing data in simple files, caches, or a full-fledged database
  • Multitasking in the background without compromising performance
  • Implementing location-aware apps that can track where users are
  • Retrieving external data and assets via REST, Web services, push notifications, or Windows Live
  • Preparing your application for the Windows Phone Store
  • Building and distributing enterprise apps for your company’s internal customers

Sample Content

Online Sample Chapter

Writing Your First Windows Phone 8 Application

Sample Pages

Download the sample pages (includes Chapter 2 and Index)

Table of Contents

1  Introducing Windows Phone     1

A Different Kind of Phone     1

Phone Specifications     7

   Input Patterns     10

   Designing for Touch     11

   Hardware Buttons     12

   Keyboards     12

   Sensors     15

Application Lifecycle     15

Driving Your Development with Services     17

Live Tiles     18

The Windows Phone Store     19

   Distributing Your Application Through the Windows Phone Store     20

   App Hub Submissions     20

   Application Policies     22

   Content Policies     25

Where Are We?     26

2  Writing Your First Phone Application     27

Preparing Your Machine     27

Creating a New Project     29

   Visual Studio     29

   XAML     34

Designing with Blend     39

Adding Code     48

   Working with Events     51

   Debugging in the Emulator     52

   Debugging with a Device     53

   Using Touch     58

Working with the Phone     61

Where Are We?     66

3  XAML Overview     67

What Is XAML?     67

XAML Object Properties     69

   Understanding XAML Namespaces     70

Naming in XAML     71

Visual Containers     72

Visual Grammar     77

   Shapes     77

   Brushes     79

   Colors     80

   Text     81

Images     82

Transformations and Animations     84

   Transformations     84

   Animations     87

XAML Styling     90

   Understanding Resources     91

   Understanding Styles     93

Where Are We?     96

4  Controls     97

Controls in XAML     97

   Simple Controls     100

   Content Controls     106

   List Controls     107

Phone-Specific Controls     108

   Panorama Control     108

   Pivot Control     112

Data Binding     115

   Simple Data Binding     115

   Using a DataTemplate     117

   Improving Scrolling Performance     118

   Binding Formatting     120

   Element Binding     121

   Converters     121

   Data Binding Errors     123

   Control Templates     125

Windows Phone Toolkit     130

   AutoCompleteBox Control     131

   ContextMenu Control     133

   DatePicker and TimePicker Controls     135

   ListPicker Control     137

   LongListSelector Control     140

   PerformanceProgressBar Control     144

   ToggleSwitch Control     145

   ExpanderView Control     146

   PhoneTextBox Control     147

   CustomMessageBox     149

   WrapPanel Layout Container     153

Where Are We?     156

5  Designing for the Phone     157

The Third Screen     157

   It Is a Phone, Right?     160

Deciding on an Application Paradigm     162

   Panorama     164

   Pivot     166

   Simple Pages     169

Microsoft Expression Blend     169

   Creating a Project     170

   A Tour Around Blend     171

Blend Basics     180

   Layout     180

   Brushes     186

   Creating Animations     191

   Working with Behaviors     196

Phone-Specific Design     199

   The ApplicationBar in Blend     199

   Using the Panorama Control in Blend     203

   Using the Pivot Control in Blend     206

Previewing Applications     209

Designing with Visual Studio     210

Implementing the Look and Feel of the Phone     212

Where Are We?     215

6  Developing for the Phone     217

Application Lifecycle     217

   Navigation     220

   Tombstoning     227

The Phone Experience     233

   Orientation     233

   Designing for Touch     236

   Application Client Area     245

   Application Bar     247

   Understanding Idle Detection     249

   The Tilt Effect     250

Localizing Your Phone Application     252

Where Are We?     258

7  Phone Hardware     261

Using Vibration     261

Using Motion     262

   Emulating Motion     266

Using Sound     268

   Playing Sound with MediaElement     269

   Using XNA Libraries     270

   Playing Sounds with XNA     270

   Adjusting Playback     271

   Recording Sounds     272

Working with the Camera     275

   Using the PhotoCamera Class     276

   Raw Hardware Access     281

   Camera Lens App     284

The Clipboard API     286

Location APIs     287

   Location Permission     287

   Accessing Location Information     289

   Turning Coordinates into Addresses     294

   Emulating Location Information     295

Voice Commands     299

Speech Recognition     306

Speech Synthesis     310

Bluetooth and VOIP     316

Where Are We?     316

8  Phone Integration     317

Contacts and Appointments     317

   Contacts     318

   Appointments    323

Alarms and Reminders     324

   Creating an Alarm     327

   Creating a Reminder     328

   Accessing Existing Notifications     329

Using Tasks     330

   Launchers     333

   Choosers     344

Media and Picture Hubs     355

   Accessing Music     355

   Playing Music     359

   Accessing Pictures     360

   Storing Pictures     363

   Integrating into the Pictures Hub     364

   Integrating into the Music and Videos Hub     367

Live Tiles     371

   Main Live Tile     375

   Secondary Tiles     377

Other Ways of Launching Your App     380

   Using a Custom Protocol     380

   Using a File Association     384

Where Are We?     387

9  Databases and Storage     389

Storing Data     389

Storage     390

   Serialization     395

Local Databases     401

   Getting Started     402

   Optimizing the Context Class     408

   Associations     412

   Using an Existing Database     418

   Schema Updates     420

   Database Security     422

Where Are We?     423

10  Multitasking     425

Multitasking     425

Background Agents     426

   Periodic Agent     428

   Resource-Intensive Agent     436

   Audio Agent     439

Location-Aware Apps     448

Background Transfer Service     452

    Requirements and Limitations     453

   Requesting Transfers     454

   Monitoring Requests     456

Where Are We?     461

 11  Services     463

The Network Stack     464

   The WebClient Class     464

   Accessing Network Information     467

Consuming JavaScript Object Notation     470

   Using JSON Serialization     472

   Parsing JSON     473

Web Services     477

Consuming OData     482

   How OData Works     483

   The URI     484

   Using OData on the Phone     492

   Generating a Service Reference for OData     492

   Retrieving Data     493

   Updating Data     496

Using Push Notifications     497

   Push Notification Requirements     499

   Preparing the Application for Push Notifications     499

   Setting Up the Server for Push Notifications     501

   Raw Notifications     504

   Sending Toast Notifications     516

   Creating Live Tiles     519

   Handling Push Notification Errors     522

Where Are We?     524

12  Making Money     525

What Is the Store?     525

   How It Works     527

   Charging for Apps     529

   Getting Paid     531

Submitting Your App     533

   Preparing Your Application     533

   The Submission Process     538

   After the Submission     545

Modifying Your Application     548

Dealing with Failed Submissions     548

Using Ads in Your Apps     551

Where Are We?     552

13 Enterprise Phone Apps     553

Enterprise Apps?     553

Registering Your Company     554

Buying a Symantec Code-Signing Certificate     556

Installing the Certificate     558

Application Enrollment Token     563

Registering Phones     564

Preparing Apps for Distribution     566

Building a Company Hub     567

Where Are We?     571

Index     573


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership