Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C# 7 and .NET Core: Modern Cross-Platform Development

You're reading from   C# 7 and .NET Core: Modern Cross-Platform Development Create powerful cross-platform applications using C# 7, .NET Core, and Visual Studio 2017 or Visual Studio Code

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher
ISBN-13 9781787129559
Length 594 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark J. Price Mark J. Price
Author Profile Icon Mark J. Price
Mark J. Price
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Hello, C#! Welcome, .NET Core! FREE CHAPTER 2. Speaking C# 3. Controlling the Flow, Converting Types, and Handling Exceptions 4. Using .NET Standard Types 5. Debugging, Monitoring, and Testing 6. Building Your Own Types with Object-Oriented Programming 7. Implementing Interfaces and Inheriting Classes 8. Working with Databases Using the Entity Framework Core 9. Querying and Manipulating Data with LINQ 10. Working with Files, Streams, and Serialization 11. Protecting Your Data 12. Improving Performance and Scalability with Multitasking 13. Building Universal Windows Platform Apps Using XAML 14. Building Web Applications Using ASP.NET Core MVC 15. Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API 16. Packaging and Deploying Your Code Cross-Platform A. Answers to the Test Your Knowledge Questions

Understanding XAML

In 2006, Microsoft released WPF, which was the first technology to use XAML. It is used even today to create desktop applications.

Note

Microsoft Visual Studio 2017 is a WPF application.

XAML can be used to create:

  • UWP apps for Windows 10, Windows 10 Mobile, Xbox One, and Microsoft HoloLens
  • Windows Store apps for Windows 8 and 8.1
  • Windows Presentation Foundation (WPF) applications for the Windows desktop, including Windows 7 and later
  • Silverlight applications for web browsers, Windows Phone, and desktop

Note

Although Silverlight is still supported by Microsoft, it is not being actively developed, so it should be avoided.

Simplifying code using XAML

XAML simplifies C# code, especially when building a user interface.

Imagine that you need two or more buttons laid out horizontally to create a toolbar. In C#, you would write this code:

    var toolbar = new StackPanel(); 
    toolbar.Orientation = Orientation.Horizontal; 
    var newButton = new Button(); 
    newButton.Content = &quot...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime