没有合适的资源?快使用搜索试试~ 我知道了~
微软MCSD HTML5 JavaScript CSS3
4星 · 超过85%的资源 需积分: 10 26 下载量 121 浏览量
2012-11-22
23:50:33
上传
评论
收藏 17.95MB PDF 举报
温馨提示
试读
833页
微软 MCSD HTML5 JavaScript CSS3 070-480
资源推荐
资源详情
资源评论
99
1
PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2012 Microsoft Corporation
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by
any means without the written permission of the publisher.
ISBN: 978-0-7356-7261-1
Microsoft Press books are available through booksellers and distributors worldwide. If you need support
related to this book, email Microsoft Press Book Support at mspinput@microsoft.com
. Please tell us what
you think of this book at http://aka.ms/tellpress.
Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos,
people, places, and events depicted in examples herein are fictitious. No association with any real company,
organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be
inferred.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights
under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval
system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft and the trademarks listed at
http://www.microsoft.com/about/legal/en/us/IntellectualProperty/
Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of
their respective owners.
This book expresses the author’s views and opinions. The information contained in this book is provided
without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its
resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or
indirectly by this book.
Acquisitions, Developmental, and Project Editor: Devon Musgrave
Cover: Twist Creative • Seattle
2
Table of Contents
Introduction ............................................................................................................................................ 19
Who This Book Is For ................................................................................................................................................................... 20
What You'll Need (Can You Say “Samples”?) ...................................................................................................................... 21
A Formatting Note ........................................................................................................................................................................ 22
Acknowledgements ...................................................................................................................................................................... 23
Errata & Book Support ................................................................................................................................................................ 24
We Want to Hear from You ....................................................................................................................................................... 25
Stay in Touch .................................................................................................................................................................................. 25
Chapter 1: The Life Story of a Windows Store App:
Platform Characteristics of Windows 8 ................................................................................... 26
Leaving Home: Onboarding to the Windows Store .......................................................................................................... 27
Discovery, Acquisition, and Installation ................................................................................................................................. 30
Playing in Your Own Room: The App Container ................................................................................................................ 34
Different Views of Life: View States and Resolution Scaling .......................................................................................... 37
Those Capabilities Again: Getting to Data and Devices .................................................................................................. 40
Taking a Break, Getting Some Rest: Process Lifecycle Management .......................................................................... 43
Remembering Yourself: App State and Roaming .............................................................................................................. 45
Coming Back Home: Updates and New Opportunities ................................................................................................... 48
And, Oh Yes, Then There’s Design .......................................................................................................................................... 50
Chapter 2: Quickstart ................................................................................................................ 52
A Really Quick Quickstart: The Blank App Template ........................................................................................................ 52
Blank App Project Structure .................................................................................................................................................. 55
QuickStart #1: Here My Am! and an Introduction to Blend for Visual Studio ......................................................... 59
Design Wireframes ................................................................................................................................................................... 59
Create the Markup ................................................................................................................................................................... 62
Styling in Blend .......................................................................................................................................................................... 64
Adding the Code ...................................................................................................................................................................... 68
Creating a Map with the Current Location ..................................................................................................................... 69
Oh Wait, the Manifest! ........................................................................................................................................................... 73
3
Capturing a Photo from the Camera ................................................................................................................................ 75
Sharing the Fun! ....................................................................................................................................................................... 78
Extra Credit: Receiving Messages from the iframe ....................................................................................................... 81
The Other Templates ................................................................................................................................................................... 82
Fixed Layout Template ............................................................................................................................................................ 82
Navigation Template ............................................................................................................................................................... 83
Grid Template ............................................................................................................................................................................ 83
Split Template ............................................................................................................................................................................ 83
What We’ve Just Learned ........................................................................................................................................................... 84
Chapter 3: App Anatomy and Page Navigation ..................................................................... 85
Local and Web Contexts within the App Host .................................................................................................................... 86
Referencing Content from App Data: ms-appdata ....................................................................................................... 90
Here My Am! with ms-appdata ........................................................................................................................................... 92
Sequential Async Operations: Chaining Promises ............................................................................................................. 94
Error Handling Within Promises: then vs. done ............................................................................................................. 96
Debug Output, Error Reports, and the Event Viewer ................................................................................................... 96
App Activation ................................................................................................................................................................................ 99
Branding Your App 101: The Splash Screen and Other Visuals ................................................................................ 99
Activation Event Sequence .................................................................................................................................................. 101
Activation Code Paths ........................................................................................................................................................... 103
WinJS.Application Events ..................................................................................................................................................... 105
Extended Splash Screens ...................................................................................................................................................... 106
Activation Deferrals ............................................................................................................................................................... 108
App Lifecycle Transition Events and Session State .......................................................................................................... 109
Suspend, Resume, and Terminate ..................................................................................................................................... 109
Basic Session State in Here My Am! ................................................................................................................................. 114
Data from Services and WinJS.xhr ......................................................................................................................................... 116
Handling Network Connectivity (in Brief) ...................................................................................................................... 119
Tips and Tricks for WinJS.xhr .............................................................................................................................................. 120
Page Controls and Navigation ............................................................................................................................................... 121
4
WinJS Tools for Pages and Page Navigation ................................................................................................................ 121
The Navigation App Template, PageControl Structure, and PageControlNavigator ..................................... 123
The Navigation Process and Navigation Styles ............................................................................................................ 129
Optimizing Page Switching: Show-and-Hide ............................................................................................................... 130
WinRT Events and removeEventListener ............................................................................................................................. 131
Completing the Promises Story .............................................................................................................................................. 133
What We’ve Just Learned ......................................................................................................................................................... 135
Chapter 4: Controls, Control Styling, and Data Binding ..................................................... 136
The Control Model for HTML, CSS, and JavaScript ......................................................................................................... 137
HTML Controls ............................................................................................................................................................................. 138
WinJS stylesheets: ui-light.css, ui-dark.css, and win-* styles .................................................................................... 141
Extensions to HTML Elements ............................................................................................................................................ 142
WinJS Controls ............................................................................................................................................................................. 142
WinJS Control Instantiation ................................................................................................................................................. 144
Strict Processing and processAll Functions .................................................................................................................... 145
Example: WinJS.UI.Rating Control ..................................................................................................................................... 146
Example: WinJS.UI.Tooltip Control ................................................................................................................................... 147
Working with Controls in Blend ............................................................................................................................................. 149
Control Styling ............................................................................................................................................................................. 151
Styling Gallery: HTML Controls .......................................................................................................................................... 153
Styling Gallery: WinJS Controls .......................................................................................................................................... 155
Some Tips and Tricks ............................................................................................................................................................. 158
Custom Controls .......................................................................................................................................................................... 159
Custom Control Examples ................................................................................................................................................... 161
Custom Controls in Blend .................................................................................................................................................... 164
Data Binding ................................................................................................................................................................................. 167
Data Binding in WinJS ........................................................................................................................................................... 169
One-Time Binding.................................................................................................................................................................. 170
One-Way Binding................................................................................................
................................................................... 173
Implementing Two-Way Binding ..................................................................................................................................... 175
5
剩余832页未读,继续阅读
资源评论
- psluser2012-12-14这个是 070-480的考试材料,谢谢
- LoLok2012-12-20好清楚的,资源很不错!是写WIN8程序的好材料
- l569688562013-01-15看不懂,全英文,但还是谢谢。
boycestar
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- onenet_chongwukanhu_v06.apk
- 2022NOC软件创意编程赛项真题C++初中-决赛(有解析)
- 2022NOC软件创意编程赛项真题python初中-决赛(有解析)
- openLayer-本地数据加载 (day5)
- A题-正弦信号发生器.xdf
- 2022NOC软件创意编程赛项真题python小学高年级-决赛(有解析)
- mathml转换latex需要的xsl文件
- 2022NOC软件创意编程赛项真题图形化小学高年级-决赛(有解析)
- gbase驱动下载gbase-connector-java-8.3.81.53驱动下载
- 2022NOC软件创意编程赛项真题图形化小学低年级-决赛(有解析)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功