Creating a XAML page
Before we learn XAML syntax, let’s learn how to create a XAML page in Visual Studio and via the dotnet
command line.
To create a XAML page using Visual Studio, we can right-click on the project node. After, select Add > New Item…; we will see what’s 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 will create a pair of files – a XAML file and a C# code-behind file.
We can do the same using the dotnet
command.
To find all .NET MAUI templates, we can use the dotnet
command like so in a PowerShell console:
dotnet new --list | findstr -i maui .NET MAUI App maui [C#] MAUI/... .NET MAUI Blazor...