CONTENTS

Chapter 1: A Glimpse into the Future

The Game Changer

What Makes Windows 8 Different?

Getting Around in Windows 8

Windows Store App Development

Hello Windows 8

Types of Windows Store Apps

Split Applications

Summary

Chapter 2: What Is XAML?

A Quick XAML History Lesson

XAML Basics

XAML in Visual Studio 2012

Controls for Windows 8

Summary

Chapter 3: Enhancing Your Apps with Control Styles, Data Binding, and Semantic Zoom

Customizing Your Apps

Styling Controls

Data Binding

Windows 8 Data Binding Controls

Using SemanticZoom

Using Custom Controls

Summary

Chapter 4: Windows 8 User Interface Final Touches

Application Bars, Notifications, Splash Screens, and Live Tiles

Working with the App Bar

Adding Notifications

Creating Live Tiles

Splash Screen

Summary

Chapter 5: Application Life Cycle

Applications Reborn

What Is the Windows 8 Life Cycle?

Background Operations

Summary

Chapter 6: Handling Data, Files, and Networking

Getting Started with Data, Files, and Networking

Handling Application Data and Files

Networking

Example: Leaderboard App

Summary

Chapter 7: Sensors

Windows Sensor Platform

Using the 3-D Accelerometer

Using the 3-D Compass

Using the 3-D Gyrometer

Using the Inclinometer

Using the Ambient Light Sensor

Using the Orientation Sensors

Summary

Chapter 8: Geolocation

What Is Geolocation?

Geolocation in Windows 8

Using the Bing Maps SDK

Getting Directions

Summary

Chapter 9: Application Contracts and Extensions

App Contracts and Extensions

Using the File Picker Contract

Using the Cached File Updater Contract

Using the Play To Contract

Using the Search Contract

Using the Settings Contract

Using the Share Contract

Using the Account Picture Provider Extension

Using the AutoPlay Extension

Using the Background Tasks Extension

Using the Camera Settings Extension

Using the Contact Picker Extension

Using the File Activation Extension

Using the Game Explorer Extension

Using the Print Task Settings Extension

Using the Protocol Activation Extension

Using SSL/Certificates Extension

Summary

Chapter 10: Windows Store Application Architecture

Best Practices for Your Apps

Understanding MVVM

Locating ViewModels

Refactoring the Artist Browser

Using Commands to Handle Input

Using MVVM Frameworks

Summary

Chapter 11: Windows Store and Monetization

Windows Store Overview

How Consumers See Your App

Selling Your Apps

Application Packaging

Summary

Chapter 12: Putting It All Together: Building a Windows Store Application

Welcome to the Final Chapter of the Book

Designing the Wrox BookStore App

Diving into the Code

Creating the Home Page

Drilling Down into Groups

Showing Detailed Book Information

Providing a Wish List Feature with SkyDrive

Updating the Tile and Splash Screen

Getting Ready for the Store

Summary

Introduction

Advertisements

Chapter 1

A Glimpse into the Future

WHAT’S IN THIS CHAPTER?

Understanding the Windows 8 difference

Navigating in Windows 8

How to develop a Windows Store App

Building a Hello Windows App

What type of Windows Store App is best for you?

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter in code file 205709 C01.zip at http://www.wrox.com/remtitle.cgi?isbn=1118205707 on the Download Code tab.

THE GAME CHANGER

In a developer’s life, you have a handful of moments in which a new “game-changing” technology release actually lives up to the hype. This could be new hardware or software, but it is especially game-changing when it’s for new operating systems. Often a new OS is just a more reliable working version of the one that came before it with several new visual upgrades. It is rare that an OS release changes the game so much that developers must reboot their knowledge and think about creating apps in a “different” way. This happened with the original release of Windows, which gave MS developers a graphical user interface with a windowed environment. It happened again with Windows 95 with the introduction of the 32-bit operating system and with Internet Explorer that hosted new computing features, including better support for windowed gaming through DirectX and more memory, larger hard drives, and more powerful programs overall.

Now with the pending release of Windows 8, developers are on the forefront of yet another major evolution in programming and user interface design. Instead of creating applications that appeal only to a PC, you now have the option to create apps that run on a myriad of devices, including PCs, cell phones, tablets, TVs, and more. Windows 8 and WinRT help you get there in ways that simply were previously not possible. The new convergence of devices and programming support coming from Microsoft for Windows 8 provide opportunities for developers to create innovative solutions, which includes new, improved user interfaces that target multiple devices while using similar or, in many cases, the same underlying code base.

WHAT MAKES WINDOWS 8 DIFFERENT?

Although Windows 8 concepts are now rapidly being applied throughout the Microsoft ecosystem, they’ve actually been around for some time. More than likely, if you were a first-generation Zune software owner, you noticed how drastically different the user interface was for both the Zune hardware and the software. In Figure 1-1 you can quickly see the stark difference between a standard Windows application and the Zune software that first started to show the Windows 8 design principles that are now showcased in Windows Phone and ultimately across the entire Windows product line with the release of Windows 8.

FIGURE 1-1

Understanding Windows 8: The Zune Concept

Although the Zune HARDWARE NEVER DID CATCH ON WITH the mass markets with the success that the iPod from Apple did, the software internally left a lasting mark at Microsoft. What the Zune software did well was place emphasis on application content rather than on the chrome. The Zune software didn’t have hundreds of menu options and toolbars spread throughout the app. You also didn’t see multiple windows that users could drag across the screen. Instead you had album artwork, song titles, meta data about the music, and controls specific to the actual function you were using. The software was easy to use, and many of the more complex functions were handled with a simple right-click context menu and a modal dialog, as shown in Figure 1-2, so users could always get back to where they started.

FIGURE 1-2

Compared to a traditional Windows application, this was definitely a different way to do things. With the iPod cruising and the iPhone on its way, Microsoft needed a way to get into the exploding mobile market and to differentiate itself from both Android and iOS competition. Instead of making small changes to the existing Windows mobile platform, Microsoft looked to the Zune software for its design principles to achieve its goals in the mobile space. The Zune software team essentially created a new way to look at the user interface and the design behind it: Windows 8.

To stand out from the crowd, Microsoft used the Windows 8 design concepts in its upcoming release of the new Windows Phone 7. However, this platform was not just a direct copy of Zune; Microsoft took the Windows 8 design concept even further by creating an entirely new way to develop applications that focused on content over chrome.

Microsoft invested research time and money into gestures that gave the best overall experience on a mobile device, and it determined how to apply those gestures to the user interface for phone apps. This led to some groundbreaking controls and concepts. An example is the panorama control that shows a horizontally scrolling user interface, giving users a basic preview of available content when they scroll.

Windows Phone 7 Carry-overs

Windows Phone 7 introduced several new user interface concepts that have carried over into Windows 8. Live tiles is an example of this and is now an integral part of the newly enhanced Start screen in Windows 8. Live tiles gives users several customizable tiles that continuously update with the latest relevant information for the application that they represent. This could be an e-mail application that always displays the latest count of unread e-mail messages or the latest tweet from a preferred Twitter user. Microsoft offers many different possibilities for these tiles and gives guidance on how your application should attempt to use tiles, a topic covered in Chapter 4, “Windows 8 User Interfaces.” Figure 1-3 shows the new Windows 8 start screen and several live tiles, which continuously update with information downloaded in the background through various web services.

FIGURE 1-3

GETTING AROUND IN WINDOWS 8

Typically, it’s simple to get up to speed on new versions of Windows. Most of the familiar operating system tools and interactions don’t change. However, because Windows 8 is geared to a wide range of devices, Microsoft made significant changes to the way the user interface and navigation operating systems work. As a Windows 8 developer, you need to know how to get around Windows 8 and how it affects the applications you create and deploy. This section covers some of these navigational changes.

The Login Screen

The first thing you notice is that the standard login screen is different than previous versions of Windows. The new startup screen offers icons that enable you to quickly see information before logging in. The number of icons and type of information change depending on which applications are currently running (if they support this feature). For example, if you have the default Mail application running and then lock the computer, you can see a Mail icon along with the number of currently unread e-mails. This new feature is not only restricted to default Windows Store applications; you can also integrate your applications with the startup screen so that a meaningful icon displays and reflects data from your app.

The Start Screen

You can quickly see that gestures play a big role in Windows 8 whether you use them on a tablet or a PC. To actually get past the initial screen and move to the login screen, you simply click anywhere on the screen. Once logged in you are presented with the new Start screen. You can notice that:

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!