23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• Context menus can provide specific commands for particular content or a selection. For example,<br />

selected text typically provides a context menu for clipboard commands, as shown here in the<br />

Mail app.<br />

• Confirmations and other questions (including collecting information) that you need to display in<br />

response to a user action should use a flyout control; see Guidelines and checklist for Flyouts.<br />

Tapping or clicking outside the control (or pressing ESC) is the same as canceling. Here’s an<br />

example from the SkyDrive app:<br />

• For blocking events that are not related to a user command but that affect the whole app, use a<br />

message dialog. A message dialog effectively disables the rest of the app until you pay attention<br />

to it! A good example of this is a loss of network connectivity, where the user needs to be<br />

informed that some capabilities may not be available until connectivity is restored. User consent<br />

prompts for capabilities like geolocation, as shown below from the Maps app, is another place<br />

you see message dialogs. Note that a message dialog is used only when the app is in the<br />

foreground. Toast notifications, as we’ll see in Chapter 13, “Tiles, Notifications, the Lock Screen,<br />

and Background Tasks,” apply only to background apps.<br />

• Finally, other errors that don’t require user action can be displayed either inline (on the app<br />

canvas) or through flyouts. See Laying out your UI: errors for full details; we’ll see some examples<br />

later on as well.<br />

Where the bottom app bar is concerned, it’s also important to organize your commands into sets, as<br />

this streamlines implementation as we’ll see in the next section. For full guidance I recommend two<br />

additional topics in the documentation: Guidelines and checklist for app bars and Commanding Design,<br />

274

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

Saved successfully!

Ooh no, something went wrong!