Uploaded September 2019 | Updated September 2026, 3 weeks ago
In the biggest turning point of my life so far, find out why I gave up earning 4 figures a week, to earning nothing at all, because it felt right.
Support me in my journey to giving back to the industry all my knowledge and helping the world with what I do. Spreading knowledge to those who cannot afford an education, and helping those who want to better themselves.
Merchandise
teespring.com/stores/angelsix
My Setup & Recommendations
amazon.co.uk/shop/angelsix
Live Chat at Discord
discordapp.com/invite/eHr5BMk
Source Code
github.com/angelsix/blueberry
Video Playlist
youtube.com/playlist?list=PLrW43fNmjaQU8lQZKLeNbopAoH0isefhk
Support what I do and pay for me to survive
angelsix.com/donate
Diabetes awareness
diabetes.org.uk
In the biggest turning point of my life so far, find out why I gave up earning 4 figures a week, to earning nothing at all, because it felt right.
Support me in my journey to giving back to the industry all my knowledge and helping the world with what I do. Spreading knowledge to those who cannot afford an education, and helping those who want to better themselves.
Merchandise
teespring.com/stores/angelsix
My Setup & Recommendations
amazon.co.uk/shop/angelsix
Live Chat at Discord
discordapp.com/invite/eHr5BMk
Source Code
github.com/angelsix/blueberry
Video Playlist
youtube.com/playlist?list=PLrW43fNmjaQU8lQZKLeNbopAoH0isefhk
Support what I do and pay for me to survive
angelsix.com/donate
Diabetes awareness
diabetes.org.uk
![Avalonia Styles Not Working? Youre Breaking This Rule
Your Avalonia styles write correctly, apply cleanly — and do absolutely nothing. No error.
No warning. Just silence. This is what happens when one rule gets broken inside a Control
Template, and it took a deep dive into Avalonias full binding precedence order to understand
why.
In this episode were finishing the Button Spinner styling — but the real story is discovering
that a single Binding inside the default control template was silently blocking every style
override we tried to write. We dig into the full priority order, document it properly, and
rebuild the Button Spinner cleanly from there.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 WHAT YOULL LEARN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Avalonias full binding precedence order — Animation → Local Value → Style Trigger →
TemplateBinding → Style Setter → Inherited → Default
• The rule you must never break inside a Control Template — and what silently breaks when
you do
• Why using a regular Binding inside a Control Template blocks all style overrides forever
• How to fix it: moving the offending property to a Style Setter instead
• Cleaning up duplicate stream geometries — replacing two separate paths with a single arrow
and RenderTransform
• Removing all hardcoded MinWidth, padding, and icon sizes — wiring everything through the
token system
• A new binding priority reference document, available on GitHub
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ TIMESTAMPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[0:00] – Introduction & series progress overview
[3:00] – Reviewing the Button Spinner control template
[7:02] – Cleaning up the Repeat Button control theme
[10:39] – Margin Multiplier Converter & Stream Geometry tasks
[14:36] – Removing the unnecessary control theme
[17:25] – The rule you must never break inside a Control Template
[18:00] – Avalonias binding precedence order, explained
[19:31] – The binding priority reference document
[22:52] – Reviewing the cleaned-up styles
[24:57] – Final cleanup: padding, paths, and icon sizing
[29:48] – Wrap-up
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 LINKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▶ Ep 1 – Setup: https://www.youtube.com/watch?v=rUKlQnjU0tc
▶ Ep 2 – Buttons: https://www.youtube.com/watch?v=oKjk6pyyARI
▶ Ep 3 – Button Spinner Anatomy: https://www.youtube.com/watch?v=WMaTbXkvm9g
▶ Ep 4 – Designing a Theme System: https://www.youtube.com/watch?v=I5halHoNfH0
▶ Ep 5 – Checkbox Deep Dive: https://www.youtube.com/watch?v=uIimnwjITT0
▶ Ep 6 – Checkbox Styling: https://www.youtube.com/watch?v=uv1bNrfCjtY
▶ Ep 7 – Theme Engine From Scratch: https://www.youtube.com/watch?v=NXz8hwITg5U
▶ Ep 8 – Design Token System: https://www.youtube.com/watch?v=QMVdxRZqaU8
▶ Ep 9 – Surgical Legacy Code Removal: https://www.youtube.com/watch?v=5-p_fnOi0As
▶ Ep 10 – One Token System: https://www.youtube.com/watch?v=JEcD1XXIiA8
📺 Full Series Playlist: https://www.youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
💾 Source Code & Binding Priority Doc: https://github.com/angelsix/youtube/tree/develop/AvaloniaThemeLab
🌐 AngelSix: https://www.angelsix.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📺 SERIES: Avalonia UI Theming – Hand Coded From Scratch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#avalonia #avaloniaui #xaml #csharp #dotnet #uiux #desktopapp #softwaretutorial #coding Avalonia Styles Not Working? Youre Breaking This Rule](https://i.ytimg.com/vi/OhJN8Ssp2hA/mqdefault.jpg)






![Building a Design Token System | Dev + AI
The theme engine is live — now it needs a proper foundation. In this episode I work through
the design of a complete design token system: the minimal, compact set of values that define
every visual property in a theme. Colours, spacing, radius, stroke, scaling — all architected
from first principles.
And yes, I used AI. Not to write the code — but as a collaborator in the design process.
The human makes every decision. The AI challenges, refines, and fills gaps. This is what
correct AI usage looks like: not vibe coding, not outsourcing — genuine engineering with a
powerful tool in your hands.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 WHAT YOULL LEARN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• How the new source generator eliminates manual theme compilation — with full IntelliSense
• What a design token system actually is and why it matters for scalable UI theming
• Foundation tokens vs semantic tokens — and how the two layers interact
• Semantic colour naming: Surface, On-Surface, Accent, and why background/foreground falls short
• How a single BaseSize value scales every margin, padding, font and spacing proportionally
• Defining overlay layers for hover, pressed, and disabled states without hardcoding values
• How to use AI as a design collaborator — prompting, pushing back, and staying in control
• Why AI loses context over long sessions and how to manage it without losing your work
• The final locked design token plan — ready for implementation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ TIMESTAMPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[0:00] – Introduction & recap of the new theme engine
[0:40] – Installing the Angel6.ThemeEngine NuGet package
[1:19] – Defining a theme class with the [Theme] attribute
[1:49] – Injecting ThemeContext via dependency injection
[2:48] – Theme class properties in practice
[4:54] – Using theme: prefix in XAML with full IntelliSense
[6:10] – Source generator demo — instantaneous updates, no recompile
[7:55] – Why we need a design token system — entering AI collaboration
[9:28] – AI names it: design token system and confirms the concept
[11:56] – AIs first proposed architecture: colours, sizing, radius
[14:16] – Pushing back — more accent colours, base size scaling, real zoom
[17:20] – AIs revised plan: semantic colours, UI zoom, proportional scaling
[19:06] – AI creates the plan file using its planning skill
[22:10] – Brainstorming plan locked in the /plans folder
[25:06] – Closing questions: spacing levels, radius, overlays, accent derivation
[27:04] – AIs response — overlay layers, scale implementation, pastel accents
[30:00] – Further feedback: base size as derived properties, not render transform
[33:09] – Agreeing on scale implementation approach
[34:38] – Locking in the accent colour palette values
[36:27] – AI refines the plan with strong opinions acknowledged
[39:12] – Plan locked — ready for implementation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 LINKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▶ Part 1 – Setup: https://www.youtube.com/watch?v=rUKlQnjU0tc
▶ Part 2 – Buttons: https://www.youtube.com/watch?v=oKjk6pyyARI
▶ Part 3 – Button Spinner Anatomy: https://www.youtube.com/watch?v=WMaTbXkvm9g
▶ Part 4 – Designing a Theme System: https://www.youtube.com/watch?v=I5halHoNfH0
▶ Part 5 – Checkbox Anatomy: https://www.youtube.com/watch?v=uIimnwjITT0
▶ Part 6 – Checkbox Styling: https://www.youtube.com/watch?v=uv1bNrfCjtY
▶ Part 7 – Theme Engine From Scratch: https://www.youtube.com/watch?v=NXz8hwITg5U
📺 Full Series Playlist: https://www.youtube.com/playlist?list=PLrW43fNmjaQVE2vDBeWD8QYIm06w6bKyO
💾 Source Code: https://github.com/angelsix/youtube/tree/develop/AvaloniaThemeLab
🌐 AngelSix: https://www.angelsix.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📺 SERIES: Avalonia UI Theming – Hand Coded From Scratch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#avalonia #avaloniaui #xaml #csharp #dotnet #uiux #desktopapp #softwaretutorial #coding Building a Design Token System | Dev + AI](https://i.ytimg.com/vi/QMVdxRZqaU8/mqdefault.jpg)


