To get the most out of this book
After completing the first chapter, you can choose to proceed with Part 1 or jump to Part 2. The first part of this book delves into the development of a classic .NET MAUI app utilizing XAML UI. In contrast, the second part introduces Blazor Hybrid app development, a new concept in .NET MAUI. The last part of the book focuses on unit test and deployment strategies.
Please note that both Windows and macOS computers are required to build the projects discussed in this book. We’ll be using Visual Studio 2022 and .NET 8 SDK throughout. To build iOS and macOS targets on Windows, it is necessary to connect to a network-accessible Mac, as outlined in the Microsoft documentation provided: https://learn.microsoft.com/en-us/dotnet/maui/ios/pair-to-mac.
Since Visual Studio for Mac is scheduled for retirement by August 31, 2024, you may install .NET SDK and Visual Studio Code to replace it on Mac.
Software/hardware covered in the book |
OS requirements |
Visual Studio 2022 |
Windows |
Visual Studio Code with .NET SDK |
macOS |
Download the example code files
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/.NET-MAUI-Cross-Platform-Application-Development-Second-edition. If there’s an update to the code, it will be updated in the GitHub repository.
My working repository is https://github.com/shugaoye/PassXYZ.Vault2.
I will update the source code in my working repository first and then push the commits to Packt repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/gbp/9781835080597.
Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The return value of CreateMauiApp
is a MauiApp
instance, which is the entry point of our app.”
A block of code is set as follows:
private async Task<bool> UpdateItemAsync(string key,
string value)
{
if (listGroupItem == null) return false;
if (string.IsNullOrEmpty(key) ||
string.IsNullOrEmpty(value))
return false;
listGroupItem.Name = key;
listGroupItem.Notes = value;
if (_isNewItem) {...}
else {...}
StateHasChanged();
return true;
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
Image image = new Image {
BackgroundColor = Color.FromHex("#D1D1D1")
};
image.Source = new FontImageSource {
Glyph = "\uf007",
FontFamily = "FontAwesomeRegular",
Size = 32
};
Any command-line input or output is written as follows:
git clone -b chapter09
https://github.com/PacktPublishing/Modern-Cross-Platform-Application-Development-with-.NET-MAUI PassXYZ.Vault2
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Launch Visual Studio 2022 and select Create a new project on the startup screen.”
Tips
Appear like this.
Important notes
Appear like this.