没有合适的资源?快使用搜索试试~ 我知道了~
用H5+C3+JS开发Windows8应用(PDF)
1星 需积分: 9 18 下载量 126 浏览量
2015-07-10
21:43:37
上传
评论
收藏 4.4MB PDF 举报
温馨提示
试读
161页
这本书通过具体描述与若干实例,全面细致地讲解了用JavaScript开发Win8平台应用的方法
资源推荐
资源详情
资源评论
Kraig Brockschmidt
Windows
®
8 Apps
Programming
with HTML, CSS,
and JavaScript
FIRST
PREVIEW
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
This document supports a preliminary release of a software product that may be changed substantially prior to
final commercial release. This document is provided for informational purposes only and Microsoft makes no
warranties, either express or implied, in this document. Information in this document, including URL and other
Internet website references, is subject to change without notice. The entire risk of the use or the results from
the use of this document remains with the user.
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
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
5
剩余160页未读,继续阅读
资源评论
- YuXiangChina2021-10-13英文的,全部
baidu_29719253
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 卡方数据.sav
- Python实现基于Django框架的二手物品购物网站设计源码+数据库.zip
- 基于Python和Django的二手物品购物网站设计源码+数据库脚本.zip
- 【计算机毕业设计】基于h5的移动网赚项目小程序【源码+lw+部署文档+讲解】
- 【计算机毕业设计】基于ssm-vue的oa系统设计与实现【源码+lw+部署文档+讲解】
- 基于pytorch实现的YOLOV5+SORT的车辆行人目标识别及追踪系统源码.zip
- 【计算机毕业设计】基于servlet+jdbc的在线选房系统设计与实现【源码+lw+部署文档+讲解】
- 投身科技创新,勇担时代先锋.pptx
- 【计算机毕业设计】基于SSM的仿微博系统的设计与实现【源码+lw+部署文档+讲解】
- 使用 Web Components 实现,遵循 Material You 设计规范的 Web 前端组件库
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功