What this book covers
Chapter 1, Introduction to .NET MAUI, explains the basic concepts of .NET Mobile and .NET MAUI. It helps you understand the building blocks of how to create a true cross-platform app. It’s the only theoretical chapter of the book and will help you get started and set up your development environment.
Chapter 2, Building Our First .NET MAUI App, guides you through the concepts of Model-View-ViewModel (MVVM) and explains how to use the Inversion of Control pattern to simplify the creation of views and view models. We will create a to-do app that supports navigation, filtering, and the addition of to-do items to a list, and will also render a user interface that takes advantage of the powerful data-binding mechanisms in .NET MAUI.
Chapter 3, Converting a Xamarin.Forms App to .NET MAUI, walks through the steps to convert an existing Xamarin.Forms app running on Mono to a .NET MAUI app running on .NET 7. We will discuss two different methods for converting your Xamarin.Forms application to .NET MAUI. The first method will use a new .NET MAUI project and move our old Xamarin.Forms code into the new project, and the second method will use the .NET Upgrade Assistant tool to do some of the upgrades for us.
Chapter 4, Building a News App Using .NET MAUI Shell, explores the default navigation template in .NET MAUI, Shell
, a standard way to define the structure of .NET MAUI apps. In this chapter, you will learn all you need to know to use Shell
in a .NET MAUI app.
Chapter 5, A Matchmaking App with a Rich UX Using Animations, lets you dive deeper into how to define a richer user interface with animations and content placement. It also covers the concept of custom controls to encapsulate the user interface into self-contained components.
Chapter 6, Building a Photo Gallery App Using CollectionView and CarouselView, details the .NET MAUI CollectionView
and CarouselView
controls. In this chapter, we will use them to build a photo gallery app to learn how to master the controls.
Chapter 7, Building a Location Tracking App Using GPS and Maps, taps into the use of geolocation data from the device’s GPS and how to plot this data on a layer on a map. It also explains how to use background services to keep tracking the location over a long period of time to create a heat map of where you spend your time.
Chapter 8, Building a Weather App for Multiple Form Factors, is all about consuming a third-party REST interface and displaying the data in a user-friendly way. We will hook up to a weather service to get the forecast for the current location you are in and display the results in a list.
Chapter 9, Setting Up a Backend for a Game Using Azure Services, is the first of two parts in which we’ll set up a game app. This chapter explains how to use Azure services to create a backend that exposes functionality through SignalR to set up a real-time communication channel between apps.
Chapter 10, Building a Real-Time Game, follows on from the previous chapter and covers the frontend of the app – in this case, a .NET MAUI app that connects to the backend and relays messages between users. The chapter focuses on setting up SignalR on the client side and explains how to create a service model that abstracts this communication through messages and events.
Chapter 11, Building a Calculator Using .NET MAUI Blazor, explores a .NET Blazor app embedded within a .NET MAUI app. We will write part of the calculator app using Blazor and host that in .NET MAUI using BlazorWebView
. We will also communicate between Blazor and .NET MAUI.
Chapter 12, Hot Dog or Not Hot Dog Using Machine Learning, covers the creation of an app that uses machine learning to identify whether an image contains a hot dog or not.