23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Capturing a Photo from the Camera ................................................................................................................................ 75<br />

Sharing the Fun! ....................................................................................................................................................................... 78<br />

Extra Credit: Receiving Messages from the iframe ....................................................................................................... 81<br />

The Other Templates ................................................................................................................................................................... 82<br />

Fixed Layout Template ............................................................................................................................................................ 82<br />

Navigation Template ............................................................................................................................................................... 83<br />

Grid Template ............................................................................................................................................................................ 83<br />

Split Template ............................................................................................................................................................................ 83<br />

What We’ve Just Learned ........................................................................................................................................................... 84<br />

Chapter 3: App Anatomy and Page Navigation ..................................................................... 85<br />

Local and Web Contexts within the App Host .................................................................................................................... 86<br />

Referencing Content from App Data: ms-appdata ....................................................................................................... 90<br />

Here My Am! with ms-appdata ........................................................................................................................................... 92<br />

Sequential Async Operations: Chaining Promises ............................................................................................................. 94<br />

Error Handling Within Promises: then vs. done ............................................................................................................. 96<br />

Debug Output, Error Reports, and the Event Viewer ................................................................................................... 96<br />

App Activation ................................................................................................................................................................................ 99<br />

Branding Your App 101: The Splash Screen and Other Visuals ................................................................................ 99<br />

Activation Event Sequence .................................................................................................................................................. 101<br />

Activation Code Paths ........................................................................................................................................................... 103<br />

WinJS.Application Events ..................................................................................................................................................... 105<br />

Extended Splash Screens ...................................................................................................................................................... 106<br />

Activation Deferrals ............................................................................................................................................................... 108<br />

App Lifecycle Transition Events and Session State .......................................................................................................... 109<br />

Suspend, Resume, and Terminate ..................................................................................................................................... 109<br />

Basic Session State in Here My Am! ................................................................................................................................. 114<br />

Data from Services and WinJS.xhr ......................................................................................................................................... 116<br />

Handling Network Connectivity (in Brief) ...................................................................................................................... 119<br />

Tips and Tricks for WinJS.xhr .............................................................................................................................................. 120<br />

Page Controls and Navigation ............................................................................................................................................... 121<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!