Home > Store

Universal Windows Apps with XAML and C# Unleashed

Register your product to gain access to bonus material or receive a coupon.

Universal Windows Apps with XAML and C# Unleashed

eBook (Watermarked)

  • Your Price: $31.99
  • List Price: $39.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Description

  • Copyright 2015
  • Dimensions: 7" x 9-1/8"
  • Pages: 768
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-403637-9
  • ISBN-13: 978-0-13-403637-3

Full Color: Figures and code appear as they do in Visual Studio.

Universal Windows apps are a total game-changer. You can now write once and deploy your app to any modern PC, tablet, phone, or other Windows device. Suddenly, it’s quick and easy to serve new devices and form factors, sharing unified assets ranging from code to styles to user controls. It has never been easier to reach multiple-device markets!

Now, the world’s #1 expert on Microsoft XAML brings together all the knowledge Windows developers need to build universal apps that adapt smoothly for any device running Windows 8.1, Windows Phone 8.1, or their successors. Drawing on his unsurpassed personal experience and direct input from Microsoft’s Windows and Visual Studio teams, Adam Nathan illuminates core development concepts, answers your most important questions, and candidly assesses the technology’s strengths and limitations.

This full-color guide walks you through every key task involved in building a universal Windows app: layout and input, working with the app model, using advanced controls, leveraging XAML’s powerful rich media features, and much more.

Detailed information on how to...

  • Quickly build universal, localized apps that exploit the vast global scale of the Windows Store
  • Size, position, and transform elements within layouts that gracefully adapt to different devices
  • Handle input from touch, mouse, pen, keyboard, and any sensor
  • Monetize apps with Windows Store sales, in-app purchases, and advertising
  • Make the most of controls for managing content, items, text, images, media, speech, and more
  • Create efficient 2D vector graphics and animations
  • Use styles, templates, and visual states to redesign controls without losing functionality
  • Bind data sources to simplify data presentation and updates
  • Easily integrate data from apps, users, and networks
  • Support Windows app commands: Search, Share, Print, Play, Project, Settings
  • Use contracts to build apps that cooperate to perform complex tasks
  • Improve the user experience even when your app isn’t running

Sample Content

Table of Contents

Introduction     1
Who Should Read This Book?     3
Software Requirements     3
Code Examples     3
How This Book Is Organized     3
Conventions Used in This Book     5
Part I: Getting Started
Chapter 1: Hello, Real World!     7

Creating, Deploying, and
Profiling an App     7
Understanding the App
Packages     10
Updating XAML and C# Code     21
Making the App World-Ready     29
Making the App Accessible     35
Submitting to the Windows Store     40
Summary     42
Chapter 2: Mastering XAML     43
Elements and Attributes     44
Namespaces     45
Property Elements     47
Type Converters     49
Markup Extensions     49
Children of Object Elements     52
Mixing XAML with C#     56
XAML Keywords     59
Summary     60
Part II: Building an App
Chapter 3: Sizing, Positioning, and Transforming Elements     63

Controlling Size     64
Controlling Position     68
Applying 2D Transforms     72
Applying 3D Transforms     79
Summary     82
Chapter 4: Layout     83
Discovering Your Window Size and Location     84
Panels     88
Handling Content Overflow     103
Summary     115
Chapter 5: Handling Input: Touch, Mouse, Pen, and Keyboard     117
Touch Input     118
Mouse Input     141
Pen Input     144
Keyboard Input     153
Summary     159
Part III: Working with the App Model
Chapter 6: App Lifecycle     161

Killing     163
Suspending     164
Resuming     166
Terminating     167
Launching     168
Activating     171
Managing Session State with SuspensionManager     173
Programmatically Launching Apps     176
Summary     179
Chapter 7: Threading, Windows, and Pages     181
Understanding the Threading Model for Universal Apps     181
Displaying Multiple Windows     186
Navigating Between Pages     189
Summary     198
Chapter 8: The Many Ways to Earn Money     199
Adding Advertisements to Your App     200
Supporting a Free Trial     205
Supporting In-App Purchases     210
Validating Windows Store Receipts     218
Testing Windows Store
Features     220
Summary     225
Part IV: Understanding Controls
Chapter 9: Content Controls     227

Button     230
AppBarButton     234
HyperlinkButton     241
RepeatButton     242
ToggleButton     243
AppBarToggleButton     243
CheckBox     244
RadioButton     245
ToolTip     246
App Bars     249
Summary     257
Chapter 10: Items Controls     259
Items in the Control     260
Items Panels     262
ComboBox     265
ListBox     267
ListView     269
GridView     273
FlipView     274
SemanticZoom     276
MenuFlyout     279
Summary     281
Chapter 11: Text     283
TextBlock     283
RichTextBlock     296
TextBox     301
RichEditBox     309
PasswordBox     311
Summary     313
Chapter 12: Images     315
The Image Element     316
Multiple Files for Multiple
Environments     325
Decoding Images     330
Encoding Images     339
Rendering PDF Content as an Image     347
Summary     353
Chapter 13: Audio, Video, and Speech     355
Playback     356
Capture     367
Transcoding     378
Speech Synthesis     383
Summary     386
Chapter 14: Other Controls     387
Range Controls     387
SearchBox     390
Popup Controls     397
Hub     403
Date and Time Controls     407
ProgressRing     411
ToggleSwitch     412
WebView     413
Summary     419
Part V: Leveraging the Richness of XAML
Chapter 15: Vector Graphics     421

Shapes     421
Geometries     428
Brushes     436
Summary     450
Chapter 16: Animation     453
Dependency Properties     454
Theme Transitions     455
Theme Animations     466
Custom Animations     472
Custom Keyframe Animations     485
Easing Functions     490
Manual Animations     495
Summary     497
Chapter 17: Styles, Templates, and Visual States     499
Styles     500
Templates     509
Visual States     519
Summary     528
Chapter 18: Data Binding     529
Introducing Binding     529
Controlling Rendering     538
Customizing the View of a Collection     546
High-Performance Rendering with ListView and GridView     550
Summary     554
Part VI: Exploiting Windows
Chapter 19: Working with Data     555

An Overview of Files and Folders     555
App Data     557
User Data     563
Networking     572
Summary     582
Chapter 20: Supporting App Commands     583
Search     584
Share     589
Print     596
Play     604
Project     606
Settings     606
Summary     611
Chapter 21: Leveraging Contracts     613
Account Picture Provider     615
AutoPlay Content and
AutoPlay Device     617
File Type Associations     620
Protocol     623
File Open Picker     624
File Save Picker     627
Contact Picker     628
The Contact Contract     631
The Appointments Provider
Contract     635
Background Tasks     637
Summary     646
Chapter 22: Reading from Sensors     647
Accelerometer     647
Gyrometer     651
Inclinometer     651
Compass     651
Light Sensor     651
Orientation     652
Location     652
Proximity     659
Summary     662
Chapter 23: Controlling Devices     663
Fingerprint Readers     664
Image Scanners     664
Barcode Scanners     668
Magnetic Stripe Readers     671
Custom Bluetooth Devices     673
Custom Bluetooth Smart
Devices     676
Custom USB Devices     679
Custom HID Devices     682
Custom Wi-Fi Direct Devices     684
Summary     686
Chapter 24: Thinking Outside the App: Live Tiles, Notifications, and the Lock Screen     687
Live Tiles     687
Badges     701
Secondary Tiles     703
Toast Notifications     705
Setting Up Push Notifications     711
The Lock Screen     719
Summary     721
Index     723

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020