Uploaded September 2019 | Updated September 2026, 2 weeks ago
Buy the book! amzn.to/2PFyTNT
Browse my Amazon Store amazon.co.uk/shop/angelsix
Would I recommend
- Yes
Recommended Skill Level
- Intermediate
- I would recommend already knowing DI, have used it, and found your own way to make it work for you first, before reading how it was designed to be used. You should find yourself using a service locator pattern due to the limitations of DI in stateful applications.
Talks about
- Pure DI, composition root, dependency inversion principle, factories, adapters, aggregates, decorators, SOLID
- Methods of injection (constructor, property or method)
- Common mistakes, misconceptions and anti-patterns
- Main 3 concepts of DI, composition, life-cycle and interception
Knowledge gained
- Main thing I gained knowledge of importance specifically of having all concrete implementations "constructed" by the object graph and life-cycles managed by composition root
- Re-enforced many principles and techniques I already use, so now I know names for some styles of code I write, and that those styles are known good principles
Pros
- Well structured, written and explained and easy to read
- Good reference book for all current DI knowledge
- Shows various ways of doing DI using 3 popular containers
- Has real-world examples of code
Cons
- Personally don't like some concepts used in the DI world
- Eludes to the one reason I brought the book, to use DI in a stated application (WPF)
- Not convinced on the level of SRP taken too strictly, splitting classes and interfaces too small so they fit with DI, not so much because it really makes more sense in your application to do so
Buy the book! amzn.to/2PFyTNT
Browse my Amazon Store amazon.co.uk/shop/angelsix
Would I recommend
- Yes
Recommended Skill Level
- Intermediate
- I would recommend already knowing DI, have used it, and found your own way to make it work for you first, before reading how it was designed to be used. You should find yourself using a service locator pattern due to the limitations of DI in stateful applications.
Talks about
- Pure DI, composition root, dependency inversion principle, factories, adapters, aggregates, decorators, SOLID
- Methods of injection (constructor, property or method)
- Common mistakes, misconceptions and anti-patterns
- Main 3 concepts of DI, composition, life-cycle and interception
Knowledge gained
- Main thing I gained knowledge of importance specifically of having all concrete implementations "constructed" by the object graph and life-cycles managed by composition root
- Re-enforced many principles and techniques I already use, so now I know names for some styles of code I write, and that those styles are known good principles
Pros
- Well structured, written and explained and easy to read
- Good reference book for all current DI knowledge
- Shows various ways of doing DI using 3 popular containers
- Has real-world examples of code
Cons
- Personally don't like some concepts used in the DI world
- Eludes to the one reason I brought the book, to use DI in a stated application (WPF)
- Not convinced on the level of SRP taken too strictly, splitting classes and interfaces too small so they fit with DI, not so much because it really makes more sense in your application to do so




![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)





