Windows 8 apps in C # and XAML


    Original title : Building Windows 8 Apps with C # and XAML
    Author : J. Lykness
    Book Translation : A. Zaika,
    Release Date: July 2013

    The book is on the publisher’s website.
    Book on

    Electronic version for sale!

    Detailed contents


    The first rumors about Windows 8 appeared in early 2011. Many speculations were surfing the Internet when developers began to wonder what the new platform would be. There were even rumors that the new platform would not support the .NET Framework, that it would be entirely based on C ++ or HTML 5 and JavaScript, that existing software would not work on it. Early releases and screen shots appeared on Twitter, but this only added to the general doubt. Finally, Steven Sinofsky, president of Microsoft's Windows division, introduced Windows 8 to the world on September 13, 2011.

    I was one of the first impatient programmers to download the system distribution. Having installed Windows 8 on a virtual machine, I quickly realized that everything was in order with support for the .NET Framework. On the new platform, my Silverlight applications worked. The C # and XAML languages ​​were present among the tools for developing new applications in the “Metro-style” (the name “Metro” in the RTM version of Windows was changed to “Windows Store”). I could not attend a conference in California devoted to the release of Windows 8, but the reports appeared on the Internet very quickly, and I watched them every evening, every morning, always when I had a free minute.

    Windows 8 provides the Windows Runtime, a new platform for creating applications with features that were previously available on computers running Windows. I have been building applications all day and admired that my knowledge of C # and XAML, using Silverlignt and Windows Presentation Foundation (WPF), is fully applicable to the new runtime. A new set of components of this platform makes it easier than ever to develop functional applications focused on touch interaction with the user. In the end, I very soon contacted the publisher of my book, Designing Silverlight Business Applications, and said I wanted to write a book about Windows 8.

    Fortunately, I participated in the Microsoft Early Learning Program. The consulting firm Wintellect, in which I work, was offered to conduct workshops and seminars intended for new developers who want to learn how to create applications for Windows 8. This allowed me to get acquainted with early releases of the product and write about various functionalities, which, in the end, became part of the final release. While I was creating examples on the touch control of objects on the screen, transferring formatted content between applications and using “live” interactive tiles with the ability to quickly view them on the initial screen, I liked the new system more and more.
    As part of this book, I wrote an article about the ten main reasons that developers will like to create applications for Windows 8. The
    full version of the article can be found at .

    If you do not go into details, these are the main reasons that, in my opinion, will allow you to enjoy working on the new platform:
    Support for different programming languages . Windows 8 applications can be written in VB, C #, C ++ and XAML, or use a set of technologies that includes HTML5 and JavaScript.
    XAML.Developers who are familiar with the power and flexibility of XAML and who have previously worked on creating applications for Silverlignt or WPF will feel confident when working on applications for Windows 8 using XAML.
    HTML5 . Widespread support for HTML5 as one of the markup description languages ​​is attractive for those web programmers who switch to programming for tablet computers, where the main emphasis is on sensory interaction with the user. Although this book is mainly devoted to working with C # and XAML.
    Windows Runtime Environment (WinRT). WinRT contains many controls, components, classes and methods that allow you to solve complex problems with just a few lines of code.
    • Contracts. The system of “contracts” represents a new level of organization of data sharing and interaction between the application and the user.
    Support for asynchronous operations. Support teams await and async made the development of multi-threaded code as simple as ever.
    Sensory interaction . Windows 8 focuses on touch input. When processing touch events and manipulations, such input by default supports all available controls and APIs.
    Options. By setting parameters through contracts, developers are able to provide the end user with a very consistent and familiar mechanism for setting up the application.
    Roaming profiles . Creating code that synchronizes the state of Windows 8 on different computers through the cloud has become easy and simple. (You can share a file with just one line of code).
    Icons . Windows 8 introduces a set of predefined icons that you can use to create consistent application command interfaces.

    In order to avoid confusion, in this book I mention programs of a new kind, created specifically for Windows 8, as “applications for Windows 8”. Visual Studio 2012 templates designed to create new applications are grouped together under the name “Windows Store”. Although these applications can be distributed through the Windows Store, you can distribute through the Store and classic desktop applications. Therefore, I use the term “Windows Store” only when I mention Visual Studio 2012 templates or when I compare a new type of application with traditional desktop applications. In all other cases, you will find references to these applications as “applications for Windows 8”.

    These ten reasons - this is just a superficial review of the new platform. Windows 8 is different from previous releases of Windows, so this operating system should be perceived differently. You will need to adapt to the new interface, which, although it focuses primarily on sensory interaction with the user, also supports the ability to use the mouse and keyboard. You can use code that transparently calls system unmanaged components, you can work with a new set of controls and other objects. The main purpose of the book that you hold in your hands is to quickly lead you along the path of mastering a new field of knowledge so that you can begin to create wonderful modern applications using your previous knowledge of C # and XAML.

    What is this book about

    The purpose of the book is to explain how to write applications for Windows 8 using C #, XAML, Windows Runtime, and the .NET platform. I assume you have some development experience. Expanding the basic topics related to C # and XAML, I try to focus on those features that are characteristic for the development of new applications. Concerning more complex tricks of working with C # or XAML that are not exclusively related to the Windows 8 platform, I refer to other books, articles or Internet resources so that you can continue to study these techniques if you wish.

    A developer of any level, both an experienced one who wants to transfer existing applications to a new platform, and a beginner who wants to write Windows 8 applications from scratch, will find everything necessary in this book. It covers the entire life cycle of the application - from creating a software project to publishing in the Windows Store.

    How to use this book

    The book is intended to show you how to write applications for Windows 8 using C # and XAML. Each chapter is written to help you first understand the fundamental features of the target platform, and then create applications based on your knowledge. The book gives examples of texts of programs that demonstrate the capabilities of the system, and recommendations for working with them. Many chapters are based on previous ones. This allows you to gradually talk about all the components that make up a typical Windows 8 application.

    All chapters are structured in a similar way. They begin with an introduction to the topic and an overview of the options available within the topic. The following are code examples and walkthroughs showing the application of the technology described. Code examples are explained in detail, the chapter concludes with a summary so that you pay attention to the most important points.

    I hope that you will read this book from beginning to end, regardless of the knowledge and skills that you possess. As you read each chapter, you will find that you are beginning to understand the material better and better, and new concepts will reinforce each other and bond together. After you have fully read the book, you can use it as a reference, referring to individual chapters at any time when you need to clarify a specific issue.
    J. Lickness

    about the author

    Jeremy Lickness- Chief Consultant at Wintellect, LLC. He has been working with enterprise applications for over 20 years, 15 of which are engaged in web applications based on Microsoft technologies. He was one of the first to implement Silverlight 3.0., Worked on a variety of enterprise solutions based on Silverlight. Including - over the server monitoring system for the 2010 Winter Olympics in Vancouver and over Microsoft’s own product for analyzing social networks, which is called “Looking Glass”. He is also a consultant and project manager at Wintellect. Jeremy works closely with Fortune 500 companies, including Microsoft. He has had MVP status for three consecutive years, was declared MVP of the year in 2010. Moreover, he received an award for his contribution to the development of the Microsoft online community (Microsoft Community Contributor) thanks to his work in the field of Silverlight. Jeremy is the author of Designing Silverlight Business Applications: Best Practices for Using Silverlight Effectively in the Enterprise (Addison-Wesley). He regularly gives presentations, writes articles, and blogs, covering topics of interest to the Microsoft developer community. His blog can be found .

    Also popular now: