Zeek.Avalonia.Theming 10.0.41
Zeek.Avalonia.Theming
Zeek.Avalonia.Theming 是 Avalonia ThemeVariant 的薄集成,只负责初始主题和运行时主题切换。
安装 / 引用
<PackageReference Include="Zeek.Avalonia.Theming" />
快速开始
通过模块依赖启用默认主题服务:
public static IReadOnlyList<ModuleDependency> Dependencies =>
[ModuleDependency.Of<AvaloniaThemingModule>()];
如果注册阶段已经得到初始主题,可以额外配置:
context.ConfigureTheming(ThemeVariant.Dark);
运行时只通过 IThemeService 切换:
await themeService.SetAsync(ThemeVariant.Light);
AOT / Trim
- 使用 Avalonia 原生
ThemeVariant,不扫描程序集或反射发现主题。 - 不读取或保存主题偏好,不提供 provider、registry 或另一套样式系统。
Sample 与正式文档
../../samples/Zeek.ThemingSample/../../docs/modules/Zeek.Avalonia.Theming.md
No packages depend on Zeek.Avalonia.Theming.
.NET 10.0
- Zeek.Core (>= 10.0.41)
- Avalonia (>= 12.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.42 | 4 | 07/29/2026 |
| 10.0.41 | 15 | 07/22/2026 |
| 10.0.40 | 9 | 07/22/2026 |
| 10.0.39 | 19 | 07/19/2026 |
| 10.0.38 | 15 | 07/17/2026 |
| 10.0.37 | 1 | 07/16/2026 |
| 10.0.36 | 5 | 06/29/2026 |
| 10.0.35 | 3 | 06/29/2026 |
| 10.0.31 | 5 | 06/27/2026 |
| 10.0.30 | 1 | 06/27/2026 |
| 10.0.29 | 2 | 06/26/2026 |
| 10.0.28 | 1 | 06/26/2026 |
| 10.0.27 | 1 | 06/26/2026 |
| 10.0.26 | 3 | 06/25/2026 |