Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
.NET MAUI Cross-Platform Application Development - Second Edition

You're reading from  .NET MAUI Cross-Platform Application Development - Second Edition

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781835080597
Pages 496 pages
Edition 2nd Edition
Languages
Author (1):
Roger Ye Roger Ye
Profile icon Roger Ye

Table of Contents (18) Chapters

Preface 1. Part 1: Exploring .NET MAUI
2. Getting Started with .NET MAUI 3. Building Our First .NET MAUI App 4. User Interface Design with XAML 5. Exploring MVVM and Data Binding 6. Navigation Using .NET MAUI Shell and NavigationPage 7. Software Design with Dependency Injection 8. Using Platform-Specific Features 9. Part 2: Implementing .NET MAUI Blazor
10. Introducing Blazor Hybrid App Development 11. Understanding Blazor Routing and Layout 12. Implementing Razor Components 13. Part 3: Testing and Deployment
14. Developing Unit Tests 15. Deploying and Publishing in App Stores 16. Other Books You May Enjoy
17. Index

Creating a XAML page

Before we delve into XAML syntax, let’s first understand how to create a XAML page in Visual Studio and through the dotnet command line.

To create a XAML page using Visual Studio, right-click on the project node, then select Add > New Item…. This will bring up the dialog box shown in Figure 3.1:

Figure 3.1: Adding a XAML page

On this screen, select Content Page from the templates and click Add. This action will generate a pair of files – a XAML file and a C# code-behind file.

The same can be achieved using a dotnet command. To locate all .NET MAUI templates, we can use the following dotnet command in the PowerShell console:

Figure 3.2: dotnet command for listing templates

From the preceding output, we can observe that the short name of the XAML content page is maui-page-xaml. We can create a XAML page using the following command:

Figure 3.3: Creating a XAML page

The preceding command will generate...

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 €14.99/month. Cancel anytime}