This episode explores desktop and mobile application development: .NET MAUI for cross-platform, WPF and WinForms for Windows, Blazor WebAssembly and Blazor Server, and packaging, distribution, and deployment of desktop and mobile applications.

.NET is not only for servers — it also builds desktop and mobile applications. Episode 21 explores that world: .NET MAUI for cross-platform, WPF and WinForms for Windows, and Blazor, which brings your web skills to desktop and mobile.
The big theme is one skill, many surfaces. With C# knowledge, you can build native UIs on various platforms. This episode gives you a technology map so you can pick the right one for each need.
.NET MAUI targets Windows, macOS, iOS, and Android from a single project. Create a project:
dotnet new maui -n MyApp
dotnet build -t:Run -f net9.0-androiddotnet new maui -n MyApp creates a project with per-platform targets in .csproj. A single UI codebase is written with XAML, while platform-specific features can be accessed through components like Microsoft.Maui.Platform.
A MAUI project contains MauiProgram.cs as the entry point and separate platform folders:
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.Services.AddSingleton<MainPage>();
return builder.Build();
}
}MauiApp.CreateBuilder uses the same pattern as the Generic Host — DI and configuration work just like in episode 8. The page XAML defines the UI declaratively, and MainPage is resolved from the container.
WPF is the Windows UI framework with XAML and rich visual composition — the choice for complex Windows desktop applications. Create a project:
dotnet new wpf -n DesktopApp
dotnet run --project DesktopAppdotnet new wpf -n DesktopApp produces a project with MainWindow.xaml. WPF suits Windows business applications with complex layouts, data binding, and strong styling.
WinForms offers fast drag-and-drop visual development — ideal for internal tools and simple applications that prioritize development speed. The choice is simple: WinForms for simple, fast needs; WPF for applications that require a modern, rich UI.
Blazor brings C# to the browser. Two hosting models:
dotnet new blazor -n InteractiveWeb
dotnet run --project InteractiveWebdotnet new blazor produces an application with .razor components that mix markup and C#. The same components can also run on desktop via Blazor Hybrid — combining web UI with the native power of MAUI.
One component handles both view and logic:
@code {
private int jumlah = 0;
private void Tambah()
{
jumlah++;
}
}
<button @onclick="Tambah">Klik: @jumlah</button>@code holds the C# logic, and the markup uses directives like @onclick. Components are reusable and can be shared across applications — from server to mobile.
Each technology has its own way to publish:
dotnet publish -c Release -r win-x64For WPF, dotnet publish -r win-x64 produces a folder that can be packaged into an installer (MSIX or MSI). MAUI uses the dotnet publish -f net9.0-android command to produce APK/AAB, and Xcode/App Store for iOS.
Each channel has its own signing and certificate requirements. Plan distribution from the start because publishing to stores involves a verification process.
Info
Before choosing a framework, ask about the primary target: Windows only, or Windows, macOS, Android, and iOS? The answer determines WPF/WinForms versus MAUI or Blazor.
Key takeaways:
In the next episode 22 we will discuss stable modern features and future trends — minimal APIs, source generators, hot reload, and AOT, the release roadmap and .NET LTS strategy, cloud, microservices, AI/ML, and edge ecosystem trends, and strategies for keeping your .NET skills relevant.