Professional Documents
Culture Documents
20481C
Essentials of Developing Windows® Store
Apps Using HTML5 and JavaScript
Companion Content
ii Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Information in this document, including URL and other Internet Web site references, is subject to change
without notice. Unless otherwise noted, the example companies, organizations, products, domain names,
e-mail addresses, logos, people, places, and events depicted herein are fictitious, and 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 may have patents, patent applications, trademarks, copyrights, or other intellectual property
rights covering subject matter in this document. Except as expressly provided in any written license
agreement from Microsoft, the furnishing of this document does not give you any license to these
patents, trademarks, copyrights, or other intellectual property.
The names of manufacturers, products, or URLs are provided for informational purposes only and
Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding
these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a
manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links
may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not
responsible for the contents of any linked site or any link contained in a linked site, or any changes or
updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission
received from any linked site. Microsoft is providing these links to you only as a convenience, and the
inclusion of any link does not imply endorsement of Microsoft of the site or the products contained
therein.
Released: 01/2014
MICROSOFT LICENSE TERMS
MICROSOFT INSTRUCTOR-LED COURSEWARE
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its
affiliates) and you. Please read them. They apply to your use of the content accompanying this agreement which
includes the media on which you received it, if any. These license terms also apply to Trainer Content and any
updates and supplements for the Licensed Content unless other terms accompany those items. If so, those terms
apply.
BY ACCESSING, DOWNLOADING OR USING THE LICENSED CONTENT, YOU ACCEPT THESE TERMS.
IF YOU DO NOT ACCEPT THEM, DO NOT ACCESS, DOWNLOAD OR USE THE LICENSED CONTENT.
If you comply with these license terms, you have the rights below for each license you acquire.
1. DEFINITIONS.
a. “Authorized Learning Center” means a Microsoft IT Academy Program Member, Microsoft Learning
Competency Member, or such other entity as Microsoft may designate from time to time.
b. “Authorized Training Session” means the instructor-led training class using Microsoft Instructor-Led
Courseware conducted by a Trainer at or through an Authorized Learning Center.
c. “Classroom Device” means one (1) dedicated, secure computer that an Authorized Learning Center owns
or controls that is located at an Authorized Learning Center’s training facilities that meets or exceeds the
hardware level specified for the particular Microsoft Instructor-Led Courseware.
d. “End User” means an individual who is (i) duly enrolled in and attending an Authorized Training Session
or Private Training Session, (ii) an employee of a MPN Member, or (iii) a Microsoft full-time employee.
e. “Licensed Content” means the content accompanying this agreement which may include the Microsoft
Instructor-Led Courseware or Trainer Content.
f. “Microsoft Certified Trainer” or “MCT” means an individual who is (i) engaged to teach a training session
to End Users on behalf of an Authorized Learning Center or MPN Member, and (ii) currently certified as a
Microsoft Certified Trainer under the Microsoft Certification Program.
g. “Microsoft Instructor-Led Courseware” means the Microsoft-branded instructor-led training course that
educates IT professionals and developers on Microsoft technologies. A Microsoft Instructor-Led
Courseware title may be branded as MOC, Microsoft Dynamics or Microsoft Business Group courseware.
h. “Microsoft IT Academy Program Member” means an active member of the Microsoft IT Academy
Program.
i. “Microsoft Learning Competency Member” means an active member of the Microsoft Partner Network
program in good standing that currently holds the Learning Competency status.
j. “MOC” means the “Official Microsoft Learning Product” instructor-led courseware known as Microsoft
Official Course that educates IT professionals and developers on Microsoft technologies.
k. “MPN Member” means an active Microsoft Partner Network program member in good standing.
l. “Personal Device” means one (1) personal computer, device, workstation or other digital electronic device
that you personally own or control that meets or exceeds the hardware level specified for the particular
Microsoft Instructor-Led Courseware.
m. “Private Training Session” means the instructor-led training classes provided by MPN Members for
corporate customers to teach a predefined learning objective using Microsoft Instructor-Led Courseware.
These classes are not advertised or promoted to the general public and class attendance is restricted to
individuals employed by or contracted by the corporate customer.
n. “Trainer” means (i) an academically accredited educator engaged by a Microsoft IT Academy Program
Member to teach an Authorized Training Session, and/or (ii) a MCT.
o. “Trainer Content” means the trainer version of the Microsoft Instructor-Led Courseware and additional
supplemental content designated solely for Trainers’ use to teach a training session using the Microsoft
Instructor-Led Courseware. Trainer Content may include Microsoft PowerPoint presentations, trainer
preparation guide, train the trainer materials, Microsoft One Note packs, classroom setup guide and Pre-
release course feedback form. To clarify, Trainer Content does not include any software, virtual hard
disks or virtual machines.
2. USE RIGHTS. The Licensed Content is licensed not sold. The Licensed Content is licensed on a one copy
per user basis, such that you must acquire a license for each individual that accesses or uses the Licensed
Content.
2.1 Below are five separate sets of use rights. Only one set of rights apply to you.
2.2 Separation of Components. The Licensed Content is licensed as a single unit and you may not
separate their components and install them on different devices.
2.3 Redistribution of Licensed Content. Except as expressly provided in the use rights above, you may
not distribute any Licensed Content or any portion thereof (including any permitted modifications) to any
third parties without the express written permission of Microsoft.
2.4 Third Party Notices. The Licensed Content may include third party code tent that Microsoft, not the
third party, licenses to you under this agreement. Notices, if any, for the third party code ntent are included
for your information only.
2.5 Additional Terms. Some Licensed Content may contain components with additional terms,
conditions, and licenses regarding its use. Any non-conflicting terms in those conditions and licenses also
apply to your use of that respective component and supplements the terms described in this agreement.
a. Pre-Release Licensed Content. This Licensed Content subject matter is on the Pre-release version of
the Microsoft technology. The technology may not work the way a final version of the technology will
and we may change the technology for the final version. We also may not release a final version.
Licensed Content based on the final version of the technology may not contain the same information as
the Licensed Content based on the Pre-release version. Microsoft is under no obligation to provide you
with any further content, including any Licensed Content based on the final version of the technology.
b. Feedback. If you agree to give feedback about the Licensed Content to Microsoft, either directly or
through its third party designee, you give to Microsoft without charge, the right to use, share and
commercialize your feedback in any way and for any purpose. You also give to third parties, without
charge, any patent rights needed for their products, technologies and services to use or interface with
any specific parts of a Microsoft technology, Microsoft product, or service that includes the feedback.
You will not give feedback that is subject to a license that requires Microsoft to license its technology,
technologies, or products to third parties because we include your feedback in them. These rights
survive this agreement.
c. Pre-release Term. If you are an Microsoft IT Academy Program Member, Microsoft Learning
Competency Member, MPN Member or Trainer, you will cease using all copies of the Licensed Content on
the Pre-release technology upon (i) the date which Microsoft informs you is the end date for using the
Licensed Content on the Pre-release technology, or (ii) sixty (60) days after the commercial release of the
technology that is the subject of the Licensed Content, whichever is earliest (“Pre-release term”).
Upon expiration or termination of the Pre-release term, you will irretrievably delete and destroy all copies
of the Licensed Content in your possession or under your control.
4. SCOPE OF LICENSE. The Licensed Content is licensed, not sold. This agreement only gives you some
rights to use the Licensed Content. Microsoft reserves all other rights. Unless applicable law gives you more
rights despite this limitation, you may use the Licensed Content only as expressly permitted in this
agreement. In doing so, you must comply with any technical limitations in the Licensed Content that only
allows you to use it in certain ways. Except as expressly permitted in this agreement, you may not:
• access or allow any individual to access the Licensed Content if they have not acquired a valid license
for the Licensed Content,
• alter, remove or obscure any copyright or other protective notices (including watermarks), branding
or identifications contained in the Licensed Content,
• modify or create a derivative work of any Licensed Content,
• publicly display, or make the Licensed Content available for others to access or use,
• copy, print, install, sell, publish, transmit, lend, adapt, reuse, link to or post, make available or
distribute the Licensed Content to any third party,
• work around any technical limitations in the Licensed Content, or
• reverse engineer, decompile, remove or otherwise thwart any protections or disassemble the
Licensed Content except and only to the extent that applicable law expressly permits, despite this
limitation.
5. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not expressly granted to
you in this agreement. The Licensed Content is protected by copyright and other intellectual property laws
and treaties. Microsoft or its suppliers own the title, copyright, and other intellectual property rights in the
Licensed Content.
6. EXPORT RESTRICTIONS. The Licensed Content is subject to United States export laws and regulations.
You must comply with all domestic and international export laws and regulations that apply to the Licensed
Content. These laws include restrictions on destinations, end users and end use. For additional information,
see www.microsoft.com/exporting.
7. SUPPORT SERVICES. Because the Licensed Content is “as is”, we may not provide support services for it.
8. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this agreement if you fail
to comply with the terms and conditions of this agreement. Upon termination of this agreement for any
reason, you will immediately stop all use of and delete and destroy all copies of the Licensed Content in
your possession or under your control.
9. LINKS TO THIRD PARTY SITES. You may link to third party sites through the use of the Licensed
Content. The third party sites are not under the control of Microsoft, and Microsoft is not responsible for
the contents of any third party sites, any links contained in third party sites, or any changes or updates to
third party sites. Microsoft is not responsible for webcasting or any other form of transmission received
from any third party sites. Microsoft is providing these links to third party sites to you only as a
convenience, and the inclusion of any link does not imply an endorsement by Microsoft of the third party
site.
10. ENTIRE AGREEMENT. This agreement, and any additional terms for the Trainer Content, updates and
supplements are the entire agreement for the Licensed Content, updates and supplements.
12. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws
of your country. You may also have rights with respect to the party from whom you acquired the Licensed
Content. This agreement does not change your rights under the laws of your country if the laws of your
country do not permit it to do so.
13. DISCLAIMER OF WARRANTY. THE LICENSED CONTENT IS LICENSED "AS-IS" AND "AS
AVAILABLE." YOU BEAR THE RISK OF USING IT. MICROSOFT AND ITS RESPECTIVE
AFFILIATES GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. YOU MAY
HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT
CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT AND
ITS RESPECTIVE AFFILIATES EXCLUDES ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
14. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM
MICROSOFT, ITS RESPECTIVE AFFILIATES AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP
TO US$5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL,
LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The
above limitation or exclusion may not apply to you because your country may not allow the exclusion or
limitation of incidental, consequential or other damages.
Please note: As this Licensed Content is distributed in Quebec, Canada, some of the clauses in this
agreement are provided below in French.
Remarque : Ce le contenu sous licence étant distribué au Québec, Canada, certaines des clauses
dans ce contrat sont fournies ci-dessous en français.
EXONÉRATION DE GARANTIE. Le contenu sous licence visé par une licence est offert « tel quel ». Toute
utilisation de ce contenu sous licence est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie
expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection dues
consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties
implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits
prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre
pays si celles-ci ne le permettent pas.
Module 1
Overview of the Windows 8.1 Platform and Windows Store
Apps
Contents:
Lesson 1: Introduction to the Windows 8.1 Platform 2
Lesson 1
Introduction to the Windows 8.1 Platform
Contents:
Demonstration: Using Windows 8 Features 3
Overview of the Windows 8.1 Platform and Windows Store Apps 1-3
If you are using a mouse, on the Start screen, rotate the wheel button.
If you are using a keyboard, on the Start screen, press the Left Arrow key and the Right Arrow key.
2. If you are using a touch-enabled device, to zoom out, use the pinch gesture by touching the screen
with two fingers, and then moving your fingers closer together.
If you are using a mouse, to zoom out, press Ctrl, and then rotate the wheel button downward. You
can also click the minus button at the lower-right corner of the screen, next to the horizontal scroll
bar.
If you are using a touch-enabled device, to zoom in, use the stretch gesture by touching the screen
with two fingers, and then moving them apart.
If you are using a mouse, to zoom in, press Ctrl and rotate the wheel button upward. You can also
click anywhere on the empty space on the Start screen.
3. If you are using a touch-enabled device, swipe the Mail tile downward by tapping it with your finger
and moving it slightly down.
If you are using a mouse, right-click the tile. If you are using a keyboard, press the shortcut menu key.
When a tile is selected, it shows a check mark (√) in the upper-right corner of the tile. Notice that the
selected tile becomes dimmer, smaller, and looks different from the-other apps as the Start screen
enters the arrangement mode.
4. After selecting a tile, locate the app bar displayed at the bottom of the screen. On the app bar, click
Resize to open the context menu containing tile sizes, and then click Medium to change the size of
the Mail tile.
5. If you are using a touch-enabled device, while still in the screen-arrangement mode, tap and hold the
tile, and then move it down and release.
If you are using a mouse, drag the tile to the new location, and then release it.
6. If you are using a touch-enabled device, tap an empty area on the Start screen to exit the screen-
arrangement mode.
If you are using a mouse, click anywhere in the empty area on the Start screen.
If you are using a keyboard, press the Esc key.
21. In the search results pane on the left side of the screen, click Microsoft Home Page | Devices and
Services.
25. If the Add your Microsoft account dialog box appears, enter the email address and password of
your Microsoft account, and then click Save.
Note: Whether the volume control is enabled or not depends on the hardware
configuration of your system. Perform steps 31 through 33 only if your computer enables
changing the volume level.
Overview of the Windows 8.1 Platform and Windows Store Apps 1-5
Lesson 2
Windows 8 UI Principles
Contents:
Resources 6
1-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Additional Reading: For a thorough overview of the modern design principles, read the
following article:
http://go.microsoft.com/fwlink/?LinkId=331040
• Pan vertically in the side-by-side view for ergonomics, avoiding conflict with the edge.
• Maintain state and continuity across the different modes, so that if a user switches from one mode to
another, the state and relative position is maintained. For example, if a user scrolls half-way down a
list, and then resizes to the side-by-side view, try to scroll the view to the same item that was in focus
earlier.
• Do not remove the work of the user when resizing or changing screen rotation.
Lesson 3
WinRT and Language Projections
Contents:
Demonstration: Overview of the Final ILoveNotes Solution 8
1-8 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Note: If you are running Visual Studio for the first time, you will see a dialog box. Click OK
to continue.
5. In the Open Project dialog box, go to the D:\Allfiles\ILoveNotes - Windows 8.1 RTM Build folder,
and then double-click ILoveNotes.sln.
6. If a Developer License dialog box prompts you to renew your developer license:
a. In the Developer License dialog box, click I agree.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
8. On the main screen of the app, right-click to display the app bar.
9. Click Add.
13. On the main screen of the app, in one of the notebooks, locate the note that you created, and then
click My First Note.
16. To display the charms, move the pointer to either the top-right or bottom-right corners of the screen.
17. Click the Search charm.
Overview of the Windows 8.1 Platform and Windows Store Apps 1-9
18. Verify that ILoveNotes is selected as the search provider, if not, select ILoveNotes from the search list,
and then in the search box type My first.
22. On the left side of the app bar, click Pin Note.
27. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
28. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: Users can use Windows 8.1 charms to share information between apps, to search for apps that
support it, to easily configure settings, and to interact with a variety of hardware devices. As a
developer, you should integrate contracts in your Windows Store app to make it searchable, to
support easy sharing from and to your app, and to make your user settings discoverable.
Question: What is the difference between Windows 8.1 live tiles and traditional icons?
Answer: Icons are static. You can only use an icon to launch the associated app. Tiles, on the other hand,
convey dynamic information about the app. If your app supports live tiles and secondary tiles,
users can pin interesting pages from your app to the Start screen and view relevant information
at a glance. A well-designed tile attracts user attention and helps users be more productive
without launching an app and waiting for the full content to load.
Single-Page Apps and the MVVM Design Pattern 2-1
Module 2
Single-Page Apps and the MVVM Design Pattern
Contents:
Module Review and Takeaways 2
2-2 Essentials of Developing Windows Store Apps Using HTML5 and JavaScript
Answer: It depends on the scenario, but usually you would combine SPA and MVVM. In most cases, SPA
and MVVM are appropriate for Windows Store apps. SPA ensures your app is fast and fluid, and
does not introduce unnecessary browser refreshes. MVVM brings ease of maintenance and
testability to the table.
Using WinJS 3-1
Module 3
Using WinJS
Contents:
Lesson 1: The WinJS Library 2
Lesson 1
The WinJS Library
Contents:
Demonstration: Namespaces, Classes, and Mixins 3
Using WinJS 3-3
Note: If the Choose Default Environment Settings dialog box appears, click OK.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
"use strict";
WinJS.Namespace.define("People", {
peopleArr: people
});
7. Explain that you have defined a namespace, and then exposed an array called peopleArr. The array
will be created later.
"use strict";
and the definition of the namespace, show the following class definition.
}, {});
9. Explain that you have defined a Person class, which exposes two instance properties: fname and
lname.
10. Show the array peopleArr that contains two instances of the Person class, which appears after the
class definition.
Note: You can open the default.js file, located in the js folder, and show how to use the
namespace and the people array it exposes.
Using WinJS 3-5
Lesson 2
WinJS APIs
Contents:
Resources 6
Demonstration: WinJS.Application 6
3-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
WinJS.Promise
Additional Reading: You can download and review a WinJS Promise sample (Windows 8.1
at http://go.microsoft.com/fwlink/?LinkId=313234
Additional Reading: For more information on promise functions, see
http://go.microsoft.com/fwlink/?LinkId=273978
WinJS.Utilities
Additional Reading: For more information about supported helper functions, see
http://go.microsoft.com/fwlink/?LinkId=273979
Additional Reading: For additional reading about querySelector and querySelectorAll,
see
http://go.microsoft.com/fwlink/?LinkId=273980
http://go.microsoft.com/fwlink/?LinkId=273981
Demonstration: WinJS.Application
Demonstration Steps
1. Open the D:\Allfiles\Mod03\Democode\Lesson 2\WinJS.Application folder.
Note: It is a good practice to create the app variable and not use the WinJS.Application
object every time you have to use the namespace.
Note: The onactivated event is a very important event that handles the activation of the
app. This segment of the code is automatically generated by the Grid project template.
6. In the activated event listener, show the usage of the sessionState in these lines of code.
if (app.sessionState.history) {
nav.history = app.sessionState.history;
}
Using WinJS 3-7
Note: The previous lines of code check whether there is a navigation history of the previous
session. These history entries are added when the app is suspended. If there is a navigation
history in the session state, it is set to the nav.history property.
7. Show the oncheckpoint event handler and how to set the app.sessionState.history property.
8. Show the call to the app start function at the end of the file.
9. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
10. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: WinJS is a JavaScript library that matches design styles of Windows 8.1 and supplies controls for
common user experiences. The JavaScript library of WinJS offers lots of functionality to develop
Windows Store apps faster and better. It is designed for touch and also for traditional input, and
scales across device form factors.
Using WinJS 3-9
Answer: Promises are one of the basic patterns used in WinJS. A promise or a deferred object is an object
that defers the execution of its callbacks to the moment they are needed at the end of some
process. The WinJS library includes a Promise object that you can use to create and run deferred
code. Many Windows Runtime (WinRT) APIs use the Promise object to provide asynchronous
code execution to Windows Store apps
Answer: WinJS includes the WinJS.Namespace object, which exposes two functions to define
namespaces: the define function and the defineWithParent function.
Implementing Layout Using Windows 8.1 Controls 4-1
Module 4
Implementing Layout Using Windows 8.1 Controls
Contents:
Lesson 1: Windows 8.1 Layout Controls 2
Lesson 1
Windows 8.1 Layout Controls
Contents:
Resources 3
Implementing Layout Using Windows 8.1 Controls 4-3
Resources
Simple Layouts
Best Practice: Flexbox items should be HTML DOM elements that are immediate children
of the container element. If they are not, the container attributes may behave in unexpected
ways.
Best Practice: Even though the flexbox container can contain any HTML element, the best
practice is that your flexbox items are the div or section HTML elements. The decision of which
element to use depends on the kind of content displayed on the screen. Use the section element
when defining a section of a document such as chapters or posts. Use the div element as a
generic container of content. Using this practice, you can add additional content within each
nested flexbox item.
Best Practice: Use the grid layout when laying out rows and columns of controls or
elements; use the table HTML element when displaying tabular data such as reports or actual
tables with defined table header, body or footer.
Complex Layouts
Best Practice: FlipView is best suited to flip through several items one by one. From both
user experience and performance perspectives, it is better to use the ListView control for large
amounts of data.
Best Practice: For the purpose of this and following examples, the JavaScript code is
embedded in the HTML. It is better to use a separate file when declaring a JavaScript class.
4-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Lesson 2
Implementing WinJS Controls and Templates
Contents:
Resources 5
Demonstration: Working with Common Controls 5
Implementing Layout Using Windows 8.1 Controls 4-5
Resources
Control Templates
Best Practice: To prevent memory leaks when using control templates, set the
WinJS.Binding.optimizeBindingReferences property to true in the startup procedure for your
app. When set to true, the rendering engine automatically assigns an id to the generated
element, which helps the runtime manage the element and therefore helps avoid memory leaks.
Note: If the Choose Default Environment Settings dialog appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
a. In the Developer License dialog box, click I agree.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Uncomment the div element in the code below, whose data-win-control attribute is
WinJS.UI.DatePicker.
7. Then uncomment the div element in the code below, whose data-win-control attribute is
WinJS.UI.TimePicker.
10. To stop the app, switch back to Visual Studio, and then press Shift+F5.
11. In default.html, uncomment the div element in the code below, whose data-win-control attribute
is WinJS.UI.Rating.
12. Point to the averageRating and userRating properties in the data-win-options attribute.
14. Show the Rating control, and then explain that the control displays the value of the userRating
property.
16. To stop the app, switch back to Visual Studio, and then press Shift+F5.
17. In default.html, uncomment the div element in the code below, whose data-win-control attribute
is WinJS.UI.ToggleSwitch.
20. Show the ToggleSwitch control, and explain that the ToggleSwitch control displays the value of the
title property above the control.
22. To stop the app, switch back to Visual Studio, and then press Shift+F5.
25. Locate the #layouts selector, and then change the value of the visibility property from hidden to
visible as shown below.
#layouts {
-ms-grid-column: 2;
-ms-grid-row: 1;
visibility: visible ;
}
26. Locate the #layouts #grid-layout selector in the code below. Show the value of the display property
is -ms-grid. Also explain that the number and sizes of the rows and columns are specified by the -
ms-grid-rows and -ms-grid-columns properties.
#layouts #grid-layout {
display: -ms-grid;
-ms-grid-rows: 50px 100px 150px;
-ms-grid-columns: 20% 1fr;
}
27. Locate the #layouts #grid-layout #A through #layouts #grid-layout #F selectors in the code
below, and then show that each CSS rule set specifies a row, column, and color.
#layouts #grid-layout #X {
-ms-grid-row: row;
-ms-grid-column: column;
Implementing Layout Using Windows 8.1 Controls 4-7
background-color: color;
}
29. Show the grid layout applied to the elements on the right-side of the screen. Show the placement
and colors of the different controls.
30. To stop the app, switch back to Visual Studio, and then press Shift+F5.
31. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
32. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Lesson 3
The AppBar Control
Contents:
Demonstration: Creating an AppBar Control 9
Implementing Layout Using Windows 8.1 Controls 4-9
Note: If the Choose Default Environment Settings dialog appears, click OK.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
7. Show the data-win-control attribute, and then explain that this creates the AppBar control as shown
below.
8. Explain that each button inside the AppBar control requires a data-win-control attribute to specify
that the button is an AppBarCommand object. This will inject the element with the proper
appearance.
9. Each AppBarCommand object has its own properties under the data-win-options attribute as
shown below.
<button data-win-control="WinJS.UI.AppBarCommand"
data-win-options="{id:'btnDelete',
label:'Delete',section:'selection',tooltip:'Delete Selection', icon:'delete'}"
type="button">
</button>
10. Explain that the section: selection will place the button on the left side, and the section: global will
place the button on the right side.
13. In the code below, show that the TopAppBar div element is the same as the BottomAppBar control,
except for the data-win-options attribute, that specifics the AppBar control position.
16. Show the students the four lines at the end of the function that registers the button click events by
specifying the AppBarCommand ID.
document.getElementById("btnBack").addEventListener("click", function () {
displayAlert('Back'); }, false);
document.getElementById("btnDelete").addEventListener("click", function () {
displayAlert('Delete'); }, false);
document.getElementById("btnCamera").addEventListener("click", function () {
displayAlert('Camera'); }, false);
document.getElementById("btnHome").addEventListener("click", function () {
displayAlert('Home'); }, false);
17. Run the application by pressing F5, and then show the students the AppBar control.
18. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
19. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
20. If an Apply Snapshot window appears, click Apply.
Implementing Layout Using Windows 8.1 Controls 4-11
Answer: Navigation commands are placed in the top app bar, with Back on the left and Forward in the
global section. Commands relevant to the current page are places in the bottom app bar, with
dynamic commands in the global section and the rest in the selection section.
Presenting Data 5-1
Module 5
Presenting Data
Contents:
Lesson 1: Working with Data Presentation Controls 2
Lesson 1
Working with Data Presentation Controls
Contents:
Resources 3
Demonstration: Data Presentation Controls 3
Presenting Data 5-3
Resources
Best Practices: Here are some guidelines for using the data presentation controls:
• A ListView control with a Grid layout is suitable for displaying data horizontally. It is most commonly
used in apps for displaying data in grid layout.
• A ListView control with a List layout is suitable for displaying data horizontally. It is most commonly
used for displaying simple list of items or as a replacement for the GridView when your app is in
side-by-side view. In module 4, you learned about adjusting the app by using the side-by-side view.
• A FlipView control is useful for presenting a collection of items that the user views one at a time.
Because it presents items sequentially, it is useful for displaying a gallery of images or the pages of a
magazine.
Note: If the Choose Default Environment Settings dialog appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Resize the app by moving the pointer to the top of the screen. When the pointer changes to the hand
icon, click the mouse button, and then drag the app to one of the edges of the screen.
7. After the app is docked to the side of the screen, minimize its size to the minimum by dragging the
divider line.
5-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
8. Drag the divider line to the side of the screen until the app disappears. Drag the divider line back
until the app reappears, and then release the mouse button.
Explain that the app replaces the ListView layout from GridLayout to ListLayout when displayed
side-by-side to adapt itself to the smaller resolution of the screen.
9. To close the app, switch to Visual Studio, and then, on the Debug menu, click Stop Debugging.
11. Locate the ready: event handler and then show the following code, located at the end of the
function.
currentWindowWidth = document.documentElement.offsetWidth;
12. Explain to the students that the above code saves the initial width of the app window when in full
screen mode.
13. Locate the updateLayout: event handler, and then show the following code.
14. Explain that the above code calls the _toggleSideBySideLayout function whenever the current width
of the app window changes, based on the value of the currentWindowWidth variable saved earlier.
15. Locate the _toggleSideBySideLayout function, and then show the following code.
16. Explain that the above code changes the listView layout between ListLayout and GridLayout based
on to the current view state of the app, side-by-side or full-screen, accordingly.
Presenting Data 5-5
Lesson 2
The ListView Control
Contents:
Resources 6
Demonstration: ListView Grouping and Sorting 6
5-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Best Practice: Use general CSS classes only if all the ListView controls in your app look the
same. If you have different ListView controls in your app, use CSS selectors to apply a specific
style to a specific ListView like in the last code example.
Note: If the Choose Default Environment Settings dialog box appears, click OK.
3. On the left side of the New Project window, expand Templates, expand JavaScript, and then click
Windows Store. Click the template called Grid App, and then click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
5. After the Developer License dialog box shows the new developer license expiration date, click Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
9. Inside the function, you will find two arrays. The first array contains the groups and the second array
contains the items.
10. Groups
var sampleGroups = [
{ key: "group1", title: "Group Title: 1", subtitle: "Group Subtitle: 1",
backgroundImage: darkGray, description: groupDescription },
{ key: "group2", title: "Group Title: 2", subtitle: "Group Subtitle: 2",
backgroundImage: lightGray, description: groupDescription },
...]
11. Items
Presenting Data 5-7
var sampleItems = [
{ group: sampleGroups[0], title: "Item Title: 1", subtitle: "Item Subtitle: 1",
description: itemDescription, content: itemContent, backgroundImage: lightGray },
{ group: sampleGroups[0], title: "Item Title: 2", subtitle: "Item Subtitle: 2",
description: itemDescription, content: itemContent, backgroundImage: darkGray },
...]
12. Explain that each item contains a group value that represents the group to which the item belongs
to.
generateSampleData().forEach
14. Explain that this line invokes the generateSampleData function and adds each item to the
WinJS.Binding.List object called list.
16. Locate the following line that defines the Data namespace.
WinJS.Namespace.define("Data", {
items: groupedItems,
17. Explain that calling the Data.items function returns the groupedItems object.
18. Explain that the grouped list is created by using the createGrouped function, which gets the group
key and the group data from each item in the list.
21. Explain that the sortGroups function takes the last character from the group key value.
22. Explain that the createGrouped function receives a groupSorter function that will change the group
order based on -1, 0, 1 values. The groupSorter function returns the value -1 if the first argument is
less than the second argument. The function returns the value 0 if both the arguments are equal and
1 if the first argument is greater than the second one.
24. At the end of the function, add a call to the sortGroups function. The result should look like the
following.
26. Notice that the group order has changed and now starts from Group 6.
27. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
28. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
• Create a WinJS.Binding.List object. You will have to supply to the list a data source that is a
JavaScript array.
• Use the WinJS.Binding.List object’s createGrouped function. The createGrouped function accepts
three functions:
o getGroupKey. Returns the group key that will be used later in the compareGroups functions to
create group order.
Module 6
Handling Files in Windows Store Apps
Contents:
Lesson 1: Handling Files and Streams in Windows Store Apps 2
Lesson 1
Handling Files and Streams in Windows Store Apps
Contents:
Resources 3
Demonstration: Working with Files 3
Handling Files in Windows Store Apps 6-3
Resources
Best Practice: The lifetime of the data files of the app is tied to the lifetime of the app
itself. When the user uninstalls the app, the data files will be lost as a consequence. This is why
you should not use app data storage to store user files (documents, pictures) or anything that
users might perceive as valuable and irreplaceable. Use Windows Libraries and SkyDrive to store
this kind of data, and use app data files to store app-specific user preferences, settings, and
favorites.
Reference Links: For more information about the manifest capability declarations that are
required for accessing each library type, go to http://go.microsoft.com/fwlink/?LinkId=273989
Note: If the Choose Default Environment Settings dialog box appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
a. In the Developer License dialog box, click I agree.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
7. Open the default.js file, located in the js folder. Locate the createFile function, and then explain the
code shown below.
6-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Windows.Storage.KnownFolders.documentsLibrary.createFileAsync("sample.txt",
Windows.Storage.CreationCollisionOption.replaceExisting).done(
function (newFile) {
file = newFile;
var msg = new Windows.UI.Popups.MessageDialog("'" + newFile.name + "' was
created.");
msg.showAsync();
},
9. Show the students that on the Declarations tab, a new File Type Associations declaration was
added to allow the creation of files in the Documents library.
10. To run the project, press F5. When the application loads, click Create File Under Documents
Library.
12. Switch back to Visual Studio, and then press Shift+F5 to stop the app.
13. Go to the Documents folder by using File Explorer, and then show the students the new file that was
created.
15. Locate the writeText function, and then explain the code shown below.
Windows.Storage.FileIO.writeTextAsync(file,content).done(function () {
var msg = new Windows.UI.Popups.MessageDialog("The following text was written to
'" + file.name + "':\n\n" + content);
msg.showAsync();
},
17. Locate the readText function, and then explain the code shown below.
Windows.Storage.FileIO.readTextAsync(file).done(function (fileContent) {
var msg = new Windows.UI.Popups.MessageDialog("The following text was read from
'" + file.name + "':\n\n" + fileContent);
msg.showAsync();
},
19. Click Create File Under Documents Library, and then click Close.
22. Show the students the dialog box that displays the value that was saved to the file.
Handling Files in Windows Store Apps 6-5
Lesson 2
Working with File User Interface Components
Contents:
Resources 6
Demonstration: Using a File Picker 6
6-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Best Practice: Set the suggestedStartLocation property to a file system location that is
appropriate for the type of file that is being picked. If the user is picking music, pictures, or
videos, set the start location to the Music, Pictures, or Videos library respectively. For all other
types of files, set the start location to the Documents library.
The suggestedStartLocation property is just a starting location. Users can navigate to other
locations while they are using the file picker. The suggestedStartLocation property is not always
used as the start location for the file picker. To give the user a sense of consistency, the file picker
remembers the last location that the user viewed and will generally start at that location if it is
available.
Reference Links: For more information about contacts, and to read about the
Windows.ApplicationModel.Contacts namespace, see
http://go.microsoft.com/fwlink/?LinkId=273991
Note: If the Choose Default Environment Settings dialog box appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
a. In the Developer License dialog box, click I agree.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Locate the FileOpenPicker function, and then explain the code as shown below.
b. Click File Open Picker, and then use the This PC menu to locate the
D:\Allfiles\Mod06\Democode\Lesson 2\FilePicker\FilePicker\images folder.
c. Explain to the students that only the logo.png and the other .png files appear in File Open
Picker.
openPicker.fileTypeFilter.replaceAll(["*"]);
g. To run the app again, press F5, and then click File Open Picker.
h. Explain to the students that they can now not only see the logo.png file and the other .png files,
but also the logo.jpg file, and not just the specific types.
10. Locate the FileSavePicker function, and then explain the following code.
Windows.Storage.CachedFileManager.completeUpdatesAsync(file).done(function
(updateStatus) {
if (updateStatus ===
Windows.Storage.Provider.FileUpdateStatus.complete) {
var msg = new Windows.UI.Popups.MessageDialog("File " +
file.name + " was saved.");
msg.showAsync();
} else {
6-8 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
11. To run the app, press F5, and then click File Save Picker.
12. Explain to the students that you are now using File Save Picker.
13. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
14. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: The following practices are recommended when working with the File API:
• Use the then and done keywords to prevent the UI from blocking.
• Wrap your code with the try and catch blocks and handle the exceptions.
Windows Store App Process Lifetime Management 7-1
Module 7
Windows Store App Process Lifetime Management
Contents:
Lesson 1: Process Lifetime Management 2
Lesson 1
Process Lifetime Management
Contents:
Demonstration: Working with Activation and Lifetime 3
Windows Store App Process Lifetime Management 7-3
Note: If the Choose Default Environment Settings dialog box appears, click OK.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
7. Explain that when the app is suspended, it saves the text input element value to the local app
settings.
9. Explain that you are taking the value from local settings, and then placing the value inside the text
input field.
function resumeAppSettings() {
document.getElementById("name").value = localSettings.values["name"];
}
13. Open the View menu, expand Toolbars, and then ensure that the Debug Location is checked.
7-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
14. Expand the Debug Location toolbar by clicking the arrow next to the Suspend button, and then
click Suspend and shutdown.
15. Launch the app again by pressing F5. Show that your name, the value entered in step 11 appears.
17. Locate the pinSecondaryTile function. Explain that this function will create a secondary tile for the
app.
18. Explain that you transfer user data to the secondary tile by using the activationArguments variable.
19. Locate the onactivated function. Show the ActivationKind property that represents the activation
type.
if (args.detail.arguments != "") {
Explain that the code verifies if the arguments property is not empty, and then displays the argument
value.
21. Launch the app by pressing F5, and then click Create Secondary Tile With Arguments.
22. After the confirm dialog box appears, click Pin to Start.
23. In the Secondary tile was successfully pinned dialog box, click Close.
25. On the Start screen, click the new Secondary tile you have just created. Show the message after the
app finishes loading.
Windows Store App Process Lifetime Management 7-5
Lesson 2
Windows Store App Activation and Background Tasks
Contents:
Resources 6
Demonstration: Working with App Activation and Lock Screen 6
7-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Additional Reading: For additional reading about contracts and extensions, see
http://go.microsoft.com/fwlink/?LinkId=273992
Note: If the Choose Default Environment Settings dialog box appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
a. In the Developer License dialog box, click I agree.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Go to the Declarations tab, and then show the Background Tasks declaration.
7. Explain that to add the app to the lock screen, you must declare a background task, (even if it is an
empty one). Set the value of the Start page box to js/BackgroundTask.js.
8. Open the BackgroundTask.js file located in the js folder, and then explain the background task
registration.
(function () {
var backgroundTask = Windows.UI.WebUI.WebUIBackgroundTaskInstance.current;
close();
})();
10. Locate the getLockScreenStatus function, and then show the getAccessStatus function that returns
the current app access status.
13. Notice that the message box states: The user has not yet taken any action. This is the default setting
and the app is not on the lock screen.
15. To switch back to Visual Studio without closing the app, press Alt+Tab.
17. Locate the requestLockScreenPermissions function, and then show the requestAccessAsync
function that is used to grant the lock screen permission to the app.
20. In the opened dialog box, click Allow, and then in the next dialog box, click Close.
22. Explain that the message box states: This app is on the lock screen and has access to Active Real Time
Connectivity.
a. If the message box displays the message This app is not on the lock screen, open the Settings
charm, click Permissions, and then toggle the Lock screen toggle button on.
24. After you add the app to the lock screen, click Send Badge Notification.
25. To show the Windows lock screen, open the Start screen, click the Admin user button at the top of
the screen, and then click Lock.
26. Show the app badge logo, and the value 6 beside it.
27. Sign in to Windows with the user name Admin and the password Pa$$w0rd.
28. Return to Visual Studio, and then press Shift+F5 to stop the app.
29. Locate the sendBadge function. Explain the function and where the value 6 came from.
32. Add the app to the lock screen by clicking Request Lock Permissions.
33. If a message box appears stating that This app is not on the lock screen, perform the following
steps:
a. Open the Settings charm, click Permissions, and then toggle the Lock screen toggle
button on.
35. After you add the app to the lock screen, click Send Badge Notification.
36. To show the Windows lock screen, open the Start screen, click the Admin user button at the top of
the screen, and then click Lock.
37. Show the students that the app badge logo now displays the value 11.
7-8 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
38. Sign in to Windows with the user name Admin and the password Pa$$w0rd.
41. Locate the removeLockScreenAccess function, and. then explain how to remove lock screen
permissions.
42. Launch the app, and then click Clear Lock Screen Permissions.
44. To show the Windows lock screen, open the Start screen, click the Admin user button at the top of
the screen, and then click Lock.
45. Show that the app has no badge on the lock screen.
46. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
47. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Lesson 3
Implementing a State Management Strategy
Contents:
Resources 10
7-10 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Best Practice: Data related to the current session, which does not have to be persisted
across sessions, can be stored in an in-memory storage location or in temporary storage. On the
other hand, you should store data that should persist across app terminations in local storage,
which is not pruned automatically by the operating system. Finally, you should use roaming
storage when you expect users to use the app across different devices, and have data or settings
that should be automatically replicated across all of them. Bear in mind that roaming storage is
not designed for large data or for frequent synchronization: these require a server-side
component.
Additional Reading: For more information about the different types of storage locations
available to Windows Store apps, see Module 6, “Handling Files in Windows Store Apps” in
Course 20481C.
Answer: Process Lifetime Management of an application is about handling the app while activated,
suspended, or terminated. You need to retain the application data, whenever you can, between
states. If needed, and permitted, you can even update the application’s tile when suspended by
using background tasks and furthermore, having our badge updates on the user’s lock screen
when permitted.
Whenever the Windows Store app is activated and suspended, a corresponding event is fired.
When handling the events, you can save or extract the saved data, and use it when resuming.
From a user experience point of view, the resumed app will seem as if it was always running in
the background.
To save application data between states, you can use different kinds of storage (sessionState,
temp storage, local storage, and roaming storage). Each of these is used for a different
purpose and has different lifetime scope.
Question: How is activation different from launching from your app’s perspective?
Answer: When the app is launched (the user clicks its tile on the Start screen), your app should display its
main page, without any extra context. When the app is activated (for example, through a
contract), it should display UI that is tailored for that scenario, such as Share or Search UI.
Answer: Lock screen apps can push information and updates to the lock screen, which the user can use to
obtain information at a glance. Real-time communication apps, such as email or instant
messaging, can benefit from being granted lock screen status because they can then use a
greater set of background task triggers, supporting real-time communication.
Designing and Implementing Navigation in a Windows Store App 8-1
Module 8
Designing and Implementing Navigation in a Windows Store
App
Contents:
Lesson 1: Handling Navigation in Windows Store Apps 2
Lesson 1
Handling Navigation in Windows Store Apps
Contents:
Resources 3
Demonstration: Basic Navigation 3
Demonstration: Passing Parameters Between the Pages and Handling
Navigation Events 4
Demonstration: Using the NavBar and BackButton Controls 5
Designing and Implementing Navigation in a Windows Store App 8-3
Resources
Note: If the Choose Default Environment Settings dialog box appears, click OK.
5. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. In Solution Explorer, in the BasicPageNavigation project folder, right-click the pages folder.
12. In the Name box, type page1, and then click Add.
13. Press Ctrl+F5, and then show that the default page opens first.
14. In Solution Explorer, in the pages\home folder, double-click the home.html file.
15. Replace the p element containing the Content goes here string, with a new p element containing a
button input element.
8-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
<p>
<input type="button" id="btnNavigate" name="btnNavigate" value="Go to page1" />
</p>
16. In Solution Explorer, in the pages\home folder, double-click the home.js file.
17. In the ready function, add the code to wire the navigation from the default page to the page1 page.
3. Add a text box with the id value of txtValue above the button.
5. In the ready function, update the navigate function to receive the value of the text box as its initial
state.
6. At the end of the immediate function, add an event listener to the navigated event.
8. Add a div element with an id of passedValue after the p element. This p element should have the
Content goes here string.
<div id="passedValue"></div>
12. When the home page opens, enter your name inside the text box.
13. Click the Go to page1 button.
14. When the page1 opens, notice that the text entered earlier now appears in the div element.
15. Return to Visual Studio 2013, and then show the JavaScript console with the log message.
Note: If the Choose Default Environment Settings dialog box appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note:
7. Show the contained div element with data-win-control attribute set to NavBarContainer. Explain
that it represents a navigation menu section.
8. Show the contained NavBarCommand div elements, and then explain that each of these elements
represent a navigation menu button.
9. Show the data-win-options attribute. Explain that the label and icon parameters control the
information that is to be displayed, and the location parameter defines the page that is to be
navigated.
10. In Solution Explorer, in the pages/Pages1 folder, open the page1.html file.
12. Emphasize that the menu is different between pages, as the current page is not included in the
NavBar div element for that page.
13. Repeat the same for page2.html, located in the pages/Page2 folder.
14. Explain that the navigation bar should be located on every page to provide a consistent user
experience when navigating between pages.
15. In Solution Explorer, in the pages/home folder, open the home.html file. Locate the
WinJS.UI.BackButton control within the <header> definition.
16. Explain that this creates the back button for the current page.
<button data-win-control="WinJS.UI.BackButton">
</button>
17. Repeat the previous two steps for page1.html and page2.html.
18. Explain that the back button should be located on each page to provide a consistent user experience
when going back in the navigation stack.
20. Show the navigation page by right-clicking the mouse. If you are using a touch screen, swipe down
from the top edge of the screen.
21. Navigate between the pages, and then point that the navigation menu is different between pages, as
explained in previous steps.
22. After navigating between the pages using the navigation bar, show the back button located on the
top-left corner of the screen.
23. Click the back button to return to the previously navigated pages until the back button disappears.
24. Explain that the back button disappears automatically when the user navigates to the first page in the
navigation stack.
Designing and Implementing Navigation in a Windows Store App 8-7
Lesson 2
Semantic Zoom
Contents:
Resources 8
Demonstration: Implementing Semantic Zoom 8
8-8 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Resources
Reference Links: For more information about the Visual Studio 2013 simulator and its
capabilities, go to
http://go.microsoft.com/fwlink/?LinkId=274000
Note: If this is the first time you are running Visual Studio, you will see a dialog box. Click
OK in the dialog box to continue
3. Go to D:\Allfiles\Mod08\Democode\Lesson 2\SemanticZoomDemo.
5. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
8. Show that there are two ListView controls under the SemanticZoom control: zoomedIn and
zoomedOut.
9. Explain that the zoomedIn ListView control is using templates based on one specific template to
populate the items.
<div id="zoomedIn"
data-win-control="WinJS.UI.ListView"
data-win-options="{itemTemplate:select('#itemtemplate'), groupHeaderTemplate:
select('#headertemplate')}">
Designing and Implementing Navigation in a Windows Store App 8-9
</div>
10. Explain that the zoomedOutListView control will display a different template for the zoomed out
view.
<div id="zoomedOut"
data-win-control="WinJS.UI.ListView"
data-win-options="{ itemTemplate: select('#zoomOutTemplate') }">
</div>
13. Show the function, and then explain that you need to populate both the controls with a data source.
The zoomedOut control should only display the group’s data source and not the items themselves.
15. After the app is fully loaded, press Ctrl while rotating the wheel button down. Explain how
SemanticZoom can assist the user to navigate easily.
16. Show how to activate SemanticZoom using the zoom icon at the lower-right corner of the start
screen.
17. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
18. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: Semantic Zoom is a touch-optimized technique for presenting and navigating data or content in
a single app view. Semantic Zoom helps to avoid panning, scrolling, or using tree view controls.
Implementing Windows 8.1 Contracts 9-1
Module 9
Implementing Windows 8.1 Contracts
Contents:
Lesson 2: The Search Contract 2
Lesson 2
The Search Contract
Contents:
Resources 3
Implementing Windows 8.1 Contracts 9-3
Resources
Additional Reading: For more information about the manifest, see Module 13: Planning
for Windows Store App Deployment in Course 20481C.
Reference Links: For detailed Microsoft guidelines for using search in Windows Store apps,
see http://go.microsoft.com/fwlink/?LinkId=274002
9-4 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Lesson 3
The Share Contract
Contents:
Resources 5
Implementing Windows 8.1 Contracts 9-5
Resources
Reference Links: The following webpage contains the Microsoft guidelines for sharing
content.
http://go.microsoft.com/fwlink/?LinkId=274005
Best Practice: You should always try to work with the built-in sharing data types. By using
a custom data format, you severely limit the number of apps that can receive shared data from
your app. Both the source app and the target app would have to be developed to specifically
support the custom data format.
Additional Reading: For more information on how to select data formats for sharing on
this page, see http://go.microsoft.com/fwlink/?LinkId=274006
9-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Lesson 4
Managing App Settings and Preferences
Contents:
Resources 7
Demonstration: Working With Application Settings 7
Implementing Windows 8.1 Contracts 9-7
Resources
Additional Reading: Here is a Microsoft example of a user control that can be used as a
Settings pane.
http://go.microsoft.com/fwlink/?LinkId=274007
Additional Reading: For the full set of Microsoft guidelines for settings in this article, see
http://go.microsoft.com/fwlink/?LinkId=274008
Note: If the Choose Default Environment Settings dialog box appears, click OK.
4. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
5. Open the pages folder, and then show the available Settings flyout pages to the students.
7. Explain that the Settings flyout is a WinRT control that is required for implementing settings in your
app.
8. Show the main div element that contains the SettingsFlyout control attribute and the options
attribute that defines the width and settingsCommandId properties of the Settings flyout.
9. Explain that the students should implement the back button as shown below, to allow the users to
navigate back from a specific settings page, and then show them the button.
10. Open the Terms.html page, and then show that this page has the wide property defined.
11. Open the PrivacyStatement.html page, and then show how an iframe element is used to display a
remote web page instead of displaying static content.
14. Explain that to integrate the Settings flyout pages with the App Settings, you need to listen to the
onsettings event. This event returns the applicationcommands object, which allows you to add the
Settings Flyout pages as shown below.
function populateAppSettings() {
WinJS.Application.onsettings = function (e) {
...
};
15. Explain that to add the Settings Flyout pages, you need to assign a new object to the
applicationcommands property of the e.details object. Each command needs to contain the
command name, its title, and the href properties. The href property stores the location of the page
as shown below.
e.detail.applicationcommands = {
"help": { title: "Help", href: "/pages/help.html" },
"terms": { title: "Terms", href: "/pages/terms.html" },
"privacy": { title: "Privacy Statement", href: "/pages/privacystatement.html" }
};
WinJS.UI.SettingsFlyout.populateSettings(e);
17. Given below is the complete code sample that shows how to add the populateAppSettings function.
function populateAppSettings() {
WinJS.Application.onsettings = function (e) {
e.detail.applicationcommands = {
"help": { title: "Help", href: "/pages/help.html" },
"terms": { title: "Terms", href: "/pages/terms.html" },
"privacy": { title: "Privacy Statement", href:
"/pages/privacystatement.html" }
};
WinJS.UI.SettingsFlyout.populateSettings(e);
};
}
19. Open the settings panel, and then show that there are no settings flyouts.
20. Click Add Settings, and then reopen the settings panel that was closed automatically.
21. Open Help and Terms flyouts, and then show the difference in the width between wide and narrow.
22. Open Privacy Statement, and then show the students that the content is a remote web site.
Implementing Windows 8.1 Contracts 9-9
23. Click Show Settings, and then explain that you can call the settings panel by using the following
code (the showSettings function).
WinJS.UI.SettingsFlyout.show();
24. Click Show Terms Settings Flyout, and then explain that the students can open a specific settings
flyout page by using the following.
25. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
26. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: If your app takes too long to query your data source for suggestions, the user may experience UI
responsiveness issues as they type inside the Search box.
Implementing Windows 8.1 Contracts 9-11
Answer: In the past, developers had to consider data sharing integration scenarios between every pair of
apps individually. This could have been a nightmare scenario, because each app could present a
different sharing interface that had to be implemented uniquely. As a result, you would have to
implement custom sharing for each app and verify that the integration works well on production
machines.
Implementing Tiles and User Notifications 10-1
Module 10
Implementing Tiles and User Notifications
Contents:
Lesson 1: Implementing Tiles, Live Tiles, Secondary Tiles, and Badge Notifications 2
Lesson 1
Implementing Tiles, Live Tiles, Secondary Tiles, and
Badge Notifications
Contents:
Demonstration: Creating a Tile Notification with a Local Image 3
Implementing Tiles and User Notifications 10-3
Note: If the Choose Default Environment Settings dialog box appears, click OK.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Locate the sendTileNotification function, and show the tile string format to the students. Explain
that both images used in the notification xml are located in the application so you need to use ms-
appx prefix for the image path as shown below.
7. Explain that the tile can be created with either a string or an XML document. Explain that below the
previous code, you need to add the following code to load the tile string into an XmlDocument
object.
8. Explain that from the XmlDocument object (that contains the tile schema), you must create a new
TileNotification object, and then call the createTileUpdaterForApplication function by passing the
new tile information as shown below.
11. On the Start screen, scroll up to the Apps list, and locate the app tile.
12. Right click the app tile, click Pin button located on the app bar, and then show the pinned app tile.
13. Right-click the app tile, click the Resize button located on the app bar, and then choose Medium
from the displayed menu.
14. Switch to the app, and then click the Clear Tile button
15. On the Start screen, locate the app tile, and then show that the tile notification is no longer available
on the Start screen.
16. Switch to Visual Studio, and then open the default.js file located in the js folder.
17. Locate the clearTileNotification function, and show the function code used to clear tile notifications
from the app tile.
18. Stop debugging by pressing Shift-F5, and then close Visual Studio.
Implementing Tiles and User Notifications 10-5
Lesson 2
Implementing Toast Notifications
Contents:
Demonstration: Creating Toast Notification with a Local Image 6
10-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Note: If the Choose Default Environment Settings dialog box appears, click OK.
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
6. Locate the send function, and show the tile string format to the students. Explain that both images
used in the notification xml are located in the application folder, so you need to use ms-appx prefix
for the image path as shown below.
7. Explain that the toast notifications can be created with a string or an XML document.
Explain that below the previous code, you need to add the following code to load the toast string
into an XmlDocument object as shown below.
8. Explain that from the XmlDocument object (that contains the toast schema), you must create a new
ToastNotification object, and then call the createToastNotifier function, passing the new toast
object as parameter as shown below.
Implementing Tiles and User Notifications 10-7
11. In the Application section, verify that the Toast capable box is set to Yes. Explain that unless this
box is set to Yes, your app cannot fire toast notifications.
15. Explain that the tile can contain activation arguments that can allow the developer to perform a
specific action when the user clicks the toast notification.
16. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
17. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Review Question(s)
Question: Consider the main screen of a news app, which includes text and images. How can you let the
user see relevant news when your app is not running?
Answer: First, enable the user to pin news categories to the Start screen and update the latest news on
the pinned tile. Second, enable the user to define important news categories (such as extreme
weather conditions) and display toast notifications when updates arrive in these categories.
Implementing Tiles and User Notifications 10-9
• Create a square version of the tile content to be used as a smaller version of the tile.
Question: Which scenarios are not appropriate for using toast notifications?
Answer: When the information is not important or urgent, or when it is not actionable.
Designing and Implementing a Data Access Strategy 11-1
Module 11
Designing and Implementing a Data Access Strategy
Contents:
Module Review and Takeaways 2
11-2 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Review Question(s)
Question: Consider the main screen of an app that displays current news. It includes text and images. It
saves user preferred news sections between runs and between computers.
Answer: Either web service or remote storage strategies are used for the updated news text and images.
Use web services or remote storage strategies to save user preferences, available for the user when
running supporting apps on any computer.
Use local files to cache the latest top news and enable the user to also browse them when offline.
Responding to Mouse and Touch 12-1
Module 12
Responding to Mouse and Touch
Contents:
Lesson 1: Working with Mouse Events 2
Lesson 1
Working with Mouse Events
Contents:
Demonstration: Working with Pointer Events 3
Responding to Mouse and Touch 12-3
Note: If this is first time you are running Visual Studio 2013, you will see a dialog box. Click
OK to continue.
5. If a Developer License dialog box prompts you to renew your developer license:
d. In the Developer License dialog box, click Sign up and follow the instructions to create an
account for yourself. When this is completed, use the newly created account credentials to obtain
the Developers License.
e. After the Developer License dialog box shows the new developer license expiration date, click
Close.
Note: When you create a new account, be sure to write down the credentials, and then use
them whenever an email account is required. You can also sign in by using your personal
developer account if you already have one.
7. Show the canvas element inside the body element. Explain that the canvas element is HTML 5
element.
9. Locate the registerTouchEvents function. Show the first two lines needed to get the canvas element
from the DOM, and then retrieve the context of the canvas. The context will allow you to draw and
use the special features of the canvas element.
canvas = document.getElementById("canvas");
context = canvas.getContext("2d");
10. Show the MS Pointer Events registration, and then explain each event.
12. Locate the touchHandler function, and then explain the first two lines. The event arguments contain
many properties regarding the pointer event. In this demo, you need the pointer position on the
canvas. You can use the x and y coordinates.
var x = evt.currentPoint.position.x;
var y = evt.currentPoint.position.y;
13. Show how the actions of the pointer events are drawn. If the user performs a click operation, the
MSPointerDown event will be called. If the user performs a click operation and a move operation at
the same time, the second condition triggers. If the user only moves the pointer, the last condition
triggers.
15. Show the different pointer events over the canvas, such as right or left-click of the pointer, and the
click and drag of the items.
Responding to Mouse and Touch 12-5
Lesson 2
Working with Gesture Events
Contents:
Demonstration: Using the Visual Studio 2013 Simulator for
Windows Store Apps 6
Demonstration: Working With Gestures 6
12-6 Essentials of Developing Windows® Store Apps Using HTML5 and JavaScript
Demonstration: Using the Visual Studio 2013 Simulator for Windows Store
Apps
Demonstration Steps
1. Open File Explorer, go to C:\Program Files (x86)\Common Files\Microsoft Shared\Windows
Simulator\12.0, and then double-click the
2. Explain that the arrow shaped pointer indicates that you are in the pointer mode.
3. To switch to the touch mode, click the Basic touch mode icon. It looks similar to a hand, and is
located on the right edge of the simulator screen.
4. Explain that the hand shaped pointer indicates that you are in the touch mode.
6. Demonstrate the way the pointer changes. This indicates that you are currently simulating the action
of touching the screen.
7. To switch to pinch or zoom touch mode, click the pinch/zoom touch mode icon.
9. Click the pointer, and then rotate the wheel button back and forth.
11. To switch to the Rotation touch mode, click the Rotation touch mode icon.
13. Click the pointer, and then rotate the wheel button back and forth.
Note: If this is first time you are running Visual Studio, you will see a dialog box. Click OK
to continue.
3. Go to D:\Allfiles\Mod12\Democode\Lesson 2\GesturesDemo.
6. Type your email address and a password in the Windows Security dialog box, and then click Sign in.
7. In the js folder, open the default.js file.
8. Locate the registerEvents function and show the different events available for gestures.
9. Explain how a new MSGesture object is created and how its target object is assigned to the DOM
target.
10. Locate the printEvent function, and then explain that this function will allow you to read and see the
different gestures.
function printEvent(evt) {
var str = "Type: " + evt.type + " X: " + evt.screenX + " Y: " + evt.screenY;
var element = document.getElementById("logger");
messageCounter++;
element.innerHTML = "<div>" + str + "</div>" + element.innerHTML;
element = document.getElementById("eventCount");
element.innerHTML = messageCounter;
}
12. Click and hold the pointer on the green rectangle. You should see the gesture appear in the log, in
the black rectangle.
o Open the Windows 8.1 Start Screen, and then demonstrate some basic gestures.
o Swipe the finger from right to left to open the Charms bar
o Swipe the finger from bottom to top to open the app bar.
13. Explain the Grid View selection, and the built-in support for dragging in a WinRT control.
14. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
15. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Answer: Built-in gestures provide an experience that users expect from your app. In addition, by using
built-in gestures, you do not have to subscribe to pointer events and manually decode data to
understand common gestures, such as tap and hold.
Tools
Visual Studio 2013 simulator for Windows Store apps
Responding to Mouse and Touch 12-9
Answer: Subscribe to the onGestureChange event of the element you want the user to slide. This event
is raised when the pointer is moved, and enables you to accumulate the change.
Planning for Windows Store App Deployment 13-1
Module 13
Planning for Windows Store App Deployment
Contents:
Lesson 1: The Windows Store App Manifest 2
Lesson 1
The Windows Store App Manifest
Contents:
Resources 3
Demonstration: Exploring the ILoveNotes Application and updates to the
Visual Assets Manifest file 3
Demonstration: Exploring Capabilities for ILoveNotes 4
Demonstration: Exploring Declarations for ILoveNotes 4
Demonstration: Exploring Packaging for ILoveNotes 5
Planning for Windows Store App Deployment 13-3
Resources
Declarations Section
Additional Reading: Read more about contract and extension declarations0, see
http://go.microsoft.com/fwlink/?LinkId=274017
Content URIs
2. On the Visual Assets tab, change the short name of the app from ILoveNotes to MyNotes.
4. To open the Search pane, press Windows Key+Q or access it through the charms.
5. In the Search box, type My, and then the app named MyNotes will appear in the list of apps to the
left of the screen.
6. Return to Visual Studio, and then, in the package.appxmanifest file, click the Visual Assets tab.
7. Click the browse button that is marked with … in the Square 150x150 Logo section, next to the
150x150 pixels preview image to display the file picker.
8. In the Assets folder, located in the project base folder, double-click the wideLogo.png image.
9. If a warning dialog box appears that suggests the image is invalid, click Cancel, and then on the
Select Image dialog box, click Cancel again.
Note: If your image assets do not match the required dimensions for that category, a
rescaled version of the target image will be created. It is a good practice to use a visual asset with
the required dimension instead of a scaled image.
10. On the Visual Assets tab, under the Show Name section, check the Square 150x150 Logo and
Wide 310x150 Logo check boxes.
11. Deploy the solution by selecting Build/Deploy Solution from the menu.
12. Go to the Start screen. If the app is not pinned to the start screen, pin it by clicking the All apps
button. Locating the app in the app-list, right-click the app tile, and then click Pin to Start in the
app-bar.
13-4 Essentials of Developing Windows 8.1 Apps Using HTML5 and JavaScript
13. Point out that the Short name of the app is now visible at the bottom of the app tile.
17. Show that the text color has changed to Dark on the app tile.
21. Show that the Short name displayed on the app tile has changed.
23. Remove all the text from the short name box.
25. Show that the display name is now shown on the app tile.
26. Under the Splash Screen section, change the color in the background text box to any six-digit
hexadecimal number, such as: FF0000 for red.
28. Show that the background color of the splash screen has now changed.
2. For a few of the capabilities listed, select the item, read the description, and then open the More
Information link.
3. To deploy the app, on the Build menu, click the Deploy Solution button.
6. Click Permissions.
7. Point out that the app permissions declared in the capabilities section appears here. Some
capabilities should also have toggle switches to turn them on or off.
2. Click the Add button to add the AutoPlay Content declaration. Note that some declarations require
additional information before they can be added.
3. Show that the red X icon that appears next to the declaration and the red X icon that appears next to
the Launch Actions properties group box indicate missing information.
4. Point to the red X icons, and then read the hints that are displayed as tooltips.
Planning for Windows Store App Deployment 13-5
5. Remove the AutoPlay Content declaration and all the other declarations with red X icons by clicking
the Remove button next to each declaration.
6. Remove the Search declaration by clicking the Remove button next to it.
9. Select Break from the pop up, stop debugging by pressing Shift-F5, and then return to the manifest
file.
10. In the Available Declarations list, click Add to add the Search declaration back to the Available
Declarations list.
3. In the Publisher display name box, replace Microsoft with Microsoft Corporation.
4. Build, deploy, and then run the app.
6. Verify that the publisher display name now reads as By Microsoft Corporation.
7. In Hyper-V Manager, in the Virtual Machines section, click 20481C-SEA-DEV to highlight it.
8. In the Snapshots section, right-click the StartingImage snapshot, and then click Apply.
Lesson 2
Windows Store App Certification
Contents:
Resources 7
Planning for Windows Store App Deployment 13-7
Resources
Additional Reading: For more information on how to set up a Windows Store developer
account, see http://go.microsoft.com/fwlink/?LinkId=274018
Additional Reading: A summary of key information that you have to provide for your app
submission can be found here.
http://go.microsoft.com/fwlink/?LinkId=274020
Additional Reading: For more information about how to use the Windows App
Certification Kit, go here.
http://go.microsoft.com/fwlink/?LinkId=274021
Additional Reading: For more information about how to sign app packages, see
http://go.microsoft.com/fwlink/?LinkId=274024
Additional Reading: For more information about how to deploy enterprise apps, go to
http://go.microsoft.com/fwlink/?LinkId=274025
13-8 Essentials of Developing Windows 8.1 Apps Using HTML5 and JavaScript
Review Question(s)
Question: Should you localize your app? Why or why not?
Answer: Yes, if you have the resources, localizing your app is a good idea. It expands the number of
potential customers. Even if you decide not to localize immediately, it is a good idea to prepare for future
localization. Windows 8.1 has been released in 109 languages and the Windows Store will be able to sell
apps in over 200 markets. The Multilingual App Toolkit helps developers localize apps.
http://go.microsoft.com/fwlink/?LinkId=274027