Creating the calculator app
In this chapter, we are going to build a calculator app. The UI for the calculator is built using Razor pages in Blazor, but the actual mechanics of the calculator reside in the .NET MAUI app.
Setting up the project
This project, like all the rest, is a File | New | Project...-style project. This means that we will not be importing any code at all. So, this first section is all about creating the project and setting up the basic project structure.
Creating the new project
The first step is to create a new .NET MAUI project. Follow these steps:
- Open Visual Studio 2022 and select Create a new project:
Figure 11.1 – Visual Studio 2022
This will open the Create a new project wizard.
- In the search field, type in
blazor
and select the .NET MAUI Blazor App item from the list:
Figure 11.2 – Create a new project
- Click Next.
- Enter
Calculator
as the...