100% found this document useful (3 votes)
62 views62 pages

Full Programming Windows Store Apps With HTML CSS and JavaScript Second Edition Kraig Brockschmidt PDF All Chapters

Windows

Uploaded by

lheytrirat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (3 votes)
62 views62 pages

Full Programming Windows Store Apps With HTML CSS and JavaScript Second Edition Kraig Brockschmidt PDF All Chapters

Windows

Uploaded by

lheytrirat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 62

Download the full version of the textbook now at textbookfull.

com

Programming Windows Store Apps with HTML CSS


and JavaScript Second Edition Kraig
Brockschmidt

https://textbookfull.com/product/programming-
windows-store-apps-with-html-css-and-javascript-
second-edition-kraig-brockschmidt/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Programming Windows Store Apps with HTML CSS and


JavaScript Second Edition Kraig Brockschmidt

https://textbookfull.com/product/programming-windows-store-apps-with-
html-css-and-javascript-second-edition-kraig-brockschmidt/

textbookfull.com

Sams Teach Yourself HTML, CSS, and JavaScript All in One


Julie C. Meloni

https://textbookfull.com/product/sams-teach-yourself-html-css-and-
javascript-all-in-one-julie-c-meloni/

textbookfull.com

Web Development for beginners Learn HTML CSS Javascript


step by step with this Coding Guide Programming Guide for
beginners Website development 1st Edition Mastery
https://textbookfull.com/product/web-development-for-beginners-learn-
html-css-javascript-step-by-step-with-this-coding-guide-programming-
guide-for-beginners-website-development-1st-edition-mastery/
textbookfull.com

Visual Astronomy Under Dark Skies A New Approach to


Observing Deep Space The Patrick Moore Practical Astronomy
Series 2005th Edition Cooke Antony
https://textbookfull.com/product/visual-astronomy-under-dark-skies-a-
new-approach-to-observing-deep-space-the-patrick-moore-practical-
astronomy-series-2005th-edition-cooke-antony/
textbookfull.com
Disclosing Church An Ecclesiology Learned from
Conversations in Practice 1st Edition Watkins Clare

https://textbookfull.com/product/disclosing-church-an-ecclesiology-
learned-from-conversations-in-practice-1st-edition-watkins-clare/

textbookfull.com

Cardioskeletal Myopathies in Children and Young Adults 1st


Edition John Lynn Jefferies

https://textbookfull.com/product/cardioskeletal-myopathies-in-
children-and-young-adults-1st-edition-john-lynn-jefferies/

textbookfull.com

The effect of the binary space and social interaction in


creating an actual context of understanding the
traditional urban space 2nd Edition Ph. D. Candidate
Mustafa Aziz Mohammad Amen
https://textbookfull.com/product/the-effect-of-the-binary-space-and-
social-interaction-in-creating-an-actual-context-of-understanding-the-
traditional-urban-space-2nd-edition-ph-d-candidate-mustafa-aziz-
mohammad-amen/
textbookfull.com

Letters from a serial killer the story that inspired


Blessed are the dead First Edition Anderson

https://textbookfull.com/product/letters-from-a-serial-killer-the-
story-that-inspired-blessed-are-the-dead-first-edition-anderson/

textbookfull.com

Ole Miss Juvenilia William Faulkner

https://textbookfull.com/product/ole-miss-juvenilia-william-faulkner/

textbookfull.com
Basic Skills in Interpreting Laboratory Data Mary Lee

https://textbookfull.com/product/basic-skills-in-interpreting-
laboratory-data-mary-lee/

textbookfull.com
PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399

Copyright © 2014 Microsoft Corporation

All rights reserved. No part of the contents of this book may be reproduced or tr ansmitted in any form or by any means
without the written permission of the publisher.

Microsoft Press books are available through booksellers and distributors worldwide. If you need support related to
this book, email Microsoft Press Book Support at mspinput@microsoft.com. Please tell us what you think of this
book at http://aka.ms/tellpress.

Unless otherwise noted, the companies, organizations, products, domain names, e -mail addresses, logos, people,
places, and events depicted in examples herein are fictitious. No association with any real company, organization,
product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under
copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any
purpose, without the express written permission of Microsoft Corporation.

Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/


Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of their
respective owners.

This book expresses the author’s views and opinions. The information contained in this book is provided without any
express, statutory, or implied warranties. Neither the authors, Microsoft Cor poration, nor its resellers, or distributors will
be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.

Acquisitions, Developmental, and Project Editor: Devon Musgrave


Cover: Twist Creative • Seattle and Joel Panchot

1
Table of Contents
Introduction ........................................................................................................................ 21
Who This Book Is For ........................................................................................................ 23
What You'll Need (Can You Say “Samples”?) ...................................................................... 24
A Formatting Note............................................................................................................ 25
Acknowledgements .......................................................................................................... 26
Free Ebooks from Microsoft Press ..................................................................................... 28
The “Microsoft Press Guided Tours” App ........................................................................... 28
Errata & Book Support ...................................................................................................... 28
We Want to Hear from You............................................................................................... 29
Stay in Touch ................................................................................................................... 29
Chapter 1 The Life Story of a Windows Store App: Characteristics of the
Windows Platform .............................................................................................................. 30
Leaving Home: Onboarding to the Windows Store ............................................................. 32
Discovery, Acquisition, and Installation.............................................................................. 35
Playing in Your Own Room: The App Container .................................................................. 39
Different Views of Life: Views and Resolution Scaling ......................................................... 42
Those Capabilities Again: Getting to Data and Devices ........................................................ 46
Taking a Break, Getting Some Rest: Process Lifecycle Management ..................................... 49
Remembering Yourself: App State and Roaming................................................................. 51
Coming Back Home: Updates and New Opportunities ........................................................ 56
And, Oh Yes, Then There’s Design ..................................................................................... 58
Feature Roadmap and Cross-Reference ............................................................................. 59
Chapter 2 Quickstart .......................................................................................................... 65
A Really Quick Quickstart: The Blank App Template ............................................................ 65
Blank App Project Structure .......................................................................................... 68

2
QuickStart #1: Here My Am! and an Introduction to Blend for Visual Studio ........................ 72
Design Wireframes ....................................................................................................... 73
Create the Markup ....................................................................................................... 76
Styling in Blend............................................................................................................. 78
Adding the Code........................................................................................................... 83
Extra Credit: Improving the App ........................................................................................ 97
Receiving Messages from the iframe ............................................................................. 98
Improving the Placeholder Image with a Canvas Element ................................................ 99
Handling Variable Image Sizes ..................................................................................... 100
Moving the Captured Image to AppData (or the Pictures Library) .................................. 103
Using a Thumbnail Instead of the Full Image ................................................................ 105
The Other Templates: Projects and Items ........................................................................ 107
Navigation App Template............................................................................................ 107
Grid App Template ..................................................................................................... 107
Hub App Template...................................................................................................... 108
Split Template ............................................................................................................ 108
Item Templates .......................................................................................................... 108
What We’ve Just Learned ............................................................................................... 109
Chapter 3 App Anatomy and Performance Fundamentals .................................................. 111
App Activation ............................................................................................................... 112
Branding Your App 101: The Splash Screen and Other Visuals ....................................... 113
Activation Event Sequence .......................................................................................... 117
Activation Code Paths ................................................................................................. 119
WinJS.Application Events ............................................................................................ 121
Optimizing Startup Time ............................................................................................. 124
WinRT Events and removeEventListener.......................................................................... 126
App Lifecycle Transition Events and Session State ............................................................ 128
Suspend, Resume, and Terminate................................................................................ 129

3
Basic Session State in Here My Am! ............................................................................. 133
Page Controls and Navigation ......................................................................................... 136
WinJS Tools for Pages and Page Navigation .................................................................. 136
The Navigation App Template, PageControl Structure, and PageControlNavigator ......... 139
The Navigation Process and Navigation Styles .............................................................. 146
Optimizing Page Switching: Show-and-Hide ................................................................. 148
Page-Specific Styling ................................................................................................... 149
Async Operations: Be True to Your Promises .................................................................... 151
Using Promises ........................................................................................................... 151
Joining Parallel Promises ............................................................................................. 153
Sequential Promises: Nesting and Chaining .................................................................. 153
Managing the UI Thread with the WinJS Scheduler........................................................... 156
Scheduler Priorities .................................................................................................... 157
Scheduling and Managing Tasks .................................................................................. 158
Setting Priority in Promise Chains ................................................................................ 160
Long-Running Tasks .................................................................................................... 162
Debugging and Profiling.................................................................................................. 165
Debug Output and Logging.......................................................................................... 165
Error Reports and the Event Viewer............................................................................. 166
Async Debugging ........................................................................................................ 169
Performance and Memory Analysis ............................................................................. 170
The Windows App Certification Toolkit ........................................................................ 175
What We’ve Just Learned ............................................................................................... 176
Chapter 4 Web Content and Services ................................................................................ 177
Network Information and Connectivity ............................................................................ 179
Network Types in the Manifest.................................................................................... 180
Network Information (the Network Object Roster) ....................................................... 181
The ConnectionProfile Object...................................................................................... 183

4
Connectivity Events .................................................................................................... 184
Cost Awareness .......................................................................................................... 185
Running Offline .......................................................................................................... 189
Hosting Content: the WebView and iframe Elements ....................................................... 191
Local and Web Contexts (and iframe Elements) ............................................................ 192
Dynamic Content........................................................................................................ 195
App Content URIs ....................................................................................................... 197
The <x-ms-webview> Element..................................................................................... 198
HTTP Requests ............................................................................................................... 209
Using WinJS.xhr.......................................................................................................... 210
Using Windows.Web.Http.HttpClient........................................................................... 211
Suspend and Resume with Online Content................................................................... 216
Prefetching Content ................................................................................................... 218
Background Transfer ...................................................................................................... 219
Basic Downloads ........................................................................................................ 221
Basic Uploads ............................................................................................................. 225
Completion and Error Notifications ............................................................................. 226
Providing Headers and Credentials .............................................................................. 227
Setting Cost Policy ...................................................................................................... 227
Grouping Transfers ..................................................................................................... 228
Suspend, Resume, and Restart with Background Transfers ............................................ 228
Authentication, the Microsoft Account, and the User Profile ............................................ 230
The Credential Locker ................................................................................................. 231
The Web Authentication Broker .................................................................................. 233
Single Sign-On ............................................................................................................ 237
Using the Microsoft Account ....................................................................................... 238
The User Profile (and the Lock Screen Image) ............................................................... 244
What We’ve Just Learned ............................................................................................... 246

5
Chapter 5 Controls and Control Styling .............................................................................. 248
The Control Model for HTML, CSS, and JavaScript ............................................................ 249
HTML Controls ............................................................................................................... 251
Extensions to HTML Elements ..................................................................................... 254
WinJS Controls ............................................................................................................... 255
Syntax for data-win-options ........................................................................................ 259
WinJS Control Instantiation ......................................................................................... 261
Strict Processing and processAll Functions ................................................................... 262
Example: WinJS.UI.HtmlControl................................................................................... 263
Example: WinJS.UI.Rating (and Other Simple Controls) ................................................. 264
Example: WinJS.UI.Tooltip .......................................................................................... 265
Example: WinJS.UI.ItemContainer ............................................................................... 266
Working with Controls in Blend ....................................................................................... 269
Control Styling ............................................................................................................... 272
Styling Gallery: HTML Controls .................................................................................... 274
Styling Gallery: WinJS Controls .................................................................................... 276
Some Tips and Tricks .................................................................................................. 284
Custom Controls ............................................................................................................ 285
Implementing the Dispose Pattern .............................................................................. 288
Custom Control Examples ........................................................................................... 289
Custom Controls in Blend ............................................................................................ 293
What We’ve Just Learned ............................................................................................... 297
Chapter 6 Data Binding, Templates, and Collections .......................................................... 298
Data Binding .................................................................................................................. 299
Data Binding Basics..................................................................................................... 299
Data Binding in WinJS ................................................................................................. 301
Under the Covers: Binding mixins ................................................................................ 311
Programmatic Binding and WinJS.Binding.bind............................................................. 313

6
Binding Initializers ...................................................................................................... 315
Binding Templates.......................................................................................................... 319
Template Options, Properties, and Compilation ........................................................... 322
Collection Data Types ..................................................................................................... 324
Windows.Foundation.Collection Types ........................................................................ 325
WinJS Binding Lists ..................................................................................................... 331
What We’ve Just Learned ............................................................................................... 342
Chapter 7 Collection Controls ........................................................................................... 344
Collection Control Basics................................................................................................. 345
Quickstart #1: The WinJS Repeater Control with HTML controls .................................... 345
Quickstart #2: The FlipView Control Sample ................................................................. 349
Quickstart #3: The ListView Essentials Sample .............................................................. 351
Quickstart #4: The ListView Grouping Sample .............................................................. 353
ListView in the Grid App Project Template ................................................................... 357
The Semantic Zoom Control ............................................................................................ 361
How Templates Work with Collection Controls................................................................. 364
Referring to Templates ............................................................................................... 364
Template Functions (Part 1): The Basics ....................................................................... 365
Creating Templates from Data Sources in Blend ........................................................... 368
Repeater Features and Styling......................................................................................... 372
FlipView Features and Styling.......................................................................................... 377
Collection Control Data Sources ...................................................................................... 380
The Structure of Data Sources (Interfaces Aplenty!)...................................................... 381
A FlipView Using the Pictures Library ........................................................................... 384
Custom Data Sources and WinJS.UI.VirtualizedDataSource ........................................... 386
ListView Features and Styling .......................................................................................... 393
When Is ListView the Right Choice? ............................................................................. 393
Options, Selections, and Item Methods........................................................................ 395

7
Styling ....................................................................................................................... 399
Loading State Transitions ............................................................................................ 401
Drag and Drop ............................................................................................................ 402
Layouts ...................................................................................................................... 405
Template Functions (Part 2): Optimizing Item Rendering .................................................. 414
What We’ve Just Learned ............................................................................................... 419
Chapter 8 Layout and Views ............................................................................................. 421
Principles of Page Layout ................................................................................................ 423
Sizing, Scaling, and Views: The Many Faces of Your App.................................................... 426
Variable View Sizing and Orientations .......................................................................... 426
Screen Resolution, Pixel Density, and Scaling ............................................................... 437
Multiple Views ........................................................................................................... 442
Pannable Sections and Styles .......................................................................................... 446
Laying Out the Hub ..................................................................................................... 447
Laying Out the Sections .............................................................................................. 448
Panning Styles and Railing ........................................................................................... 449
Panning Snap Points and Limits ................................................................................... 451
Zooming Snap Points and Limits .................................................................................. 452
The Hub Control and Hub App Template.......................................................................... 453
Hub Control Styling..................................................................................................... 460
Using the CSS Grid .......................................................................................................... 461
Overflowing a Grid Cell ............................................................................................... 463
Centering Content Vertically ....................................................................................... 463
Scaling Font Size ......................................................................................................... 464
Item Layout ................................................................................................................... 465
CSS 2D and 3D Transforms .......................................................................................... 466
Flexbox ...................................................................................................................... 466
Nested and Inline Grids............................................................................................... 467

8
Fonts and Text Overflow ............................................................................................. 468
Multicolumn Elements and Regions ............................................................................. 470
What We’ve Just Learned ............................................................................................... 472
Chapter 9 Commanding UI ................................................................................................ 474
Where to Place Commands ............................................................................................. 475
The App Bar and Nav Bar ................................................................................................ 480
App Bar Basics and Standard Commands ..................................................................... 481
App Bar Styling ........................................................................................................... 490
Command Menus ....................................................................................................... 494
Custom App Bars ........................................................................................................ 495
Nav Bar Features ........................................................................................................ 497
Nav Bar Styling ........................................................................................................... 505
Flyouts and Menus ......................................................................................................... 507
WinJS.UI.Flyout Properties, Methods, and Events......................................................... 509
Flyout Examples ......................................................................................................... 510
Menus and Menu Commands ..................................................................................... 513
Message Dialogs ............................................................................................................ 518
Improving Error Handling in Here My Am! ....................................................................... 519
What We’ve Just Learned ............................................................................................... 525
Chapter 10 The Story of State, Part 1: App Data and Settings ............................................. 527
The Story of State........................................................................................................... 529
App Data Locations..................................................................................................... 532
App Data APIs (WinRT and WinJS) ................................................................................... 533
Settings Containers..................................................................................................... 534
State Versioning ......................................................................................................... 536
Folders, Files, and Streams.............................................................................................. 537
FileIO, PathIO, and WinJS Helpers (plus FileReader) ...................................................... 543
Encryption and Compression....................................................................................... 544

9
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Q&A on Files, Streams, Buffers, and Blobs.................................................................... 544
Using App Data APIs for State Management..................................................................... 552
Transient Session State ............................................................................................... 552
Local and Temporary State.......................................................................................... 553
IndexedDB, SQLite, and Other Database Options .......................................................... 555
Roaming State ............................................................................................................ 556
Settings Pane and UI....................................................................................................... 559
Design Guidelines for Settings ..................................................................................... 561
Populating Commands ................................................................................................ 563
Implementing Commands: Links and Settings Flyouts ................................................... 566
Programmatically Invoking Settings Flyouts.................................................................. 568
Here My Am! Update ..................................................................................................... 570
What We’ve Just Learned ............................................................................................... 571
Chapter 11 The Story of State, Part 2: User Data, Files, and OneDrive ................................ 573
The Big Picture of User Data ........................................................................................... 574
Using the File Picker and Access Cache ............................................................................ 579
The File Picker UI ........................................................................................................ 580
The File Picker API ...................................................................................................... 585
Access Cache.............................................................................................................. 589
StorageFile Properties and Metadata .............................................................................. 592
Availability ................................................................................................................. 593
Thumbnails ................................................................................................................ 594
File Properties ............................................................................................................ 598
Media-Specific Properties ........................................................................................... 601
Folders and Folder Queries ............................................................................................. 607
KnownFolders and the StorageLibrary Object ............................................................... 609
Removable Storage .................................................................................................... 612
Simple Enumeration and Common Queries .................................................................. 613

10
Custom Queries.......................................................................................................... 618
Metadata Prefetching with Queries ............................................................................. 623
Creating Gallery Experiences........................................................................................... 625
File Activation and Association ........................................................................................ 627
What We’ve Just Learned ............................................................................................... 632
Chapter 12 Input and Sensors ........................................................................................... 634
Touch, Mouse, and Stylus Input ...................................................................................... 635
The Touch Language and Mouse/Keyboard Equivalents ................................................ 636
What Input Capabilities Are Present? .......................................................................... 643
Unified Pointer Events ................................................................................................ 645
Gesture Events ........................................................................................................... 649
The Gesture Recognizer .............................................................................................. 658
Keyboard Input and the Soft Keyboard ............................................................................ 659
Soft Keyboard Appearance and Configuration .............................................................. 660
Adjusting Layout for the Soft Keyboard ........................................................................ 663
Standard Keystrokes ................................................................................................... 666
Inking ............................................................................................................................ 667
Geolocation ................................................................................................................... 669
Geofencing ................................................................................................................ 673
Sensors.......................................................................................................................... 676
What We’ve Just Learned ............................................................................................... 680
Chapter 13 Media............................................................................................................. 681
Creating Media Elements ................................................................................................ 682
Graphics Elements: Img, Svg, and Canvas (and a Little CSS) ............................................... 684
Additional Characteristics of Graphics Elements ........................................................... 688
Some Tips and Tricks .................................................................................................. 689
Rendering PDFs .......................................................................................................... 694
Video Playback and Deferred Loading.............................................................................. 699

11
Disabling Screen Savers and the Lock Screen During Playback ....................................... 703
Video Element Extension APIs ..................................................................................... 703
Applying a Video Effect ............................................................................................... 705
Browsing Media Servers.............................................................................................. 706
Audio Playback and Mixing ............................................................................................. 706
Audio Element Extension APIs ..................................................................................... 708
Playback Manager and Background Audio .................................................................... 708
The Media Transport Control UI .................................................................................. 714
Playing Sequential Audio ............................................................................................. 717
Playlists ......................................................................................................................... 719
Text to Speech ............................................................................................................... 723
Loading and Manipulating Media .................................................................................... 725
Image Manipulation and Encoding............................................................................... 726
Manipulating Audio and Video .................................................................................... 732
Handling Custom Audio and Video Formats ................................................................. 735
Media Capture ............................................................................................................... 742
Flexible Capture with the MediaCapture Object ........................................................... 744
Selecting a Media Capture Device................................................................................ 748
Streaming Media and Play To .......................................................................................... 751
Streaming from a Server and Digital Rights Management.............................................. 751
Streaming from App to Network.................................................................................. 753
Play To ....................................................................................................................... 754
What We Have Learned .................................................................................................. 757
Chapter 14 Purposeful Animations.................................................................................... 759
Systemwide Enabling and Disabling of Animatio ns ........................................................... 761
The WinJS Animations Library ......................................................................................... 762
Animations in Action .................................................................................................. 765
CSS Animations and Transitions ...................................................................................... 769

12
Designing Animations in Blend for Visual Studio ........................................................... 775
The HTML Independent Animations Sample ................................................................. 777
Rolling Your Own: Tips and Tricks .................................................................................... 779
What We’ve Just Learned ............................................................................................... 785
Chapter 15 Contracts ........................................................................................................ 786
Share ............................................................................................................................. 788
Share Source Apps...................................................................................................... 793
Share Target Apps ...................................................................................................... 805
The Clipboard............................................................................................................. 816
Launching Apps with URI Scheme Associations ................................................................ 818
Search ........................................................................................................................... 823
The Search Charm UI .................................................................................................. 825
The WinJS.UI.SearchBox Control.................................................................................. 829
Providing Query Suggestions ....................................................................................... 831
Providing Result Suggestions ....................................................................................... 835
SearchBox Styling ....................................................................................................... 837
Indexing and Searching Content .................................................................................. 840
The Search Contract ................................................................................................... 849
Contacts ........................................................................................................................ 850
Contact Cards............................................................................................................. 850
Using the Contact Picker ............................................................................................. 856
Appointments ................................................................................................................ 860
What We’ve Just Learned ............................................................................................... 864
Chapter 16 Alive with Activity: Tiles, Notifications, the Lock Screen, and
Background Tasks.............................................................................................................. 865
Alive with Activity: A Visual Tour ..................................................................................... 866
The Four Sources of Updates and Notifications ................................................................ 875
Tiles, Secondary Tiles, and Badges ................................................................................... 878

13
Secondary Tiles .......................................................................................................... 880
Basic Tile Updates ...................................................................................................... 887
Cycling, Scheduled, and Expiring Updates .................................................................... 900
Badge Updates ........................................................................................................... 902
Periodic Updates ............................................................................................................ 904
Creating an Update Service ......................................................................................... 907
Debugging a Service Using the Localhost...................................................................... 911
Windows Azure and Azure Mobile Services .................................................................. 912
Toast Notifications ......................................................................................................... 917
Creating Basic Toasts .................................................................................................. 919
Butter and Jam: Options for Your Toast ....................................................................... 921
Tea Time: Scheduled Toasts and Alarms....................................................................... 923
Toast Events and Activation ........................................................................................ 926
Push Notifications and the Windows Push Notification Service ......................................... 927
Requesting and Caching a Channel URI (App) ............................................................... 929
Managing Channel URIs (Service) ................................................................................ 931
Sending Updates and Notifications (Service) ................................................................ 932
Raw Notifications (Service).......................................................................................... 933
Receiving Notifications (App) ...................................................................................... 934
Debugging Tips ........................................................................................................... 935
Tools and Providers for Push Notifications ................................................................... 935
Background Tasks and Lock Screen Apps.......................................................................... 937
Background Tasks in the Manifest ............................................................................... 938
Building and Registering Background Tasks .................................................................. 939
Conditions ................................................................................................................. 941
Tasks for Maintenance Triggers ................................................................................... 942
Tasks for System Triggers (Non-Lock Screen) ................................................................ 944
Lock Screen–Dependent Tasks and Triggers ................................................................. 945

14
Debugging Background Tasks ...................................................................................... 949
What We’ve Just Learned (Whew!) ................................................................................. 950
Chapter 17 Devices and Printing ....................................................................................... 952
Declaring Device Access.................................................................................................. 956
Enumerating and Watching Devices ................................................................................ 957
Scenario API Devices ...................................................................................................... 962
Image Scanners .......................................................................................................... 962
Barcode and Magnetic Stripe Readers (Point-of-Service Devices) .................................. 967
Smartcards................................................................................................................. 970
Fingerprint (Biometric) Readers................................................................................... 971
Bluetooth Call Control ................................................................................................ 972
Printing Made Easy......................................................................................................... 973
The Printing User Experience ...................................................................................... 974
Print Document Sources ............................................................................................. 977
Providing Print Content and Configuring Options.......................................................... 979
Protocol APIs: HID, USB, Bluetooth, and Wi-Fi Direct ........................................................ 981
Human Interface Devices (HID).................................................................................... 983
Custom USB Devices ................................................................................................... 990
Bluetooth (RFCOMM) ................................................................................................. 992
Bluetooth Smart (LE/GATT) ......................................................................................... 996
Wi-Fi Direct ................................................................................................................ 999
Near Field Communication and the Proximity API............................................................1000
Finding Your Peers (No Pressure!) ..............................................................................1002
Sending One-Shot Payloads: Tap to Share ...................................................................1007
What We’ve Just Learned ..............................................................................................1009
Chapter 18 WinRT Components: An Introduction .............................................................1010
Choosing a Mixed Language Approach (and Web Workers)..............................................1012
Quickstarts: Creating and Debugging Components ..........................................................1014

15
Quickstart #1: Creating a Component in C# .................................................................1015
Simultaneously Debugging Script and Managed/Native Code .......................................1020
Quickstart #2: Creating a Component in C++ ...............................................................1021
Comparing the Results ...............................................................................................1023
Key Concepts for WinRT Components.............................................................................1026
Implementing Asynchronous Methods .......................................................................1028
Projections into JavaScript .........................................................................................1042
Scenarios for WinRT Components ..................................................................................1044
Higher Performance (Perhaps) ...................................................................................1044
Access to Additional APIs ...........................................................................................1047
Obfuscating Code and Protecting Intellectual Property ................................................1051
Concurrency..............................................................................................................1052
Library Components ..................................................................................................1053
What We’ve Just Learned ..............................................................................................1056
Chapter 19 Apps for Everyone, Part 1: Accessibility and World-Readiness .........................1058
Accessibility ..................................................................................................................1059
Screen Readers and Aria Attributes ............................................................................1063
Handling Contrast Variations ......................................................................................1068
World Readiness and Localization ..................................................................................1075
Globalization .............................................................................................................1077
Preparing for Localization ..........................................................................................1087
Creating Localized Resources: The Multilingual App Toolkit ..........................................1101
Localization Wrap-Up ................................................................................................1108
What We’ve Just Learned ..............................................................................................1109
Chapter 20 Apps for Everyone, Part 2: The Windows Store .............................................1110
Your App, Your Business ................................................................................................1111
Planning: Can the App Be a Windows Store App? ........................................................1113
Planning for Monetization (or Not) .............................................................................1114

16
Growing Your Customer Base and Other Value Exchanges ...........................................1125
Measuring and Experimenting with Revenue Performance ..........................................1126
The Windows Store APIs ................................................................................................1127
The CurrentAppSimulator Object................................................................................1130
Trial Versions and App Purchase.................................................................................1133
Listing and Purchasing In-App Products.......................................................................1137
Handling Large Catalogs .............................................................................................1145
Receipts ....................................................................................................................1146
Instrumenting Your App for Telemetry and Analytics .......................................................1148
Releasing Your App to the World....................................................................................1155
Promotional Screenshots, Store Graphics, and Text Copy.............................................1156
Testing and Pre-Certification Tools .............................................................................1158
Creating the App Package ..........................................................................................1159
Onboarding and Working through Rejection ...............................................................1163
App Updates .................................................................................................................1166
Getting Known: Marketing, Discoverability, and the Web ................................................1168
Connecting Your Website and Web-Mapped Search Results ........................................1170
Face It: You’re Running a Business! ................................................................................1171
Look for Opportunities...............................................................................................1172
Invest in Your Business ..............................................................................................1172
Fear Not the Marketing .............................................................................................1172
Support Your Customers ............................................................................................1173
Plan for the Future ....................................................................................................1173
Selling Your App When It’s Not Running......................................................................1174
You’re Not Alone .......................................................................................................1175
Final Thoughts: Qualities of a Rock Star App ...................................................................1175
What We’ve Just Learned ..............................................................................................1176
Appendix A Demystifying Promises..................................................................................1178

17
What Is a Promise, Exactly? The Promise Relationships ...................................................1178
The Promise Construct (Core Relationship) .....................................................................1181
Example #1: An Empty Promise! .................................................................................1183
Example #2: An Empty Async Promise.........................................................................1185
Example #3: Retrieving Data from a URI ......................................................................1186
Benefits of Promises ......................................................................................................1187
The Full Promise Construct ............................................................................................1188
Nesting Promises.......................................................................................................1192
Chaining Promises .....................................................................................................1195
Promises in WinJS (Thank You, Microsoft!) .....................................................................1200
The WinJS.Promise Class ............................................................................................1201
Originating Errors with WinJS.Promise.WrapError .......................................................1203
Some Interesting Promise Code .....................................................................................1204
Delivering a Value in the Future: WinJS.Promise.timeout .............................................1204
Internals of WinJS.Promise.timeout ............................................................................1205
Parallel Requests to a List of URIs ...............................................................................1205
Parallel Promises with Sequential Results ...................................................................1206
Constructing a Sequential Promise Chain from an Array...............................................1208
PageControlNavigator._navigating (Page Control Rendering) .......................................1208
Bonus: Deconstructing the ListView Batching Renderer ...................................................1210
Appendix B WinJS Extras .................................................................................................1214
Exploring WinJS.Class Patterns .......................................................................................1214
WinJS.Class.define .....................................................................................................1214
WinJS.Class.derive .....................................................................................................1217
Mixins.......................................................................................................................1218
Obscure WinJS Features ................................................................................................1219
Wrappers for Common DOM Operations ....................................................................1219
WinJS.Utilities.data, convertToPixels, and Other Positional Methods ............................1221

18
WinJS.Utilities.empty, eventWithinElement, and getMember ......................................1222
WinJS.UI.scopedSelect and getItemsFromRanges ........................................................1222
Extended Splash Screens ...............................................................................................1223
Adjustments for View Sizes ........................................................................................1229
Custom Layouts for the ListView Control ........................................................................1231
Minimal Vertical Layout .............................................................................................1233
Minimal Horizontal Layout .........................................................................................1235
Two-Dimensional and Nonlinear Layouts ....................................................................1239
Virtualization ............................................................................................................1241
Grouping...................................................................................................................1243
The Other Stuff .........................................................................................................1244
Appendix C Additional Networking Topics........................................................................1249
XMLHttpRequest and WinJS.xhr .....................................................................................1249
Tips and Tricks for WinJS.xhr ......................................................................................1250
Breaking Up Large Files (Background Transfer API) ..........................................................1251
Multipart Uploads (Background Transfer API) .................................................................1252
Notes on Encryption, Decryption, Data Protection, and Certificates .................................1255
Syndication: RSS, AtomPub, and XML APIs in WinRT ........................................................1255
Reading RSS Feeds .....................................................................................................1256
Using AtomPub .........................................................................................................1259
Sockets .........................................................................................................................1260
Datagram Sockets......................................................................................................1261
Stream Sockets..........................................................................................................1265
Web Sockets: MessageWebSocket and StreamWebSocket...........................................1268
The ControlChannelTrigger Background Task ..............................................................1273
The Credential Picker UI ................................................................................................1273
Other Networking SDK Samples .....................................................................................1277
Appendix D Provider-Side Contracts ................................................................................1279

19
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
File Picker Providers ......................................................................................................1279
Manifest Declarations................................................................................................1280
Activation of a File Picker Provider..............................................................................1281
Cached File Updater ......................................................................................................1288
Updating a Local File: UI.............................................................................................1291
Updating a Remote File: UI ........................................................................................1292
Update Events ...........................................................................................................1294
Contact Cards Action Providers ......................................................................................1297
Contact Picker Providers ................................................................................................1300
Appointment Providers..................................................................................................1303
About the Author .............................................................................................................1309

20
Introduction
Welcome, my friends, to Windows 8.1! On behalf of the thousands of designers, program managers,
developers, test engineers, and writers who have brought the product to life, I'm del ighted to welcome
you into a world of Windows Reimagined.

This theme is no mere sentimental marketing ploy, intended to bestow an aura of newness to
something that is essentially unchanged, like those household products that make a big splash on the
idea of "New and Improved Packaging!" No, starting with version 8, Microsoft Windows truly has been
reborn—after more than a quarter-century, something genuinely new has emerged.

I suspect—indeed expect—that you're already somewhat familiar with the reimagined user
experience of Windows 8 and Windows 8.1. You're probably reading this book, in fact, because you
know that the ability of Windows to reach across desktop, laptop, and tablet devices, along with the
global reach of the Windows Store, will provide you with many business opportunities, whether you're
in business, as I like to say, for fame, fortune, fun, or philanthropy.

We'll certainly see many facets of this new user experience throughout the course of this book. Our
primary focus, however, will be on the reimagined developer experience.

I don't say this lightly. When I first began giving presentations within Microsoft about building
Windows Store apps, I liked to show a slide of what the world was like in the year 1985. It was the time
of Ronald Reagan, Margaret Thatcher, and Cold War tensions. It was the time of VCRs and the
discovery of AIDS. It was when Back to the Future was first released, Michael Jackson topped the charts
with Thriller, and Steve Jobs was kicked out of Apple. And it was when software developers got their
first taste of the original Windows API and the programming model for desktop applications.

The longevity of that programming model has been impressive. It's been in place for nearly three
decades now and has grown to become the heart of the largest business ecosystem on the planet. The
API itself, known today as Win32, has also grown to become the largest on the planet! What started
out on the order of about 300 callable methods has expanded three orders of magnitude, well beyond
the point that any one individual could even hope to understand a fraction of it. I'd certainly given up
such futile efforts myself.

So when I bumped into my old friend Kyle Marsh in the fall of 2009, just after Windows 7 had been
released, and heard from him that Microsoft was planning to reinvigorate native app development for
Windows 8, my ears were keen to listen. In the months that followed I learned that Microsoft was
introducing a completely new API called the Windows Runtime (or WinRT). This wasn't mea nt to
replace Win32, mind you; desktop applications would still be supported. No, this was a programming
model built from the ground up for a new breed of touch-centric, immersive apps that could compete
with those emerging on various mobile platforms. It would be designed from the app developer's point
of view, rather than the system's, so that key features would take only a few lines of code to implement

21
rather than hundreds or thousands. It would also enable direct native app development in multiple
programming languages. This meant that new operating system capabilities would surface to those
developers without having to wait for an update to some intermediate framework. It also meant that
developers who had experience in any one of those language choices would find a natural home when
writing apps for Windows 8 and Windows 8.1.

This was very exciting news to me because the last time that Microsoft did anything significant to
the Windows programming model was in the early 1990s with a technology called the Component
Object Model (COM), which is exactly what allowed the Win32 API to explode as it did. Ironically, it was
my role at that time to introduce COM to the developer community, which I did through two editions
of Inside OLE (Microsoft Press, 1993 and 1995) and seemingly endless travel to speak at conferences
and visit partner companies. History, indeed, does tend to repeat itself, for here I am again, with
another second edition!

In December 2010, I was part of the small team who set out to write the very first Windows Store
apps using what parts of the new WinRT API had become available. Notepad was the text editor of
choice, we built and ran apps on the command line by using abstruse Powershell scripts that required
us to manually type out ungodly hash strings, we had no documentation other than oft-incomplete
functional specifications, and we basically had no debugger to speak of other than the tried and true
window.alert and document.writeln. Indeed, we generally worked out as much HTML, CSS, and
JavaScript as we could inside a browser with F12 debugging tools, adding WinRT-specific code only at
the end because browsers couldn't resolve those APIs. You can imagine how we celebrated when we
got anything to work at all!

Fortunately, it wasn't long before tools like Visual Studio Express and Blend for Visual Studio became
available. By the spring of 2011, when I was giving many training sessions to people inside Microsoft on
building apps for Windows 8, the process was becoming far more enjoyable and exc eedingly more
productive. Indeed, while it took us four to six weeks in late 2010 to get even Hello World to show up
on the screen, by the fall of 2011 we were working with partner companies who pulled together
complete Store-ready apps in roughly the same amount of time.

As we've seen—thankfully fulfilling our expectations—it's possible to build a great app in a matter
of weeks. I'm hoping that this ebook, along with the extensive resources on http://dev.windows.com,
will help you to accomplish exactly that and to reimagine your own designs.

Work on this second edition began almost as soon as the first edition was released. (I’d make a quip
about the ink not being dry, but that analogy doesn’t work for an ebook!) When Windows 8 became
generally available in the fall of 2012, work on Windows 8.1 was already well underway: the
engineering team had a long list of improvements they wanted to make along with features that they
weren’t able to complete for Windows 8. And in the very short span of one year, Windows 8.1 was itself
ready to ship.

At first I thought writing this second edition would be primarily a matter of making small updates to
each chapter and perhaps adding some pages here and there on a handful of new features. But as I got
deeper into the updated platform, I was amazed at just how much the API surface area had expanded!
22
Windows 8.1 introduces a number of additional controls, an HTML webview element, a stronger HTTP
API, content indexing, deeper OneDrive support, better media capabilities, more tiles sizes (small and
large), more flexible secondary tile, access to many kinds of peripheral devices, and more options for
working with the Windows Store, like consumable in-app purchases. And clearly, this is a very short list
of distinct Windows 8.1 features that doesn’t include the many smaller changes to the API. (A fuller list
can be found on Windows 8.1: New APIs and features for developers).

Furthermore, even as I was wrapping up the first edition of this book, I already had a long list of
topics I wanted to explore in more depth. I wrote a number of those pieces for my blog, with the
intention of including them in this second edition. A prime example is Appendix A, “Demystifying
Promises.”

All in all, then, what was already a very comprehensive book in the first edition has become even
more so in the second! Fortunately, with this being an ebook, neither you nor I need feel guilty about
matters of deforestation. We can simply enjoy the process of learning about and writing Windows
Store Apps with HTML, CSS, and JavaScript.

And what about Windows Phone 8.1? I’m glad you asked, because much of this book is completely
applicable to that platform. Yes, that’s right: Windows Phone 8.1 supports writing apps in HTML, CSS,
and JavaScript, just like Windows 8.1, meaning that you have the same flexibility of implementation
languages on both. However, the decision to support JavaScript apps on Windows Phone 8.1 came very
late in the production of this book, so I’m only able to make a few notes here and there for Phone -
specific concerns. I encourage you to follow the Building Apps for Windows blog, where we’ll be
posting more about the increasingly unified experience of Windows and Windows Phone.

Who This Book Is For

This book is about writing Windows Store apps using HTML, CSS, and JavaScript. Our primary focus will
be on applying these web technologies within the Windows platform, where there are unique
considerations, and not on exploring the details of those web technologies themselves. For the most
part, I'm assuming that you're already at least somewhat conversant with these standards. We will cover
some of the more salient areas like the CSS grid, which is central to app layout, but otherwise I trust
that you're capable of finding appropriate references for most everything else. For Java Script
specifically, I can recommend Rey Bango’s Required JavaScript Reading list, though I hope you’ll spend
more time reading this book than others!

I'm also assuming that your interest in Windows has at least two basic motivations. One, you
probably want to come up to speed as quickly as you can, perhaps to carve out a foothold in the
Windows Store sooner rather than later. Toward that end, Chapter 2, “Quickstart,” gives you an
immediate experience with the tools, APIs, and some core aspects of app development and the
platform. On the other hand, you probably also want to make the best app you can, one that performs
really well and that takes advantage of the full extent of the platform. Toward this end, I've also

23
endeavored to make this book comprehensive, helping you at least be aware of what's possible and
where optimizations can be made.

Let me make it clear, though, that my focus in this book is the Windows pla tform. I won’t talk much
about third-party libraries, architectural considerations for app design, and development strategies and
best practices. Some of these will come up from time to time, but mostly in passing.

Nevertheless, many insights have come from working directly with real-world developers on their
real-world apps. As part of the Windows Ecosystem team, myself and my teammates have been on the
front lines bringing those first apps to the Windows Store. This has involved writing bits of code for
those apps and investigating bugs, along with conducting design, code, and performance reviews with
members of the Windows engineering team. As such, one of my goals with this book is to make that
deep understanding available to many more developers, including you!

What You'll Need (Can You Say “Samples”?)

To work through this book, you should have Windows 8.1 (or a later update) installed on your
development machine, along with the Windows SDK and tools. All the tools, along with a number of
other resources, are listed on Developer Downloads for Windows Store Apps. You’ll specifically need
Microsoft Visual Studio Express 2013 for Windows. (Note that for all the screenshots in this book, I
switched Visual Studio from its default “dark” color theme to the “light” theme, as the latter works
better against a white page.)

We’ll also acquire other tools along the way as we need them in this ebook, specifically to run some
of the examples in the companion content. Here’s the short list:

 Live SDK (for Chapter 4)

 Bing Maps SDK for Windows Store Apps (for Chapters 10 and beyond)

 Visual Studio Express 2013 for Web (for Chapter 16)

 Multilingual App Toolkit (for Chapter 19)

Also be sure to visit the Windows 8.1 Samples Pack page and download at least the JavaScript
samples. We'll be drawing from many—if not most—of these samples in the chapters ahead, pulling in
bits of their source code to illustrate how many different tasks are accomplished.

One of my secondary goals in this book, in fact, is to help you understand where and when to use
the tremendous resources in what is clearly the best set of samples I’ve ever seen for any release of
Windows. You’ll often be able to find a piece of code in one of the samples that does exactly what you
need in your app or that is easily modified to suit your purpose. For this reason I’ve made it a point to
personally look through every one of the JavaScript samples, understand what they demonstrate, and
then refer to them in their proper context. This, I hope, will save you the trouble of having to do that
level of research yourself and thus make you more productive in your development efforts.

24
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of It is to laugh
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: It is to laugh
A book of games and stunts

Author: Edna Geister

Release date: June 12, 2024 [eBook #73814]

Language: English

Original publication: New York: The Womans Press, 1922

Credits: Susan E., David E. Brown, and the Online Distributed


Proofreading Team at https://www.pgdp.net (This file was
produced from images generously made available by The
Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK IT IS TO LAUGH


***
IT IS TO LAUGH
EDNA GEISTER
IT IS TO LAUGH

A Book of Games and Stunts

BY

EDNA GEISTER
ADVISOR AND DIRECTOR OF RECREATION
Author of “Ice-Breakers,” “The Ice-Breaker
Herself,” etc.

THE WOMANS PRESS


600 LEXINGTON AVENUE
NEW YORK CITY
COPYRIGHT, 1922,
BY GEORGE H. DORAN COMPANY

PRINTED IN THE UNITED STATES OF AMERICA


FOREWORD
Amos R. Wells said, “Recreation is re-creation, or a re-fashioning of
the soul in the image of God wherein it was created.”
Real recreation is just that. All through the war every effort was
made to fill the leisure time of soldiers and sailors with recreation
rather than dissipation, the kind of recreation that made leisure time
an asset rather than a liability. Since the war, with the great impetus
it gave the movement, recreation work in churches, in communities,
in schools, and in almost every kind of social service work, has been
put on the same constructive basis, and it is being looked upon not
merely as a side issue or as “entertainment,” but rather is respected
as one of the most vital forces for a re-fashioning of souls in the
image of God wherein they were created.
“It Is to Laugh” was written for the purpose of answering requests
of re-creators everywhere, who are in constant need of new material
in their recreative work. The games and stunts described do
“entertain,” but behind the inevitable resultant hearty, healthy
laughter is the re-creation that gives one a new lease on life, that
makes one sure that life is good to live, and that helps one to live
life joyfully and abundantly. If “It Is to Laugh” may help in
accomplishing this, it will have served its purpose.
Many of the ideas for these games are not original but have come
from co-workers in the Y.W.C.A., from members of training classes at
the University of Chicago, and from delegates to recreational
conferences all over the country, and I wish in this way to express
my sincere appreciation of their coöperation, and to thank them for
their invaluable assistance in promoting the gospel of re-creation.
Edna Geister.
CONTENTS
CHAPTER PAGE
I Mixers 11
II Group Games 31
Games for Small Groups 31
Games for Large Groups 47
Games for Either Large or Small Groups 53
III Races 63
IV Trick Games 77
V Picnics! 105
Races 105
Picnic Games 114
Tag Games 122
VI Partners, Refreshments and Dinner Table Amusement 127
To Find Partners 127
Refreshments 131
Dinner Table Amusement 135
Index 139
IT IS TO LAUGH
IT IS TO LAUGH
CHAPTER I.
MIXERS.
The time set for the party is 8 o’clock, but by 8:15 there are about
twenty arrivals instead of the one hundred expected, and they are
standing about stiff and formal, politely ready to do anything the
program committee asks, so that they may go home feeling virtuous
in having done their duty, but dangerously near the attitude of mind
that will tempt them, the next time a party is announced, to follow
Rebecca’s example of “letting duty go to smash!”—all this unless
something happens, and that, right away!
At one time we might have met this situation by putting on a simple
little game to keep those twenty guests there until the rest of the
crowd came, but it was hardly necessary to make that mistake twice
to realize the futility of those tactics. Any game is a flat failure that
does not call forth a real social spirit and a real play spirit, but that
spirit does not just happen. It must be definitely worked for and
created through socializing games, while just “fill-ins till the crowd
comes” can utterly ruin the prospects for creating that spirit that
makes recreation, re-creation. For example, “The Gathering of the
Nuts” invariably brings down the house when it is given its right
place in an evening’s program, but presented at the first of the
evening when guests are straggling in, one by one, and there is as
yet no relaxation and group spirit, it would inevitably be a dismal
failure.
Therefore, instead of putting on some casual stunt just to keep
guests from leaving, or just to fill in time till the other guests arrive,
we have found it far more advisable to have informal group singing
around the piano for the first ten or fifteen minutes, and then begin
the evening proper, even if there are only some twenty or thirty
guests present, with a game that is very definitely a mixer, the one
purpose of which is not so much to entertain as to “socialize,” in
almost every case the mixer being some big general movement in
which there is a lot of fun and nonsense just like there is in the
games that follow later, but with this important difference—that
every person present is in this first event in some game that pries
him loose from the corner he chose on arrival as his abiding place
for the evening; a game that gives him an incentive other than a
sense of duty for shaking hands vigorously with his fellow guests; a
game that makes him feel this party as his own personal
responsibility; in short, a game which shows him that he alone
counts as nothing, but that he, together with every other guest
present, counts for everything.
“Spots” is a splendid example of a mixer that will so thoroughly mix
up a group of guests that they never will succeed in getting sorted
out again into their original classifications:

Spots.

The leader has chosen seven or eight places in the room as the
“spots,” and has a list of them at hand. All of them have been
carefully chosen, and she alone knows where they are. Guests are
standing about informally when the announcement is made that in
about two minutes a whistle will be blown, at which time the couple
standing on a certain spot will receive a handsome reward. At the
same time however, anyone seen standing alone will be fined. A
partner is essential to winning a prize or to make one immune to a
fine. Even if a person is standing on the lucky spot at the time the
whistle blows, if he is alone he must pay the fine, one cent.
To promote a general moving around, and to add to the spirit of the
game, lively march music is played all the time the guests are
supposed to be moving, although no definite line of march is
encouraged.
Two additional rules insure the success of “Spots.” After the first spot
has been found and the prize awarded, the game goes on and
another spot in some other part of the room is the lucky one. But no
person can have the same partner he had while the first spot was
being sought. The same fine of one cent is imposed on any two
people who seem to think they have an option on each other.
The same thing is true of location. Anyone found standing in the
same place he occupied during the first round, is fined, with much
publicity.
The game goes on until the seven or eight spots have been located
and the “handsome rewards” given out. All the spots have been
chosen with the purpose in mind to get guests absolutely relaxed,
thoroughly mixed and free from any stiff formality. That is why a
definite line of march would be fatal. Instead, let the first spot be
behind the piano; the next on the platform; the next leaning up
against a pillar, etc., etc.
To sum up, the rules are as follows:
1. Everyone must have a partner.
2. Partners must be changed for every round.
3. No one is allowed to stand in the same place for two
successive rounds.
Four or five so-called “policemen” assist the leader in detecting
violators of these rules and much publicity is given the fining of the
offenders.
The success of the game depends entirely on the ability of the
leader to make her guests feel the great desirability of finding one of
those elusive lucky spots. No one knows where they are. All they
know is that it behooves them to move, to get a partner, to keep
moving, and to keep on getting partners!

Shake Hands!
Now shake hands, everybody, whether you know each other or not.
Let’s be sociable. Shake hands!
You have heard that before? And immediately you started in to
shake hands with friend and foe and foreigner? Hardly. No real
incentive is offered there for shaking hands with people you have
never seen before or people you see every day of your life, no
incentive other than a sense of duty, and a sense of duty is not what
one would call particularly successful in promoting the real spirit of
sociability which makes a social evening, or the lack of which, breaks
it.
It does seem so inane to ask people to shake hands with each other,
and yet, if a leader can once get a group to laugh heartily as a
group, if she can give them a sufficiently interesting incentive for
grasping the hand of a neighbor with real vim and enthusiasm even
if it is for the purpose of saving themselves from dire penalties!—
they are won and one for the rest of the evening! But just telling
guests to be sociable and to shake hands will not do it.
It is necessary to create a setting and furnish an incentive, and
instead of playing on the guest’s sense of duty, to play on their
sense of humor.
They are invited to shake hands with each other, but are warned
that the only handshake allowed is a vigorous side-to-side swing,
and are further cautioned that it is fully as great a crime to be seen
using the ordinary handshake as it is to be caught not shaking hands
at all; that several “policemen” in the crowd will see to it that these
laws are enforced; and finally, that any violator of these laws will
certainly repent at leisure and in public.
Some ten policemen are chosen, their number of course depending
on the size of the group. At a signal the handshaking begins. The
policemen are more than vigilant in discharging their duties, and
several culprits who were caught standing about “just looking on”,
and some of the ladies who shook hands in a manner not vigorous
enough to suit the policemen, are escorted to the platform, there to
sit in the public eye till the leader’s whistle stops the frantic, vigorous
handshaking, which should be given about five minutes time.
The next game of the evening might well be a hoax, with these
culprits used as the victims.

Southpaws.

This is very much like “Shake Hands” in its object and in its rulings.
The difference lies in the kind of handshaking permitted. The rule is
that the left hand only is to be used in shaking hands. At irregular
intervals a whistle is blown and anyone caught not actually shaking
the left hand of some other guest at that particular moment is
punished in the same way in which culprits in the game “Shake
Hands!” are taken care of.
Of course there are policemen, whose one object in life is to catch
someone napping, or a bit negligent in the evidence he gives of a
very active and left-handed spirit of sociability!

My Virtues!

“Mrs. Kalen, let me present Mr. Black.”


“Mrs. Frummly, have you met Mr. Stewart?” and so on, world without
end! This, at a large gathering, the one object of which is to get
members of a community to really know each other! And at that, if it
were possible for the hosts to see that every guest was introduced
to every other guest, would even that do a great deal toward
helping members of a community to know each other, other than to
have spoken one another’s names? Put a human and socializing
element in those introductions, and they will know more about each
other than just names, and what’s more, they’ll like each other!
The men form one line and the women another, all of them facing
the front of the room. When the music starts the men march down
one side of the room to the back, and the women down the other.
They meet and take partners as they come in the line of march,
coming up the center of the room with their partners. When they
reach the front, all couples march to the right, forming a large
double circle around the room. The leader then makes an
announcement to the effect that in order to make sure that
everyone knows all the virtues of his fellow guests, splendid
opportunities will be given for the flaunting of those virtues. Partners
face each other, shake hands, introduce themselves, and then, with
hands on hips, begin telling all the nice things they know about
themselves, real or imaginary.
The only difficulty is that they have to do it at the same time, which
makes it hard occasionally for one’s partner to hear about all the
lovely qualities one possesses or aspires to possess! They are given
just a minute for this when another whistle is blown which is a signal
for the men only to walk forward until a second whistle stops them.
The woman nearest them is their next partner. They shake hands
with these new partners, and one’s virtues again become the topic
of importance.
This continues for not more than five minutes. That will be enough!
Is it necessary to say that next day, when Mrs. Kalen meets Mr. Black
at the bank, that she doesn’t wonder, “Have I ever met that man
before?” Rather, it is, “Why, good morning, Mr. Black! Are you still
the perfect man you thought yourself last night?”

Prohibited Words.

We have used over and over again the game in which certain words
are prohibited, but we used it as a game that had a definite time
limit. It has proved far more effective to put a ban on those words
for the entire evening. Perhaps these words are “Yes” and “No,” or
“You” and “I.” All through the evening those words are forbidden.
Anyone heard using them pays a fine to the one who caught him
making that social error.
At each offense a fine of one candy or one bean or one of whatever
thing is used as the means of exchange, is exacted from the one
who made the error. This means of exchange may depend on the
season. On Valentine Day it might be little candy hearts in small
bags; at Easter, little candy eggs; or at Christmas, tiny bright red
candies. However, just plain beans may be used, a small bag being
provided in which to carry them.
Perhaps you think that if candy is used, your guests may eat their
means of exchange before the evening is half over. Warn them
against it. Then, at the end of the evening, just before the last
game, ask for a count of their “money,” and as it happens, “To him
that hath shall be given.” The richest one is given additional riches in
the shape of a box of candy, with the assurance that he need not
open it till he gets home! The ten who made the most lapses and
consequently have the least money, and those who ate most of their
money, are obliged to give up any they still hold and to sit on the
platform as the infant class while their brighter and less greedy
brothers and sisters march past them, munching their candy!
It is easy enough to remember not to say “Yes” or “No” to anyone,
when that is the particular game of the moment, but to have to
remember not to use those words through all the nonsense of the
evening is a slightly different matter. Another very good phase of this
game as a mixer is that it gives a real incentive for people to talk to
each other, even if they have never seen one another before—all for
the sake of a bean!

Gossip.

A circle is formed, with from three to six people in the center, their
number to be determined by the size of the circle. Guests are
warned that it is the object of these people in the center to get out
of it, and that the only way they can do it is to get someone else in,
in their place; that their method of doing this is very effective, and
that it behooves every last one of them to learn the name and
occupation of his neighbor on either side, together with one juicy bit
of gossip concerning him.
At a signal from the leader, each one of the people in the center
turns around, snaps his fingers at some person who did not expect
it, and asks this victim to instantly give all the required information
about both of his neighbors. If he fails, into the center he goes,
changing places with the person who caught him napping.
The neighbor is supposed to offer the juicy bit of gossip himself, but
sometimes his imagination fails him, or his egotism overcomes him,
and it is up to the victim pointed at to use his own imagination.
Therefore it is not unusual to have the following information shouted
out by an excited victim who fears a place in the center: “My right-
hand neighbor’s name is The Minister; his occupation is ministering
and he has been in jail four times!”
All the others in the center have been asking for information at the
same time and after a minute or two the leader calls out, “Change
your neighbors!” and everyone is to find a new set of neighbors for
himself. A great deal of publicity and a place in the center is
promised anyone who does not get into a new neighborhood!
This game is played not more than five minutes, for with such an
incentive all guests will know each other intimately long before five
minutes are over!

It Pays to Advertise.

As each guest comes in the door he is given a slip of paper on which


is written a number. When all the guests have arrived the leader
asks all “tens” to congregate at the piano, while “threes” get
together in one corner, “fives” in another, etc., etc. As the different
groups assemble the leader goes rapidly from one group to another,
and reading from her list, assigns each group some advertisement
which they are to dramatize. A few impromptu properties such as a
shrunken sweater, candles, newspapers, and crackers, are available.
After the four or five minutes allowed for preparation, each group in
turn dramatizes the advertisement assigned it, and must continue
action until the audience guesses correctly what advertisement is
being represented. To avoid the situation which often develops when
such a contest is on, an announcement is made to the effect that
there is to be no guessing until the actors have completed their
stunt. Then if there is no correct guess, the dramatization must
begin again and continue until it is made so realistic that the
audience guesses what it is in self-defense, or else gives up in
dismay!
The following suggestions may be helpful:
1. Ivory Soap. “It Floats.” Members of the group go flitting about the
stage as though they were walking on air, waving their arms and in
general acting in ethereal fashion.
2. Eversharp. Riddles which have been prepared beforehand are put
to a class by the teacher. The class having been thoroughly drilled in
the answers, respond with a snap and a brilliancy that amazes the
audience!
3. Uneeda Biscuit. Let them pantomime exhaustion, plainly showing
by their actions that they are starved. A doctor rushes in, makes
them stick out their tongues, (which they do with artistic effect),
sing up the scale, blow up their cheeks, holding them that way
indefinitely, close one eye, etc. In short, he carefully diagnoses the
case, after which he swells up with pride at having found what the
trouble was. He dashes to his bag, takes out a box of crackers, and
makes each patient eat one, whereupon they all hop around,
exhibiting marvelous life and enthusiasm, apparently cured for life.
4. Blue Jay Corn Plaster. The men of the group take the part of the
blue jays, blue because of aching corns which they indicate by a
mournful expression and painful hobbling around. The “jay” element
is taken care of by tousled hair and disheveled clothing. They give
evidence of considerable pain, which evidence grows louder and
louder until the women of the group come dashing in as nurses, with
handkerchiefs or pieces of white cloth bound about their heads.
They inquire in pantomime about the cause of such evident trouble
and having learned it, bind up the entire foot of the patient, thereby
making life again worth living for the “Blue Jays.”
5. Whistle. It speaks for itself.
6. Bon Ami. The men come running in with smudges on their faces,
followed in great haste by the ladies, who are very evidently trying
to catch them. Finally they succeed and holding their victims firmly
by the shoulders, with handkerchiefs as instruments of torture they
pantomime a vigorous face-scrubbing, polishing the face as they
would a window. When they have finished, they view the results
with much satisfaction, while their victims pantomime the discomfort
they undoubtedly feel.
7. Pears’ Soap. All the members of a group are “paired” off and
either wander about in pairs or busily wash each others’ faces,
always in pairs.
8. Colgate’s Toothpaste. “Lies flat on the brush.” A man appears,
throws a hairbrush on the floor and lies down “flat upon it.”
9. Wool Soap. A large lady whose arms are sticking through the
sleeves of a white sweater many sizes too small for her, looks
tragically at the result of her not having used Wool Soap, while the
rest of the group go into spasms of mirth at the picture she
presents.
10. Fiske Tires. “Time to Retire.” All the members of this group file
stumblingly across the stage, each one carrying a candle and
yawning, and looking so irresistibly sleepy that everyone in the
audience yawns just to look at them!
With some groups it will not be necessary to provide advertisements,
and it will be sufficient to announce that each group is to think of its
own and that a prize will be given to the most original stunt, but
with the average group it is very helpful to have either a list of
advertisements at hand, together with properties, or to be sure that
in each group there is someone who can be depended upon to take
the initiative for that group in putting on a really effective stunt. I
speak from experience!

Limited Conversation.

Perhaps you are responsible for the “socializing” of a very large


group, most of the guests being strangers to each other, and you
wish to break the ice and to get guests into the spirit that makes for
easy and truly social conversation.
To announce certain topics of conversation and ask that everyone
talk on just those topics with one’s neighbors in such a group as has
just been described, often has an effect that is more tongue-tieing
than socializing in its effect, and a human kink must be put into the
plan to make it really effective in getting your guests into the relaxed
and jovial spirit that does wonders with a group, however large or
“strange.”
A list of topics for conversation is made out as usual, but a ruling is
added that makes conversation on these topics far more difficult and
therefore far more interesting than just plain conversation which is
very evidently for the purpose of “mixing up” a strange group. That
ruling might be that every statement must be the very opposite of
what one really thinks about the question of the moment. For
example, the question may be, “Do you believe in Woman Suffrage?”
According to the ruling, no matter how thoroughly a man despises
the thought of Woman Suffrage, he is obliged to vehemently defend
it, and no matter how ardent a suffragette his immediate neighbor
may be, she is to scorn it with every breath.
After a minute or two the next topic is announced. It might be
“What do you like best?” and everyone is to pick upon the thing he
most dislikes and eulogize it to the best of his ability. That same
ruling applies to all the six or seven topics announced, and to say
the least, startling statements are the result, to say nothing of the
hilarity that is inevitable over a conversation with the Baptist
minister’s wife who vows that picking potato bugs is her favorite
pastime!
This group is a large one, so no effort is made to pair guests off with
partners but topics are announced, together with the ruling that
one’s immediate neighbors are one’s partners, and that guards will
patrol the room to see that no one talks on any subject but the one
announced, to see that everyone is talking, and that the limitation
imposed is very strictly observed. To make sure that they talk to
more than one person the guests are asked to change their
immediate neighborhoods between topics. The breaking of any of
these rules calls for a forfeit.
If one is entertaining a small group in a home, a progressive system
of partners is arranged, by which guests progress from one partner
to another. Each one is given a card on which a number is written,
ladies holding even numbers and men, odd. On the men’s cards in
addition, is written their conversation program, namely, the numbers
of the partners they are to have for the different topics of
conversation, and it is their business to hunt up each new partner as
the signal for the change is given. For example, Mr. Hunt is No. 5.
His program reads: 6, 8, 2, 12, 4, 10. That means that for the first
topic his partner is to be No. 6 and that when the game starts he is
to hunt her up and talk earnestly with her on the first topic. A bell is
rung after about two minutes and he must hunt up No. 8 and talk
with her about the second topic, and so he progresses from one
partner to another until he has talked with his last partner on the
last topic.
Another limitation which may be applied to conversation is that all
statements must contain one’s own initials. The question may be,
“What is your favorite sport?” Mr. Graham’s initials are S. M. G. so his
favorite sport is obliged to be, “Selling moldy groceries!”
Still another limitation maybe that all remarks be untruths. A further
limitation, and a painful one, but one which is particularly good for a
small crowd, is that all statements must be made in rhyme, no
matter how inevitably abominable the rhyming may be!
Topics may include any possible subject, from current events to
modes of dress. The following list is typical:
1. What is your favorite sport?
2. Do you believe in Protective Tariff?
3. Will bobbed hair stay with us?
4. Who is your favorite poet?
5. What is your occupation?
6. What do you like best to eat?
7. What would you like to be?
A period of two or three minutes is given for each conversation. The
whole affair should last not longer than from fifteen to twenty
minutes. You will find that that will be plenty long enough! Imagine
a period not longer than that for a conversation on the above topics,
carried on in rhyme!
The following are the answers given by the principal of the High
School at a church party in a Middle West town:
1. “To ride a big fat elephant has always been my favorite
stunt.”
2. “I’d hate to have you think I’m rude, but what is it, a
breakfast food?”
3. “I really don’t profess to know, but I hope to goodness
it will go.”
4. “Walt Mason is my favorite poet, he’s got the goods and
he can show it.”
5. “I am a banker brave and bold; I grab the cash and
keep it cold.”
6. “Most everything’s what I like best; to get enough,
there lies the test.”
7. “I’d like to be a billionaire and make the whole world
stand and stare.”

Holidays.

The question as to their birthmonths is asked of the guests, and


they are grouped together accordingly, the Januarys over behind the
piano, the Junes at the rear entrance, etc., etc. Each group is then
asked to dramatize a holiday of the month it represents. No
properties have been made available as this is to be distinctly an
impromptu affair. They are all given about ten minutes for
preparation, and then they are called on, one by one, to do their
stunts. They are not called by name however, but by “location.” For
example, the first group called on might be the one in the bay
window, and the next, the one in the dining room.
When each group has finished its stunt, and only then, the audience
is to guess what holiday they represent, and if the guesses are
incorrect, the stunt must be repeated.
The following list of holidays has been found to work to good
advantage.
1. January—New Year.
2. February—Washington’s birthday.
3. March—St. Patrick’s Day.
4. April—April Fool’s Day.
5. May—May Day.
6. June—Anybody’s Wedding.
7. July—July Fourth.
8. August—Mr. Ribbon Clerk’s Vacation.
9. September—Labor Day.
10. October—Hallowe’en.
11. November—Thanksgiving.
12. December—Christmas.

Bag Handshake.

Each guest is given a paper bag which is to be put on his right hand.
He is to shake hands with everyone in sight, the bag being an
indicator of how zealous he has been in his efforts! As soon as it is
worn out he may rest in peace, but not until then.

The Little Theater.

The plan of “Holidays” is used over and over with different “motives.”
One of them is musical. The words of a song like “Yankee Doodle”
are written out on separate slips which are numbered alike. They
might all be numbered. “1.” The second song might be “Dixie,” and
its words are similarly written out on slips and numbered “2.” Each
guest is given a number and is asked to find all others who have the
same number. When everyone has found his or her group they are
to have just a very few minutes in which to practice their song.
When the time is up the leader calls out each group in turn and asks
them to sing their song, at the same time putting enough dramatic
action into their performance to really get the motive of the song
across! The group which the judges agree on as best gets a bag of
peanuts.
Dressing Up.

There is nothing like “dressing up” to make a crowd relax and laugh.
Therefore, with a large group of guests, most of them strangers to
one another, use caps and bells for as successful a mixer as you
could desire. Fancy paper caps can be bought very inexpensively
when bought in quantity, and the same is true of tiny bells. Each
guest is provided with a little bell which has a string attached by
which to hang it around his neck, and also one of these foolish
paper caps. They are all asked to put on both bells and caps and to
keep them on all evening.
A crowd of guests thusly adorned looks foolish enough to furnish
entertainment for a long, long time!

Circle Handshake.

It is good psychology to have a genuine mixer at the end of the


evening as well as at the beginning. After the last game, the guests
form a circle. The leader asks the one standing nearest the door to
shake hands with his right-hand neighbor, and then to continue
shaking hands all the way around the circle, telling each one “Good-
night” until he has gone completely around, after which he drops out
of the circle. At the same time however, all the others are beginning
to do the same thing. He had no sooner finished shaking hands with
his right-hand neighbor and gone on to the next one and then on to
the next, than this same right-hand neighbor began doing the same
thing, shaking the hand of his neighbor to the right, and so on
around the circle. Each one does the same thing, that is, after No. 2
has passed No. 3, No. 3 starts immediately to shake hands around
the circle, and as soon as he passes No. 4, No. 4 does the same
thing.
In this way it is inevitable that everyone shakes hands with everyone
else and bids them all “Good-night.”

You might also like