Windows Runtime via C# (Developer Reference)
Maarten van de Bospoort
Language: English
Pages: 320
ISBN: 0735679274
Format: PDF / Kindle (mobi) / ePub
Delve inside the Windows Runtime - and learn best ways to design and build Windows Store apps. Guided by Jeffrey Richter, a recognized expert in Windows and .NET programming, along with principal Windows consultant Maarten van de Bospoort, you'll master essential concepts. And you'll gain practical insights and tips for how to architect, design, optimize, and debug your apps.
With this book, you will:
- Learn how to consume Windows Runtime APIs from C#
- Understand the principles of architecting Windows Store apps
- See how to build, deploy, and secure app packages
- Understand how apps are activated and the process model controlling their execution
- Study the rich features available when working with files and folders
- Explore how to transfer, compress, and encrypt data via streams
- Design apps that give the illusion of running using live tiles, background transfers, and background tasks
- Share data between apps using the clipboard and the Share charm
- Get advice for monetizing your apps through the Windows Store
About This Book
- Requires working knowledge of Microsoft .NET Framework, C#, and the Visual Studio IDE
- Targeted to programmers building Windows Store apps
- Some chapters also useful to those building desktop apps
Technologies Covered
- Windows 8.1
- Microsoft Visual Studio 2013
Developing and Hosting Applications on the Cloud
Turing's Cathedral: The Origins of the Digital Universe
Computer Music: Synthesis, Composition, and Performance
Mastering Excel Macros: Arrays
Code has completed its operation and then Windows might take some next action. For example, when your app is about to be suspended (discussed in Chapter 3), Windows raises an event to notify your app. Upon receiving this notification, your app might want to persist some app state to the user’s hard disk. When you perform this operation asynchronously, the thread returns to Windows before the asynchronous operation completes. However, when the thread returns to Windows, Windows believes your app.
Are defined in the Windows.Storage.Pickers namespace. Here is code prompting the user to select a folder via the FolderPicker: var fop = new FolderPicker { FileTypeFilter = {"*"} }; var folder = await fop.PickSingleFolderAsync(); if (folder == null) return; // User canceled the picker // folder refers to the user-selected StorageFolder object 98 PART II Core Windows facilities There are three types of pickers: FolderPicker, FileOpenPicker, and FileSavePicker. Table 5-2 lists them with their.
For file-type associations, there are many file types that are forbidden, including .accountpicture-ms, .appx, .application, .appref-ms, .bat, .cer, .chm, .cmd, .com, .cpl, .crt, .dll, .drv, .exe, .fon, .gadget, .hlp, .hta, .inf, .ins, .jse, .lnk, .msi, .msp, .ocx, .pif, .ps1, .reg, .scf, .scr, .shb, .shs, .sys, .ttf, .url, .vbe, .vbs, .ws, .wsc, .wsf, and .wsh. The most current list can be found at http://msdn.microsoft.com/en-us/library/windows/apps/ hh779669.aspx. Table 5-3 describes the.
ActivationKind Kind { get; } public ApplicationExecutionState PreviousExecutionState { get; } public SplashScreen SplashScreen { get; } // IApplicationViewActivatedEventArgs member: public Int32 CurrentlyShownApplicationViewId { get; } } 104 PART II Core Windows facilities The Verb property enables your app to handle different operations on the file, such as Open and Edit. The Files property contains the set of files the user selected when she launched your app. The following code shows the.
Third-party component to initiate several transfers using a group name string that is unknown to the app. Because the app doesn’t know the group name string, it can’t discover and manipulate the component’s transfers. The ProxyCredential and ServerCredential properties allow you to specify any username/passwords required. After you initialize a BackgroundDownloader object, you use it to create one or more transfers. You create a transfer by calling its CreateDownload method. A download operation.