E005

Avalonia UI: One App, Multiple Platforms

· 1:52

Explore cross-platform desktop development with Avalonia UI and AvaloniaWeather, combining C#, XAML, MVVM, Semi.Avalonia, localization, and weather data.

Avalonia UI: One App, Multiple Platforms cover

PRESS PLAY. FIND AN IDEA.

Listen to the episode

Show Notes

One codebase. Multiple desktop platforms.

Avalonia UI makes it possible to build modern desktop applications for Windows, macOS, and Linux using C# and XAML.

In this episode of the TSJDEV Apps Podcast, Thomas Sebastian Jensen introduces Avalonia UI through his open-source AvaloniaWeather application.

Discover how MVVM, reusable services, modern styling, and localization come together in a practical cross-platform desktop project.

In this episode

  • What Avalonia UI is and when to consider it.
  • Building desktop applications with C# and XAML.
  • Structuring applications with MVVM.
  • Using Semi.Avalonia for modern styling.
  • Integrating weather data through OpenWeatherMapSharp.

Coming next

Automating .NET MAUI Android builds with GitHub Actions.

TSJDEV Apps Podcast - Short Episodes. Big Developer Ideas.

Full Transcript

What if you could build a modern desktop application once and run it on Windows, macOS, and Linux?

Welcome to the TSJDEV Apps Podcast! Short Episodes. Big Developer Ideas.

I’m Thomas Sebastian Jensen, and today we’re exploring Avalonia UI.

If you’ve worked with WPF or XAML-based applications, Avalonia might feel surprisingly familiar.

It’s an open-source, cross-platform UI framework that allows developers to build applications using C# and XAML.

And unlike traditional Windows-only desktop frameworks, Avalonia supports multiple operating systems.

To explore its capabilities, I built a weather application called AvaloniaWeather.

The application displays current weather conditions, forecasts, and air-quality information.

But the interesting part isn’t really the weather.

It’s the architecture behind the application.

The project uses the MVVM pattern to separate interface logic from application behavior.

A dedicated service layer communicates with the weather API, while ViewModels prepare the information for the user interface.

For the visual design, I used Semi.Avalonia, which provides modern controls, styling, and support for light and dark themes.

The application also supports localization and different measurement units.

And the weather data comes through OpenWeatherMapSharp, a .NET library I developed for working with the OpenWeatherMap API.

What’s the takeaway?

Avalonia can be an excellent option when you want to build modern desktop applications without maintaining a separate interface for every operating system.

If you’re already comfortable with C# and MVVM, it’s definitely worth exploring.

But building an application is only half the story.

How do we automate the process of building and distributing it?

Next time, we’ll explore GitHub Actions and automated Android builds.

Stay curious, keep experimenting, and keep building!

Links & Resources