Custom Avalonia Themes developed by Devolutions
➡️ MacOS Theme
➡️ Linux Theme
Contributors can use the SampleApp to test, debug and document styles for the various controls under each theme.
The SampleApp attaches the Avalonia Dev Tools for inspecting controls (open with F12).
We will soon start to add styles for at least some Avalonia Accelerate controls, starting with TreeDataGrid in the DevExpress theme.
To view and test Accelerate-licensed controls in the SampleApp:
- Create a
.envfile in the repository root. - Add your license key:
AVALONIA_LICENSE_KEY=your_key_here. - Rebuild the solution.
Note: If the controls don't appear or you see build errors, you may need to force a NuGet restore or invalidate your IDE caches (e.g., File > Invalidate Caches in Rider) to update the conditional package dependencies.
There is limited visual regression testing available. DemoPagea are compared against baseline screenshots in tests/Devolutions.AvaloniaControls.VisualTests/Screenshots/Baseline. Diffs for failing tests are saved to tests/Devolutions.AvaloniaControls.VisualTests/Screenshots/Test-Diffs.
- Interactive behaviours (e.g. pointerOver, popUpOpen, focus, etc.) are not tested
- Accelerate controls that depend on a licence (e.g. TreeDataGrid) are not tested
Baselines are maintained separately for each platform (macOS, Windows, Linux) due to rendering differences. When updating baselines, they only update for your current platform.
dotnet test --filter "DisplayName~VisualRegressionTests"- runs all testsdotnet test- runs all tests, plus some little unit tests (worth it for the time saved typing!)dotnet test --filter "DisplayName~DevExpress"- runs tests for all controls implemented in DevExpressdotnet test --filter "DisplayName~Button"- runs tests for Button under each of the themes it's implemented indotnet test --list-tests- lists all test cases- 🆕
scripts/test.sh [dotnet test args]- runsdotnet testand prints one deduplicated visual-regression summary at the end. It also lets you use shorthand filter values (for example--filter EditableComboinstead of--filter "DisplayName~EditableCombo").
Updating baseline screenshots when changes are intentional:
- macOS/Linux:
UPDATE_BASELINES=true dotnet test [filters] - Windows (PowerShell):
$env:UPDATE_BASELINES="true"; dotnet test [filters]; Remove-Item env:UPDATE_BASELINES - Windows (Command Prompt):
set UPDATE_BASELINES=true && dotnet test [filters] && set UPDATE_BASELINES=
🤍🖤 All tests are run for light & dark mode However to keep things reasonably quick, the dark mode test only runs if the light mode test for the same control has passed. This can lead to missed issues, when both versions have different problems. (If in doubt, update, then delete the new dark baseline shot, and run the test again (light will no longer fail, and you can see what happens in dark))
If you're an AI assistant (like GitHub Copilot or Claude Code) working on this repository, comprehensive guidelines are available in .claude/CLAUDE.md.
This includes:
- Repository structure and architecture
- Development workflows and commands
- Coding standards and best practices
- Version control rules and commit guidelines
- Custom commands for theme switching and development
