Microsoft_Press_eBook_Programming_Windows_8_Apps_with_HTML_CSS_and_JavaScript_First_Preview_PDF.pdf
Introduction ....................................................................................................... 6
Who This Book Is For ......................................................................................................................................................................... 7
What You'll Need ................................................................................................................................................................................ 8
Acknowledgements ............................................................................................................................................................................ 8
Errata & Book Support ...................................................................................................................................................................... 9
We Want to Hear from You ............................................................................................................................................................ 9
Stay in Touch......................................................................................................................................................................................... 9
Chapter 1: The Life Story of a Metro Style App:
Platform Characteristics of Windows 8 ......................................................... 10
Leaving Home: Onboarding to the Store ................................................................................................................................ 11
Discovery, Acquisition, and Installation .................................................................................................................................... 14
Playing in the Sandbox: The App Container ........................................................................................................................... 17
Different Views of Life: View States and Resolution Scaling ............................................................................................. 21
Those Capabilities Again: Getting to Data and Devices ..................................................................................................... 24
Taking a Break, Getting Some Rest: Process Lifecycle Management ............................................................................ 26
Remembering Yourself: App State and Roaming ................................................................................................................. 28
Coming Back Home: Updates and New Opportunities ...................................................................................................... 32
And, Oh Yes, Then There’s Design ............................................................................................................................................. 34
Chapter 2: Quickstart ...................................................................................... 35
A Really Quick Quickstart: The Blank App Template ........................................................................................................... 35
Blank App Project Structure ..................................................................................................................................................... 38
QuickStart #1: Here My Am! and an Introduction to Blend for Visual Studio .......................................................... 42
Design Wireframes ....................................................................................................................................................................... 43
Create the Markup ....................................................................................................................................................................... 45
Styling in Blend.............................................................................................................................................................................. 47
Adding the Code .......................................................................................................................................................................... 53
Extra Credit: Receiving Messages from the iframe .......................................................................................................... 65
The Other Templates ....................................................................................................................................................................... 66
Fixed Layout Template ............................................................................................................................................................... 67
Navigation Template .................................................................................................................................................................. 67
Grid Template ................................................................................................................................................................................ 68
3
Split Template ................................................................................................................................................................................68
What We’ve Just Learned ...............................................................................................................................................................69
Chapter 3: App Anatomy and Page Navigation ........................................... 70
Local and Web Contexts within the App Host ........................................................................................................................71
Referencing Content from App Data: ms-appdata ..........................................................................................................75
Sequential Async Operations: Chaining Promises .................................................................................................................78
Debug Output, Error Reports, and the Event Viewer ......................................................................................................81
App Activation ....................................................................................................................................................................................83
Branding Your App 101: The Splash Screen and Other Visuals ..................................................................................83
Activation Event Sequence........................................................................................................................................................86
Activation Code Paths .................................................................................................................................................................87
WinJS.Application Events ...........................................................................................................................................................90
Extended Splash Screens ............................................................................................................................................................91
App Lifecycle Transition Events and Session State ................................................................................................................93
Suspend, Resume, and Terminate ..........................................................................................................................................94
Basic Session State in Here My Am! ......................................................................................................................................98
Data from Services and WinJS.xhr ........................................................................................................................................... 100
Handling Network Connectivity (in Brief) ......................................................................................................................... 103
Tips and Tricks for WinJS.xhr ................................................................................................................................................. 104
Page Controls and Navigation .................................................................................................................................................. 105
WinJS Tools for Pages and Page Navigation ................................................................................................................... 105
The Navigation App Template, PageControl Structure, and PageControlNavigator ..................................... 106
The Navigation Process and Navigation Styles .............................................................................................................. 112
Optimizing Page Switching: Show-and-Hide .................................................................................................................. 113
Completing the Promises Story ................................................................................................................................................ 114
What We’ve Just Learned ............................................................................................................................................................ 116
Chapter 4: Controls, Control Styling, and Data Binding ........................... 117
The Control Model for HTML, CSS, and JavaScript ............................................................................................................ 119
HTML Controls ................................................................................................................................................................................. 120
WinJS stylesheets: ui-light.css, ui-dark.css, and win-* styles ...................................................................................... 123
4
Extensions to HTML Elements .............................................................................................................................................. 124
WinJS Controls ................................................................................................................................................................................ 124
WinJS Control Instantiation ................................................................................................................................................... 126
Strict Processing and processAll Functions ...................................................................................................................... 127
Example: WinJS.UI.Rating Control ...................................................................................................................................... 128
Example: WinJS.UI.Tooltip Control ..................................................................................................................................... 129
Working with Controls in Blend ............................................................................................................................................... 131
Control Styling................................................................................................................................................................................. 133
Styling Gallery: HTML Controls ............................................................................................................................................ 135
Styling Gallery: WinJS Controls ............................................................................................................................................ 138
Some Tips and Tricks................................................................................................................................................................ 141
Custom Controls ............................................................................................................................................................................. 142
Custom Control Examples ...................................................................................................................................................... 144
Custom Controls in Blend ...................................................................................................................................................... 146
Data Binding .................................................................................................................................................................................... 147
Data Binding in WinJS ............................................................................................................................................................. 149
Additional Binding Features .................................................................................................................................................. 155
What We’ve Just Learned ........................................................................................................................................................... 158
About the Author .......................................................................................... 159
Microsoft press e-book:Programming Windows 8 Apps
Download Link MS
No comments:
Post a Comment