40
7 David Isbitski Sr. Developer Evangelist CoolStuffWith.Net @theDaveDev [email protected] Apps with Silverlight

Windows Phone App Development

Embed Size (px)

DESCRIPTION

Windows Phone Development using Silverlight overview.Sourecode available at http://github.com/disbitski

Citation preview

Page 1: Windows Phone App Development

7

David IsbitskiSr. Developer [email protected]@microsoft.com

Apps with Silverlight

Page 2: Windows Phone App Development

Got an App idea. Now what?

Page 3: Windows Phone App Development
Page 4: Windows Phone App Development

Agenda

Calling a Web Service

What makes a WP7 app?

Layout and UI

Navigation and Back Button

App Lifecycle and State

Page 5: Windows Phone App Development

Agenda

Monetize with PubCenter Ads

Application Bar

Tasks - Marketplace

Any Additional Gotchas

Page 6: Windows Phone App Development

Why Windows Phone 7?

Page 7: Windows Phone App Development
Page 8: Windows Phone App Development
Page 9: Windows Phone App Development

App Layout & UI

Page 10: Windows Phone App Development

DEFAULT CONTROL TEMPLATES

Simple and elegant

Over-sized hit targets

Heavy use of transparency

Page 11: Windows Phone App Development

THEMING Enables user to personalize their phone

Dark and light themes, each with several accent colors

Built-in controls are automatically themed

Applications can take advantage of theme values

Page 12: Windows Phone App Development

Part 1 – App Layout & UI

Page 13: Windows Phone App Development

External Data

Page 14: Windows Phone App Development

Bing 2.0 APIs

Free, easy to use Web Service

Portal http://bing.com/developers

Classes BingService SearchRequest SourceTypes

Page 15: Windows Phone App Development

Part 2 – Bing Search API 2.0

Page 16: Windows Phone App Development

Page Navigation

Page 17: Windows Phone App Development

Phone applicationProvides UI represented as XAML pages connected into cross-app flows by URI’s

UI Model: Familiar Web Concepts

Web applicationProvide media represented as HTTP resources linked by URL’s

Shell frameRequests pages, renders UI, and handles navigation across apps

Sessions and back stackGroups together sequences of pages corresponding to a user’s activity across apps

Web browserRequests HTTP resources, renders them, and handles navigation across sites

History and tabsGroups together sequences of HTTP resources corresponding to a user’s activity across sites

Page 18: Windows Phone App Development

Retained in shell frame to support resuming paused

sessions

Discarded while the session is paused

UI and State Management: Concepts

Page UIDescribes the visual

appearance of a page

Page StateContains data that

describes an instance of a page,

analogous to browser cookie

Page 19: Windows Phone App Development

19

Back Button is important!

• Only way to exit an App

• Page Navigation – avoid circular references

• Multi-Tasking (Mango)

Page 20: Windows Phone App Development

Application Lifecycle

Page 21: Windows Phone App Development

App Lifecycle Tombstoning

Your application has lost focus This can happen for a couple of reasons:

Back Button, Start Button, User clicked on a Push Notification, a Task is called, Phone Call

Found in App.xaml.cs Events to Handle

Application_Launching, Application_Activated, Application_Deactivated, Application_Closing

Page 22: Windows Phone App Development

App State - Storage Isolated Storage

Settings and Custom Data Secure and Sandboxed Logical Folder Structure via APIs No quota currently

Be responsible and inform/empower user Session State

PhoneApplicationService.Current.State Goes away on App exit or lost focus

Page 23: Windows Phone App Development

Part 3 – Navigation & State

Page 24: Windows Phone App Development

Application Bar

Page 25: Windows Phone App Development

AppBar Toolbar

Up to 4 icons Can set transparency level Slide up Menu can display more items

Can declare in code or XAML Built in support in Blend!

Found under Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons

Page 26: Windows Phone App Development

AppBar Icons

48 pixels by 48 pixels

White foreground on a transparent

background

Using alpha channel.

Icon get colorized to current style

Circle will be added

Page 27: Windows Phone App Development

Part 4 – Application Bar

Page 28: Windows Phone App Development

Tasks

Page 29: Windows Phone App Development

Tasks - Launchers and Choosers Launcher

Launches one of the built-in applications through which a user completes a task

No data is returned to calling application Example: PhoneCallTask

Chooser Launches one of the built-in applications through which

a user completes a task, and which returns some data to calling application

When caller completes, calling application is activated and supplied with the Chooser result

Example: PhotoChooserTask

29

Page 30: Windows Phone App Development

Launchers & ChoosersLaunchers EmailComposeTask MarketplaceDetailTask MarketplaceHubTask MarketplaceReviewTas

k MarketplaceSearchTas

k MediaPlayerLauncher PhoneCallTask SearchTask SMSComposeTask WebBrowserTask

Choosers CameraCaptureTask EmailAddressChooserT

ask PhoneNumberChooser

Task PhotoChooserTask SaveEmailAddressTask SavePhoneNumberTas

k

Page 31: Windows Phone App Development

Part 5 – Marketplace Task

Page 32: Windows Phone App Development

AppHub & PubCenter

Page 33: Windows Phone App Development
Page 34: Windows Phone App Development
Page 35: Windows Phone App Development

Part 6 – Monetize with Ads

Page 36: Windows Phone App Development

Any additional gotchas?

Page 37: Windows Phone App Development

Supports Themes AppBar Icons GPS Privacy

Back Button Tech Contact Info

Marketplace Screenshots

No Native Code

(Shared Libs)

App State (Tombstonin

g)

Page 38: Windows Phone App Development
Page 39: Windows Phone App Development

7

David IsbitskiSr. Developer [email protected]@microsoft.com

Windows Phone Jumpstart

Page 40: Windows Phone App Development

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.