Uploaded November 2026 | Updated November 2026, 4 hours ago
Last week I released the Avalonia theme engine and a load of you jumped straight on it. So this is the follow-up, covering everything I have added since.
Along the way I build a settings page that rewrites the theme at runtime, wire the tree view and the colour pickers that Avalonia 12 added into our engine, and chase down every control that was not correctly data bound. The whole theme now scales from a single value. Part of the series on building a custom Avalonia UI theme from scratch.
📌 WHAT YOU'LL LEARN
• How a single padding value can change the spacing of every control at once
• Why one base size can scale the entire UI without any render transforms
• How to switch a whole theme between square and rounded corners at runtime
• How the tree view and colour pickers from Avalonia 12 slot into a custom engine
• How to swap every font in the UI from one data bound property
• Why deleting thousands of duplicate lines made the layout bugs obvious
• How to build the next theme from a skeleton application
⏱ TIMESTAMPS
[0:14] - The theme engine is out
[0:19] - What is new in this revision
[0:43] - Why Avalonia themes stagnate
[3:17] - The theme settings page
[3:39] - Universal spacing at runtime
[4:47] - Base size scales everything
[7:09] - Making the whole UI square
[7:32] - Dark and light palettes
[8:02] - Bugs the settings page exposed
[8:48] - Changing every font at once
[9:24] - Table view and colour pickers
[10:10] - Building a skeleton theme
[11:28] - What theme comes next
🔗 LINKS & RESOURCES
▶ Full Avalonia Themes Playlist: youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
▶ Source Code (AvaloniaThemeLab): github.com/angelsix/youtube/tree/develop/AvaloniaThemeLab
▶ GitHub: github.com/angelsix
▶ Website: angelsix.com
📚 SERIES - Avalonia UI Theming
▶ Full series: youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
▶ 18 - Checkbox Control Deep Dive - youtube.com/watch?v=uIimnwjITT0
▶ 19 - Designing a Theme System From Scratch - youtube.com/watch?v=I5halHoNfH0
▶ 20 - Button Spinner XAML Anatomy - youtube.com/watch?v=WMaTbXkvm9g
▶ 21 - Buttons - youtube.com/watch?v=oKjk6pyyARI
▶ 22 - Hand Coded From Scratch - youtube.com/watch?v=rUKlQnjU0tc
▶ 23 - This Video - The new features, the runtime settings page, and what comes next
#avalonia #avaloniaui #xaml #csharp #dotnet #theming #desktopapp #mvvm
Last week I released the Avalonia theme engine and a load of you jumped straight on it. So this is the follow-up, covering everything I have added since.
Along the way I build a settings page that rewrites the theme at runtime, wire the tree view and the colour pickers that Avalonia 12 added into our engine, and chase down every control that was not correctly data bound. The whole theme now scales from a single value. Part of the series on building a custom Avalonia UI theme from scratch.
📌 WHAT YOU'LL LEARN
• How a single padding value can change the spacing of every control at once
• Why one base size can scale the entire UI without any render transforms
• How to switch a whole theme between square and rounded corners at runtime
• How the tree view and colour pickers from Avalonia 12 slot into a custom engine
• How to swap every font in the UI from one data bound property
• Why deleting thousands of duplicate lines made the layout bugs obvious
• How to build the next theme from a skeleton application
⏱ TIMESTAMPS
[0:14] - The theme engine is out
[0:19] - What is new in this revision
[0:43] - Why Avalonia themes stagnate
[3:17] - The theme settings page
[3:39] - Universal spacing at runtime
[4:47] - Base size scales everything
[7:09] - Making the whole UI square
[7:32] - Dark and light palettes
[8:02] - Bugs the settings page exposed
[8:48] - Changing every font at once
[9:24] - Table view and colour pickers
[10:10] - Building a skeleton theme
[11:28] - What theme comes next
🔗 LINKS & RESOURCES
▶ Full Avalonia Themes Playlist: youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
▶ Source Code (AvaloniaThemeLab): github.com/angelsix/youtube/tree/develop/AvaloniaThemeLab
▶ GitHub: github.com/angelsix
▶ Website: angelsix.com
📚 SERIES - Avalonia UI Theming
▶ Full series: youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
▶ 18 - Checkbox Control Deep Dive - youtube.com/watch?v=uIimnwjITT0
▶ 19 - Designing a Theme System From Scratch - youtube.com/watch?v=I5halHoNfH0
▶ 20 - Button Spinner XAML Anatomy - youtube.com/watch?v=WMaTbXkvm9g
▶ 21 - Buttons - youtube.com/watch?v=oKjk6pyyARI
▶ 22 - Hand Coded From Scratch - youtube.com/watch?v=rUKlQnjU0tc
▶ 23 - This Video - The new features, the runtime settings page, and what comes next
#avalonia #avaloniaui #xaml #csharp #dotnet #theming #desktopapp #mvvm










![Automatic Dark Mode in Avalonia From a Single Theme
I built automatic dark mode directly into my Avalonia theme engine — one theme definition that handles light and dark for you.
No duplicate styles, no manual dark one / light seven on every control. Define your colors once, and source generators + color maps automatically convert contrasts, states, and ramps between modes. And when you dont like what it picks, you can override it per-brush.
This is part of a complete series on building a fully custom Avalonia UI theme from scratch, hand-coded with zero AI assistance.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 WHAT YOULL LEARN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• How automatic dark mode works from a single theme definition
• How source generators bake light-to-dark conversion into the engine
• How to override auto colors per-brush - red in light, blue in dark
• Why fixed colors like dark one / light seven were replaced with tokens
• The new token system for theme defaults - surface, text, hover, background
• How changing one token value retints every button and label instantly
• How to scope dark mode to just one region of your UI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ TIMESTAMPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[0:00] – Automatic dark mode from a single theme
[0:35] – Fully customizable - youre not locked in
[0:44] – How its baked into the theme engine with source generators
[1:16] – Demo - red accent in light becomes blue in dark
[2:16] – Coming next - opt-out flag for static colors
[3:07] – Open source update + what changed
[3:20] – Goodbye dark one / light seven - moving to tokens
[3:54] – New token system - surface, text, hover, background defaults
[5:30] – Demo - retint every button and label from one value
[6:32] – Fixing label inheritance in partial dark regions
[7:40] – Partial dark mode - theming just one region
[9:14] – Wrap + next up - remaking the date/calendar control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 LINKS & RESOURCES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▶ Full Avalonia Themes Playlist: https://www.youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
▶ Source Code (AvaloniaThemeLab): https://github.com/angelsix/youtube/tree/develop/AvaloniaThemeLab
▶ GitHub: https://github.com/angelsix
▶ Website: https://www.angelsix.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 SERIES — Avalonia UI Theming – Hand Coded From Scratch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
01 — Setup — https://www.youtube.com/watch?v=rUKlQnjU0tc
02 — Buttons | Hand Coded From Scratch — https://www.youtube.com/watch?v=oKjk6pyyARI
03 — Button Spinner | Anatomy & Internals — https://www.youtube.com/watch?v=WMaTbXkvm9g
04 — Designing a Theme System From Scratch — https://www.youtube.com/watch?v=I5halHoNfH0
05 — Checkbox Control Deep Dive — https://www.youtube.com/watch?v=uIimnwjITT0
06 — Checkbox Styling — https://www.youtube.com/watch?v=uv1bNrfCjtY
07 — Theme Engine From Scratch — https://www.youtube.com/watch?v=NXz8hwITg5U
08 — Building a Design Token System — https://www.youtube.com/watch?v=QMVdxRZqaU8
09 — One Token System for the Entire Theme — https://www.youtube.com/watch?v=JEcD1XXIiA8
10 — Avalonia Styles Not Working? Youre Breaking This Rule — https://www.youtube.com/watch?v=OhJN8Ssp2hA
11 — Avalonia Just Got a Full Icon System — https://www.youtube.com/watch?v=N5HPe5GYCPo
12 — Breaking Every Avalonia Control On Purpose — https://www.youtube.com/watch?v=OmVFU-iowqI
13 — Avalonia Tool That Finds Bugs My Compiler Cant See — https://www.youtube.com/watch?v=WQB5kFJWRmc
14 — The Avalonia Accent System That Generates Its Own Shades — https://www.youtube.com/watch?v=YFQEVLaYk94
15 — The Color Ramp That Themes Your Whole App — https://www.youtube.com/watch?v=xhnUQOOrShs
16 — Theme Token Reduction (One File, Every Control) — https://www.youtube.com/watch?v=tg2gSQRJtmY
17 — This Video — Automatic Dark Mode From a Single Theme
#avalonia #avaloniaui #xaml #csharp #dotnet #uiux #desktopapp #softwaretutorial #coding Automatic Dark Mode in Avalonia From a Single Theme](https://i.ytimg.com/vi/m2WjfZAOUyM/mqdefault.jpg)