Enigma.Avalonia.Desktop
1.0.0
dotnet add package Enigma.Avalonia.Desktop --version 1.0.0
NuGet\Install-Package Enigma.Avalonia.Desktop -Version 1.0.0
<PackageReference Include="Enigma.Avalonia.Desktop" Version="1.0.0" />
<PackageVersion Include="Enigma.Avalonia.Desktop" Version="1.0.0" />
<PackageReference Include="Enigma.Avalonia.Desktop" />
paket add Enigma.Avalonia.Desktop --version 1.0.0
#r "nuget: Enigma.Avalonia.Desktop, 1.0.0"
#:package Enigma.Avalonia.Desktop@1.0.0
#addin nuget:?package=Enigma.Avalonia.Desktop&version=1.0.0
#tool nuget:?package=Enigma.Avalonia.Desktop&version=1.0.0
Enigma.Avalonia.Desktop
Enigma.Avalonia.Desktop is a control library for Avalonia 12 desktop applications: a navigation
shell, a ribbon, a docking host, typed editors, dialogs, settings cards and a sortable, filterable
collection view, all under one dark-first theme. It ships two kinds of thing, and every part of the
surface is one of them — controls are TemplatedControls styled by a single theme dictionary you
merge once into Application.Resources, and services are interfaces in
Enigma.Avalonia.Desktop.Services that you register as singletons and inject into ViewModels. Three
of the services drive a host control you place in your window and hand over at startup, and two need
the window's storage provider; past that, nothing in the library asks a ViewModel to know about a
Window.
What's new in 1.0 — first release. See RELEASENOTES.md.
Features
- Navigation shell —
NavigationViewandNavigationItemwith vertical or horizontalOrientation, a configurablePaneSize, a logo slot and footer items;INavigationServicedrives it from a ViewModel through aPageFactoryhook, with anINavigationViewModelappearing/disappearing lifecycle that can cancel a navigation, andNavigationFailedEventArgsfor diagnosing the ones that fail. - Ribbon —
Ribbon,RibbonTabandRibbonGroup, withRibbonButton,RibbonToggleButton,RibbonDropDownButtonandRibbonMenuItem. - Docking —
DockingHostand the layout tree it builds fromDockSplitContainer,DockTabGroupandDockPane, plusDockLayoutNodemodel types for describing a layout in code. - Editors —
BaseEditor<T>and fourteen typed editors covering text, multi-line text, every built-in numeric type, and byte arrays as raw, Base64 or hexadecimal text; each with a title, watermark and unit label, leading and action content slots, and a validation state surfaced as the:errorpseudo-class. - Dialogs, overlay and info bar —
ContentDialog(three configurable buttons, an icon, six size properties and aDialogResult),Overlayfor hosting arbitrary blocking content, andInfoBarwith four severities — each driven by its own service. - Settings cards —
SettingsCardandSettingsCardExpanderfor building a settings page out of labelled rows with inline controls. - Collection views —
CollectionViewSourceandCollectionViewwithSortDescriptionsorting, event-based filtering, andPropertyGroupDescriptiongrouping intoCollectionViewGroups. - File and folder pickers —
IFileDialogServiceandIFolderDialogServiceput Avalonia's storage provider behind an injectable interface, with overloads that hand back plain paths. - Theming — one merged
ResourceDictionarywith Dark and LightThemeDictionaries, a documentedEnigma*colour and brush key reference, and overrides that restyle the standard Avalonia controls to match.
Installation
dotnet add package Enigma.Avalonia.Desktop
Targets .NET 8.0 and .NET 10.0; built on Avalonia 12.1.1.
The package brings Avalonia, Avalonia.Themes.Fluent, CommunityToolkit.Mvvm and Enigma.Core
transitively. It deliberately does not bring the packages that turn those into a running
application — your app still references Avalonia.Desktop for the desktop backend, and
Avalonia.Fonts.Inter if you want the font the theme is designed around.
One transitive dependency is worth knowing about before you install. Enigma.Core brings
BouncyCastle.Cryptography, a ~4.7 MB assembly. It is there for exactly two controls —
Base64Editor and HexadecimalEditor, which encode and decode through Enigma.Core's encoding
services — so a project that never places either one still carries it, and there is no way to opt
out short of not referencing the package.
Quick start
Five steps take an empty Avalonia app to one that renders in this theme and can raise a dialog from a ViewModel.
1. Merge the theme dictionary into Application.Resources. It is a ResourceInclude, not a
StyleInclude: a StyleInclude compiles and then resolves none of the keys.
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="MyApp.App">
<Application.Styles>
<FluentTheme />
</Application.Styles>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Enigma.Avalonia.Desktop/Themes/Fluent.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
2. Register the six services as singletons.
using Enigma.Avalonia.Desktop.Services;
using Microsoft.Extensions.DependencyInjection;
services.AddSingleton<INavigationService, NavigationService>();
services.AddSingleton<IContentDialogService, ContentDialogService>();
services.AddSingleton<IOverlayService, OverlayService>();
services.AddSingleton<IInfoBarService, InfoBarService>();
services.AddSingleton<IFileDialogService, FileDialogService>();
services.AddSingleton<IFolderDialogService, FolderDialogService>();
3. Place the three host controls as the last children of the window's root Panel, so they
overlay everything the application draws.
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Enigma.Avalonia.Desktop.Controls"
xmlns:contentDialog="using:Enigma.Avalonia.Desktop.Controls.ContentDialog"
xmlns:infoBar="using:Enigma.Avalonia.Desktop.Controls.InfoBar"
x:Class="MyApp.Views.MainWindow"
Background="{DynamicResource EnigmaBackgroundBrush}">
<Panel>
<contentDialog:ContentDialog x:Name="HostDialog" />
<controls:Overlay x:Name="HostOverlay" />
<infoBar:InfoBar x:Name="HostInfoBar" />
</Panel>
</Window>
4. Hand the hosts and the storage provider over at startup, before the window is shown. A service whose host is still unregistered throws the moment a ViewModel asks it for anything.
services.GetRequiredService<IContentDialogService>().RegisterHost(mainWindow.HostDialog);
services.GetRequiredService<IOverlayService>().RegisterHost(mainWindow.HostOverlay);
services.GetRequiredService<IInfoBarService>().RegisterHost(mainWindow.HostInfoBar);
services.GetRequiredService<IFileDialogService>().SetStorageProvider(mainWindow.StorageProvider);
services.GetRequiredService<IFolderDialogService>().SetStorageProvider(mainWindow.StorageProvider);
5. Inject a service and await it. The ViewModel never sees a Window.
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Enigma.Avalonia.Desktop.Controls.ContentDialog;
using Enigma.Avalonia.Desktop.Services;
public class MainWindowViewModel : ObservableObject
{
private readonly IContentDialogService _dialogService;
public MainWindowViewModel(IContentDialogService dialogService)
{
_dialogService = dialogService;
DeleteCommand = new AsyncRelayCommand(OnDeleteAsync);
}
public AsyncRelayCommand DeleteCommand { get; }
private async Task OnDeleteAsync()
{
var result = await _dialogService.ShowAsync(dialog =>
{
dialog.Title = "Delete the project?";
dialog.PrimaryButtonText = "Delete";
dialog.CloseButtonText = "Cancel";
});
if (result == DialogResult.Primary)
{
// delete it
}
}
}
Documentation
Per-category guides — each with the controls or operations the family offers, its key types, and
copy-pasteable samples verified against the public API — live under docs/guides/ in the
repository, indexed by docs/guides/README.md. They cover theming, navigation, the ribbon, docking,
the editors, settings cards, collection views, the dialog/overlay/info-bar trio, and the file and
folder pickers.
Start with the theming guide: nothing in this library renders correctly until its theme dictionary is merged, so every other guide assumes you have done that and does not repeat it.
License
Enigma.Avalonia.Desktop is released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Avalonia (>= 12.1.1)
- Avalonia.Themes.Fluent (>= 12.1.1)
- CommunityToolkit.Mvvm (>= 8.4.2)
- Enigma.Core (>= 1.0.0)
-
net8.0
- Avalonia (>= 12.1.1)
- Avalonia.Themes.Fluent (>= 12.1.1)
- CommunityToolkit.Mvvm (>= 8.4.2)
- Enigma.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 50 | 8/3/2026 |
First release of Enigma.Avalonia.Desktop, a control library for Avalonia 12 desktop applications. Everything it ships is one of two things: a control — a TemplatedControl styled by the one theme dictionary you merge into Application.Resources — or a service you register as a singleton and inject. That covers a navigation shell, a docking host, a ribbon, fourteen typed editors, a content dialog, an overlay and an info bar, settings cards, file and folder pickers, and the CollectionView sorting, filtering and grouping subsystem, all under a Fluent theme with Dark and Light variants. Targets net8.0 and net10.0. See RELEASENOTES.md for the full details.