Introduction to .NET MAUI
A beginner-to-intermediate course for learning how to build cross-platform mobile and desktop applications using .NET MAUI, C#, XAML, MVVM, REST APIs, local storage, and deployment workflows.
Course Overview
This course introduces students to .NET MAUI, Microsoft’s cross-platform framework for building native apps from a single C# codebase. Students will learn how to create user interfaces, navigate between pages, consume APIs, manage application state, store data locally, and publish apps for Android and Windows.
| Module | Topic | Suggested Duration |
|---|---|---|
| 1 | Introduction to .NET MAUI | 2 hours |
| 2 | Development Environment Setup | 3 hours |
| 3 | C# Refresher for MAUI | 4 hours |
| 4 | XAML User Interface Design | 5 hours |
| 5 | Pages, Layouts, and Controls | 4 hours |
| 6 | Navigation and Shell | 3 hours |
| 7 | MVVM Architecture | 5 hours |
| 8 | Data Binding and Commands | 4 hours |
| 9 | Calling REST APIs | 5 hours |
| 10 | Local Storage and Preferences | 4 hours |
| 11 | Platform-Specific Features | 4 hours |
| 12 | Debugging and Testing | 3 hours |
| 13 | Publishing Android and Windows Apps | 5 hours |
| 14 | Final Project | 8 hours |
Total suggested duration: 59 hours
Target Audience
- Beginner C# developers who want to build mobile and desktop apps.
- ASP.NET developers who want to extend systems to Android, iOS, macOS, and Windows clients.
- GIS and business application developers building field data collection or enterprise apps.
- Students learning modern cross-platform application development.
Prerequisites
- Basic knowledge of C#.
- Basic understanding of object-oriented programming.
- Visual Studio 2022 installed.
- .NET SDK and .NET MAUI workload installed.
Module Details
Module 1 — Introduction to .NET MAUI
Learning objectives:
- Understand what .NET MAUI is.
- Understand the difference between MAUI, Xamarin.Forms, WPF, WinUI, and ASP.NET.
- Learn the supported platforms.
- Understand single-project architecture.
Topics:
- What is .NET MAUI?
- Cross-platform app development.
- Native controls and handlers.
- App lifecycle.
- Project structure.
Module 2 — Development Environment Setup
- Installing Visual Studio 2022.
- Installing .NET MAUI workload.
- Configuring Android SDK and emulator.
- Creating your first MAUI app.
- Running on Windows and Android.
dotnet workload install maui
dotnet new maui -n MyFirstMauiApp
cd MyFirstMauiApp
dotnet build
Module 3 — C# Refresher for MAUI
- Classes and objects.
- Properties and methods.
- Events.
- Async and await.
- Observable collections.
public class Parcel
{
public int Id { get; set; }
public string ParcelNumber { get; set; } = string.Empty;
public string County { get; set; } = string.Empty;
}
Module 4 — XAML User Interface Design
- What is XAML?
- Labels, Buttons, Entries, Pickers, and Images.
- StackLayout, Grid, FlexLayout, and ScrollView.
- Styles and resources.
<VerticalStackLayout Padding="20" Spacing="12">
<Label Text="Welcome to .NET MAUI"
FontSize="24"
FontAttributes="Bold" />
<Entry Placeholder="Enter your name" />
<Button Text="Continue"
Clicked="OnContinueClicked" />
</VerticalStackLayout>
Module 5 — Pages, Layouts, and Controls
- ContentPage.
- TabbedPage.
- CollectionView.
- ListView.
- Form layouts.
<CollectionView ItemsSource="{Binding Parcels}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border Padding="12" Margin="6">
<VerticalStackLayout>
<Label Text="{Binding ParcelNumber}" FontAttributes="Bold" />
<Label Text="{Binding County}" />
</VerticalStackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Module 6 — Navigation and Shell
- Shell navigation.
- Routes.
- Passing parameters between pages.
- Flyout menus.
- Tabs.
await Shell.Current.GoToAsync("//home");
await Shell.Current.GoToAsync($"details?id={parcel.Id}");
Module 7 — MVVM Architecture
- Model, View, and ViewModel.
- Separation of concerns.
- INotifyPropertyChanged.
- Dependency injection.
- Services and repositories.
public class MainViewModel
{
public string Title { get; set; } = "Shambamap MAUI App";
public ObservableCollection<Parcel> Parcels { get; set; } = new();
}
Module 8 — Data Binding and Commands
- One-way binding.
- Two-way binding.
- Command binding.
- BindingContext.
- Validation messages.
<Entry Text="{Binding UserName}" Placeholder="Username" />
<Button Text="Login" Command="{Binding LoginCommand}" />
Module 9 — Calling REST APIs
- Using HttpClient.
- GET and POST requests.
- JSON serialization.
- Error handling.
- Calling ASP.NET Core Web APIs.
public class ApiService
{
private readonly HttpClient _httpClient = new();
public async Task<List<Parcel>> GetParcelsAsync()
{
var url = "https://example.com/api/parcels";
var result = await _httpClient.GetFromJsonAsync<List<Parcel>>(url);
return result ?? new List<Parcel>();
}
}
Module 10 — Local Storage and Preferences
- Preferences.
- SecureStorage.
- File storage.
- SQLite basics.
- Offline-first app design.
Preferences.Set("UserName", "student");
string userName = Preferences.Get("UserName", string.Empty);
Module 11 — Platform-Specific Features
- Permissions.
- Camera access.
- Location access.
- File picker.
- Platform-specific code folders.
var status = await Permissions.RequestAsync<Permissions.LocationWhenInUse>();
if (status == PermissionStatus.Granted)
{
var location = await Geolocation.GetLastKnownLocationAsync();
}
Module 12 — Debugging and Testing
- Debugging with Visual Studio.
- Android emulator troubleshooting.
- Device logs.
- Handling exceptions.
- Testing services and ViewModels.
Module 13 — Publishing Android and Windows Apps
- Android package identifiers.
- VersionCode and VersionName.
- Keystore signing.
- Generating APK and AAB files.
- Creating MSIX packages for Windows.
<ApplicationId>com.example.myapp</ApplicationId>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
Module 14 — Final Project
Students build a complete .NET MAUI app using the skills learned in the course.
- Login page.
- Dashboard page.
- Data entry form.
- REST API integration.
- Local storage.
- Android or Windows deployment package.
Practical Labs
| Lab | Description | Output |
|---|---|---|
| Lab 1 | Create your first .NET MAUI app. | Running app on Windows or Android. |
| Lab 2 | Build a login form using XAML. | Login screen with validation. |
| Lab 3 | Create a dashboard page. | Navigation between pages. |
| Lab 4 | Display data using CollectionView. | List of records. |
| Lab 5 | Apply MVVM architecture. | ViewModel-driven UI. |
| Lab 6 | Call a REST API. | Remote data displayed in app. |
| Lab 7 | Store settings locally. | Saved user preferences. |
| Lab 8 | Publish an Android APK or AAB. | Installable mobile app package. |
Sample Mini Project — Parcel Search App
This project is suitable for land administration, GIS, and Shambamap-style training. Students build a simple app that searches for land parcels and displays parcel details.
- Search by parcel number.
- Display parcel owner or organization data.
- Show county and locality information.
- Call an ASP.NET Web API endpoint.
- Store recent searches locally.
Assessment Strategy
| Assessment | Weight |
|---|---|
| Weekly Labs | 30% |
| XAML Interface Assignment | 20% |
| REST API Integration Assignment | 20% |
| Final MAUI App Project | 30% |
Recommended Tools
- Visual Studio 2022
- .NET SDK
- .NET MAUI workload
- Android SDK and Android Emulator
- Git
- Postman or Swagger UI for API testing
- SQLite browser for local database inspection
Expected Outcomes
By the end of this course, students should be able to:
- Create .NET MAUI apps using Visual Studio.
- Design user interfaces using XAML.
- Use C# to handle app logic.
- Apply MVVM architecture.
- Navigate between app pages.
- Call REST APIs from a MAUI app.
- Store data locally using Preferences, SecureStorage, or SQLite.
- Debug Android and Windows MAUI apps.
- Generate installable packages for Android and Windows.
Instructor Notes
For beginners, start with Windows deployment first because it is easier to debug. Move to Android deployment after students understand XAML, navigation, and MVVM basics.
For Shambamap-style training, extend the final project with maps, parcel search, REST API authentication, offline caching, and Android publishing through Google Play Console.