Book description
Harness the powerful features of .NET MAUI, the evolution of Xamarin.Forms, to create multi-platform app projects using location services, the weather API, machine learning, and much more
Key Features
- Leverage .NET MAUI through real-world projects, from weather apps to real-time multiplayer games with SignalR and Azure Functions
- Explore the essential features of .NET MAUI such as Shell, CollectionView, and CarouselView
- Go beyond the basics with advanced topics like machine learning using TensorFlow and ML.NET
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
This third edition of .NET MAUI Projects explores the features of .NET MAUI, a lightweight multi-platform development toolkit for building apps with a rich user interface. Updated to cover the latest features of .NET MAUI, including CollectionView and Shell, this book delves into concepts such as machine learning and cloud services.
Starting with an overview of .NET Core and how it works, this book shares tips for choosing the right development environment for planning multi-platform apps. You'll then build your first .NET MAUI app and advance to learning how to use Shell to implement app architecture. Progressing in complexity, the projects guide you through creating apps, ranging from a location tracker and weather map to machine learning and multiplayer games. Further, the book will take you through modern mobile development frameworks such as SQLite, .NET Core, and ML.NET, empowering you to customize your apps for Windows, macOS, Android, and iOS platforms for native-like performance. Engaging examples are woven throughout the book so you can grasp essential concepts by writing code rather than extensive theory.
By the end of this book, you'll be ready to develop your own native apps using .NET MAUI and associated technologies such as .NET Core, Visual Studio 2022, and C#.
What you will learn
- Set up .NET MAUI to build native apps for multiple platforms using its single project capabilities
- Understand the core aspects of developing a mobile app, such as layout, UX, and rendering
- Use custom handlers for platform-specific access
- Discover how to create custom layouts for your apps with .NET MAUI Shell
- Implement serverless services in your .NET MAUI apps using Azure SignalR
- Create a .NET MAUI Blazor application leveraging the power of web technologies
- Build and train machine learning models using ML.NET and Azure Cognitive Services
Who this book is for
This book is for C# and .NET developers who want to learn .NET MAUI and get started with native .NET Core mobile application development from the ground up. Working knowledge of Visual Studio and C# will help you to get the most out of this book.
Table of contents
- .NET MAUI Projects
- Foreword
- Contributors
- About the authors
- About the reviewers
- Preface
- Part 1: Introduction
- Chapter 1: Introduction to .NET MAUI
-
Chapter 2: Building Our First .NET MAUI App
- Technical requirements
- Project overview
- Setting up the project
- Creating a repository and a TodoItem model
-
Using MVVM – creating views and ViewModels
- Defining a ViewModel base class
- Introducing the CommunityToolkit.Mvvm library’s ObservableObject and ObservableProperty
- Creating MainViewModel
- Creating TodoItemViewModel
- Creating the ItemViewModel class
- Creating the MainView view
- Creating the ItemView view
- Wiring up dependency injection
- Making the app run
-
Adding data bindings
- Navigating from MainView to ItemView to add a new item
- Adding new items to the list
- Binding ListView in MainView
- Creating a ValueConverter object for the item’s status
- Navigating to an item using a command
- Marking an item as complete using a command
- Creating the filter toggle function using a command
- Laying out the contents
- Summary
- Chapter 3: Converting a Xamarin.Forms App into .NET MAUI
- Part 2: Basic Projects
- Chapter 4: Building a News App Using .NET MAUI Shell
- Chapter 5: A Matchmaking App with a Rich UX Using Animations
- Chapter 6: Building a Photo Gallery App Using CollectionView and CarouselView
-
Chapter 7: Building a Location Tracking App Using GPS and Maps
- Technical requirements
- Project overview
-
Building the MeTracker app
- Creating a repository to save the locations of the users
- Creating a service for location tracking
- Setting up the app logic
- Background location tracking on iOS and Mac Catalyst
- Background location tracking with Android
- Creating a heat map
- Creating a custom control for the map
- Refreshing the map when the app resumes
- Summary
-
Chapter 8: Building a Weather App for Multiple Form Factors
- Technical requirements
- Project overview
-
Building the weather app
- Creating models for the weather data
- Creating a service to fetch the weather data
- Configuring the application platforms so that they use location services
- Creating the ViewModel class
- Creating the view for tablets and desktop computers
- Creating the view for phones
- Adding services and ViewModels to dependency injection
- Navigating to different views based on the form factor
- Handling states with VisualStateManager
- Summary
- Part 3: Advanced Projects
- Chapter 9: Setting Up a Backend for a Game Using Azure Services
- Chapter 10: Building a Real-Time Game
- Chapter 11: Building a Calculator Using .NET MAUI Blazor
- Chapter 12: Hot Dog or Not Hot Dog Using Machine Learning
- Index
- Other Books You May Enjoy
Product information
- Title: .NET MAUI Projects - Third Edition
- Author(s):
- Release date: February 2024
- Publisher(s): Packt Publishing
- ISBN: 9781837634910
You might also like
video
Building a Material Text Entry in .NET MAUI
Learn how to build an outlined-style, material-design text entry in .NET MAUI and how to customize …
video
.NET MAUI in Action, Video Edition
Build cross-platform apps with .NET MAUI! This exciting new technology helps you create mobile and desktop …
book
Xamarin.Forms Projects - Second Edition
Learn to build cross-platform mobile apps using the latest features in Xamarin.Forms 4 with the help …
book
.NET MAUI in Action
Build cross-platform apps with .NET MAUI! This exciting new technology helps you create mobile and desktop …