Tech Ed North America 2010 9/20/2018 5:15 PM Required Slide SESSION CODE: WPH305 An In-Depth View of Building Applications for Windows Phone 7 with Silverlight (Part 2) Peter Torr, http://blogs.msdn.com/ptorr/ Program Manager Microsoft Corporation © 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.
SETTING CONTEXT Assumes existing Silverlight knowledge Plenty of on-line resources to help you learn! Deeper architectural content found in Soumitra’s talk WPH313 (earlier this morning); look for recording Istvan Cseri’s Mix talk http://live.visitmix.com/MIX10/Sessions/CL18
KEY TAKE-AWAYS Applications follow a page-based structure The UI is clean, simple, and customizable Cloud services enhance the user experience
BUILDING APPLICATIONS, PARTS 1 & 2 Shawn (Part 1) Peter (Part 2) Introduction Output Input Web Browser OS App Integration Application structure Controls & theming Connected services
APPLICATION STRUCTURE
APPLICATION COMPONENTS: WEB Host (Browser) Application (Website) Pages (HTML) Content (Silverlight) http://mysite.com/foo.html mysite.com
APPLICATION COMPONENTS: PHONE Host (TaskHost) Application (XAP) Pages (Silverlight) Content (Silverlight) Games (XNA) myapp.xap
APPLICATION STRUCTURE Applications are built like web sites Functionality is split into pages Forward navigation via links Backward navigation via Back Users can navigate across different applications Previous applications (pages) are in the back stack
APPLICATION STRUCTURE Pages, navigation, orientation, system chrome DEMO
HARDWARE BUTTONS
HARDWARE BUTTONS OVERVIEW All Windows Phones have several hardware buttons Back, Start, Search, Volume, Camera, etc. System defines actions for all of them The Back button is the only one you can override
BACK BUTTON FUNDAMENTALS Back performs two key tasks in Windows Phone 7 Return to the previous place Dismiss popup UI Consider the user’s perception of “place” and “popup” Not necessarily tied to specific controls These are the only two tasks it should perform Do not override Back to perform some other action Future updates may enforce these rules Games are an exception; they can show a pause menu when the user hits back.
OVERRIDING THE BACK BUTTON Dismissing a dialog DEMO
A WORLD OF CONSTANT INTERRUPTIONS phone calls low battery lock screen reminders App switch txt msgs :-)
BASIC APPLICATION LIFETIME Not running Start Running Exit Splash screen App constructor Startup event Exit event Obscured by shell Moved to background
HIDDEN BY SHELL UI: OBSCURED Not in the CTP build HIDDEN BY SHELL UI: OBSCURED Phone call Reminder Battery low Running Obscure Unobscure Games enable user to resume What if they answer the phone? Game auto-pauses
MOVED TO BACKGROUND: DEACTIVATED Not in the CTP build MOVED TO BACKGROUND: DEACTIVATED Hit Start Open toast Lock screen Running Deactivate Suspended Activate User is back where they left off Load state to continue where you left off Save state for later use Assume your process is killed
Activation, deactivation, and idle detection APPLICATION LIFETIME Activation, deactivation, and idle detection DEMO
BUILDING APPLICATIONS, PARTS 1 & 2 Shawn (Part 1) Peter (Part 2) Introduction Output Input Web Browser OS App Integration Application structure Controls & theming Connected services
DEFAULT CONTROL TEMPLATES Simple and elegant Over-sized hit targets Heavy use of transparency
THEMING Enables user to personalize their phone Dark and light themes, each with several accent colours Built-in controls are automatically themed Applications can take advantage of theme values
Leveraging themes in your application CONTROLS AND THEMING Leveraging themes in your application Demo
AVAILABLE CONTROLS Core controls delivered in-ROM Button CheckBox TextBox … Some existing SL3 controls will work Ensure no usage of unsupported APIs Check for touch-friendliness & theme integration
CHOICE OF SCREEN RESOLUTION Windows Phone 7 is a single hardware & software platform Two screen resolutions to choose from: Wide VGA at launch (480 x 800) Half VGA in the future (320 x 480) Applications will be required to support both resolutions Updated tools will be available before phones hit the market
BUILDING APPLICATIONS, PARTS 1 & 2 Shawn (Part 1) Peter (Part 2) Introduction Output Input Web Browser OS App Integration Application structure Controls & theming Connected services
PUSH NOTIFICATIONS Server-initiated communication Enables key background scenarios Preserves battery life and user experience
14 15 NOTIFICATION TYPES New photos online! Seattle, WA: Sunny and 85 degrees
PUSH NOTIFICATIONS: DATA FLOW Data to tile Tile Push client Data to toast Toast Open push channel Data to App Return URI App Send URI to server Send push data to client Your service Push service Event Send push data to URI
Subscribing to and receiving push notifications DEMO
Smart device + cloud service Balance accuracy with time & power No emulator support LOCATION SERVICES Smart device + cloud service Balance accuracy with time & power Consistent API across platforms
LOCATION: SOURCES OF LOCATION GPS + Accuracy - Power - Speed - Indoors Cell towers - Accuracy + Power + Speed - Wilderness WiFi Location services +/- Accuracy +/- Power +/- Speed +/- Urban areas
LOCATION SERVICES Getting a location fix DEMO
KEY TAKE-AWAYS Applications follow a page-based structure The UI is clean, simple, and customizable Cloud services enhance the user experience
FURTHER INFORMATION http://blogs.msdn.com/ptorr – My blog http://developer.windowsphone.com – Downloads! http://live.visitmix.com – Watch talks from Mix http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/ – Windows Phone 7 support forums
RELATED CONTENT Breakout Sessions Tech Ed North America 2010 9/20/2018 5:15 PM RELATED CONTENT Breakout Sessions WPH313 | Windows Phone 7 Architecture Deep Dive WPH304 | An In-Depth View of Building Applications for Windows Phone 7 with Microsoft Silverlight (Part 1) WPH305 | An In-Depth View of Building Applications for Windows Phone 7 with Microsoft Silverlight (Part 2) WPH309 | Microsoft Silverlight Performance on Windows Phone WPH307 | Building Windows Phone Games with Microsoft XNA Game Studio WPH308 | Building a High Performance 3D Game for Windows Phone WPH312 | Understanding Marketplace and Making Money with Windows Phone 7 Applications WPH303 | Understanding the Windows Phone 7 Development Tools Hands-on Labs (session codes and titles) WPH01-HOL | Hello Windows Phone WPH02-HOL | Building Your First Windows Phone Application WPH04-HOL | Microsoft XNA Framework 4.0 for Windows Phones WPH06-HOL | Using Push Notifications and Windows Communication Foundation (WCF) Services © 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.
CALL TO ACTION Install the tools… Start coding… Give us feedback! What’s good? What’s bad? What’s really painful? http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/
QUIZ TIME QUIZ
Q & A IT’S QUESTION TIME… I’ll also be available after the talk and at the WPH booth in the TLC (Yellow section) Q & A
Windows Phone Resources Questions? Demos? The Latest phones? Visit the Windows Phone Technical Learning Center for demos and more… Business IT Resources www.windowsphone.com/business Developer Resources developer.windowsphone.com Experience Windows Phone 7 on-line and get a backstage pass www.windowsphone7.com
Win a Windows Phone Contest Hat Contest* How do you enter? Enter by visiting the Windows Phone booth, accepting a free Windows Phone branded hat, and wearing that hat during the Event. How am I selected? Each day of the event, a Windows Phone representative will randomly select up to 5 people who are observed wearing their Windows Phone branded hat Session Contest* During each Windows Phone session the moderator will post a question. The first person to correctly answer the question and called on by the moderator will potentially win Questions? Go to the WPH Information Counter at the TLC * Restrictions apply please see contest rules for eligibility and restrictions. Contest rules are displayed in the Technical Learning Center at the WPH info counter.
Related Windows Phone Content – Breakout Sessions Mon &Tue Monday WPH301 WP7: Deploy Microsoft Forefront Unified Access Gateway for Access Control to SharePoint, Exchange and more. WPH202 Deploying Windows Phone 7 with Exchange Server and SharePoint Server Tuesday WPH203 Overview of the Windows Phone 7 Application Platform WPH313 Windows Phone 7 Architecture Deep Dive WPH304 An In-Depth view at Building Applications for WP7 with Silverlight (Part 1) WPH305 An In-Depth view at Building Applications for WP7 with Silverlight (Part 2) WPH306 Developing Occasionally Connected Applications for Windows Phone 7
Related Windows Phone Content – Breakout Sessions Wed &Thu Wednesday WPH310 Designing and Developing for the Rich Mobile Web WPH311 Developing Mobile Code Today that will run on WP 7 Tomorrow WPH309 Silverlight performance on Windows Phone WPH307 Building Windows Phone Games with XNA WPH308 Building a High Performance 3D Game for Windows Phone Thursday WPH303 Understanding the Windows Phone 7 Development Tools WPH314 Learn Windows Phone 7 Development by Creating a Robotic T-Shirt Cannon WPH312 Understanding Marketplace and Making Money with WP7 Applications
Related Windows Phone Content – Interactive Session & HOL Windows Phone Interactive Sessions Windows Phone 7 Demo Only! Microsoft’s Next Generation Mobile Enterprise Application Platform (MEAP) Windows Phone 7 Application Performance Prepare for Windows Phone 7 Development! Coding practices you should start using now in Windows Mobile Windows Phone Hands On Labs Hello Windows Phone - Building Your first Windows Phone Application Microsoft Silverlight for Windows Phone Microsoft XNA Framework 4.0 for Windows Phones Using Push Notifications and Windows Communication Foundation (WCF) Services
Resources Learning Required Slide www.microsoft.com/teched Tech Ed North America 2010 9/20/2018 5:15 PM Required Slide Resources Learning Sessions On-Demand & Community Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning Resources for IT Professionals Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn © 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.
Complete an evaluation on CommNet and enter to win! Tech Ed North America 2010 9/20/2018 5:15 PM Required Slide Complete an evaluation on CommNet and enter to win! © 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.
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31st http://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year
Tech Ed North America 2010 9/20/2018 5:15 PM © 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. © 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.
Tech Ed North America 2010 9/20/2018 5:15 PM © 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.