Windows Runtime via C# (Developer Reference)

By Maarten van de Bospoort

Delve contained in the home windows Runtime - and study top how one can layout and construct home windows shop apps. Guided by means of Jeffrey Richter, a famous specialist in home windows and .NET programming, in addition to primary home windows advisor Maarten van de Bospoort, you are going to grasp crucial strategies. and you can achieve useful insights and counsel for the way to architect, layout, optimize, and debug your apps.

With this e-book, you will:

  • Learn the best way to devour home windows Runtime APIs from C#
  • Understand the rules of architecting home windows shop apps
  • See find out how to construct, set up, and safe app packages
  • Understand how apps are activated and the method version controlling their execution
  • Study the wealthy good points to be had whilst operating with documents and folders
  • Explore tips on how to move, compress, and encrypt info through streams
  • Design apps that supply the appearance of operating utilizing stay tiles, heritage transfers, and history tasks
  • Share information among apps utilizing the clipboard and the percentage charm
  • Get recommendation for monetizing your apps during the home windows Store

About This Book

  • Requires operating wisdom of Microsoft .NET Framework, C#, and the visible Studio IDE
  • Targeted to programmers construction home windows shop apps
  • Some chapters additionally precious to these development machine apps

Technologies Covered

  • Windows 8.1
  • Microsoft visible Studio 2013

Show description

Quick preview of Windows Runtime via C# (Developer Reference) PDF

Show sample text content

ViewType. Hosted : ViewType. Auxiliary); } seize { go back ViewType. None; } } } ///

Whenever you override one among App's digital activation tools /// (eg: OnLaunched, OnFileActivated, OnShareTargetActivated), name this technique. /// If referred to as for the first major view activation, units Window's body, /// restores consumer consultation country (if app was once formerly terminated), and prompts window. /// If known as for a Hosted view activation, units Window's body & prompts window. ///

/// The cause of app activation /// True if prior kingdom was once restored; fake if beginning clean.

Here's a few code for a pattern App classification that makes use of my AppAid category. The code calls a few extra equipment that I supply within the code that accompanies this publication to simplify saving and restoring consumer consultation country in case of app termination. an important a part of the next code is the ­comments. // Our singleton App type; shop all app-wide information during this classification item public sealed partial type App : program { // Invoked simply because DISABLE_XAML_GENERATED_MAIN is outlined: public static void Main(String[] args) { // Invoked through technique' basic thread every time the method initializes AppAid.

70 Debugging approach lifetime administration. . . . . . . . . . . . . . . . . . . . . seventy five viii Contents PART II middle home windows amenities bankruptcy four package deal information and roaming seventy nine package deal information settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eighty one package deal info garage folders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eighty three Versioning package deal facts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eighty three Roaming package deal info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eighty five package deal facts swap notifications . . . . . . . . . . . . . . . .

This can be worthy for peer-to-peer situations the place your app desires to enable a number of clients collaborate with each one person on his or her personal computing device. A online game may well use this to permit clients to play opposed to one another. environment your app as a TCP listener calls for using the StreamSocketListener classification, which feels like this: public sealed class StreamSocketListener : IDisposable {    public StreamSocketListener();    // OPTIONAL: Modify connection (QoS) before calling BindXxxAsync    public StreamSocketListenerControl Control { get; }    // Returns read-only information about the connection (local port)    public StreamSocketListenerInformation Information { get; }    // This event is raised whenever a client connects to this socket listener    public event TypedEventHandler ConnectionReceived;    // Start listening on local IP addresses of all NICs    // If localServiceName is "", system picks port    public IAsyncAction BindServiceNameAsync(String localServiceName);    // Start listening on the hostname/IP address and service name specified.

A hundred ninety Updating a tile at a scheduled time. . . . . . . . . . . . . . . . . . . . . . . . . . 192 Updating a tile periodically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Secondary tiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 x Contents Toast notifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 exhibiting a toast notification at a scheduled time . . . . . . . . . . . . . . 198 utilizing the Wintellect Notification Extension Library. . . . . . . . . . . . 199 home windows Push Notification provider (WNS). . . . . . . . . . . . . . .

Download PDF sample

Rated 4.78 of 5 – based on 24 votes