Custom Avalonia Themes developed by Devolutions
(Inspired by @MikeCodesDotNET's earlier draft)
This theme is currently based on Avalonia.Themes.Fluent, both as a fallback for any controls not covered yet and as starting point for our (somewhat simplified) style definitions targeting AppKit macOS look.
While we are prioritizing controls for Devolutions Remote Desktop Manager initially, the goal is to create a theme that helps all of the Avalonia community to bring a native look to their macOS apps.
- Installation
- Styled Controls
Install the MacOS.Avalonia.Theme package via NuGet:
Install-Package MacOS.Avalonia.Theme
or .NET
dotnet add package MacOS.Avalonia.Theme
In your App.axaml, replace the existing theme (e.g. <FluentTheme />
or <SimpleTheme />
) with the macOS theme:
<Application ...>
<Application.Styles>
<StyleInclude Source="avares://MacOS.Avalonia.Theme/MacOSTheme.axaml" />
</Application.Styles>
</Application>
Notes | ||
---|---|---|
✅ | ||
✅ | ||
✅ | ||
ScrollBar not done yet | ||
The editable field still has an issue, forcing the row to be slightly higher than the others | ||
✅ | ||
Vertical tabs may still need some work | ||
✅ | ||
ScrollBar for multiline text input not done yet There appears to be no easy way for styling the caret thickness and margin |
||
✅ | ||
Striped background currently cannot be rendered with rounded corners & breaks when default TreeViewItem height is altered (see comment in ThemeResources.axaml) | ||