XAvalonia.Bootstrap
0.2.0
dotnet add package XAvalonia.Bootstrap --version 0.2.0
NuGet\Install-Package XAvalonia.Bootstrap -Version 0.2.0
<PackageReference Include="XAvalonia.Bootstrap" Version="0.2.0" />
<PackageVersion Include="XAvalonia.Bootstrap" Version="0.2.0" />
<PackageReference Include="XAvalonia.Bootstrap" />
paket add XAvalonia.Bootstrap --version 0.2.0
#r "nuget: XAvalonia.Bootstrap, 0.2.0"
#:package XAvalonia.Bootstrap@0.2.0
#addin nuget:?package=XAvalonia.Bootstrap&version=0.2.0
#tool nuget:?package=XAvalonia.Bootstrap&version=0.2.0
XAvalonia
A plugin-based, extensible desktop shell framework built on Avalonia UI — inspired by Gemini for WPF, reimagined for cross-platform .NET.
What is XAvalonia?
XAvalonia is a shell framework for building extensible desktop applications on top of Avalonia UI. It provides the plumbing — docking layout, menus, status bar, panels, documents — so that each feature of your application lives in an isolated, self-describing plugin.
The architecture is directly inspired by the Eclipse/Gemini model:
- The shell owns the window, the dock, and the service bus.
- Plugins discover each other at runtime, register services, and contribute UI via a clean contribution API.
- Your
Program.csis a single line.
[STAThread]
public static void Main(string[] pArgs) => ShellApplication.Run(pArgs);
Features
| 🧩 Plugin system | Runtime assembly scanning, two-phase lifecycle, automatic dependency tracking |
| 🪟 Docking layout | Full dock/float/split via Dock.Avalonia |
| 📄 Document tabs | Open, activate, and close tabbed documents from any plugin |
| 🔧 Tool panels | Register Left / Right / Bottom / Top panels dynamically |
| 📋 Menu contributions | Add top-level menus and items with commands, icons, and keyboard shortcuts |
| 📊 Status bar | Left/right aligned items, updated at runtime |
| ⚙️ Configuration | Declarative JSON binding via [TechConfiguration] / [UserConfiguration] attributes |
| 🔌 NuGet update checks | Plugins can expose a NuGetPackageId for live update detection |
| 📦 DI built-in | Microsoft.Extensions.DependencyInjection throughout |
| 🎨 Fluent theme | Avalonia Fluent Dark theme out of the box |
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ XAvalonia.SampleApp │
│ (entry point — 1 line) │
└──────────────────────────┬──────────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────────┐
│ XAvalonia.Bootstrap │
│ ShellApplication · PluginLoader · PluginManager · Services │
└──────────────────────────┬──────────────────────────────────────┘
│ depends on
┌──────────────────────────▼──────────────────────────────────────┐
│ XAvalonia.Shell.Abstractions │
│ IPlugin · IMenuService · IDocumentService · IToolPanelService │
│ IStatusBarService · IMainWindowService · ILogService … │
└─────────────────────────────────────────────────────────────────┘
▲
┌────────────┼────────────┐
│ │ │
┌─────────┴──┐ ┌──────┴─────┐ ┌──┴──────────┐
│ MainWindow │ │PluginBrowser│ │ YourPlugin │
│ Plugin │ │ Plugin │ │ (future) │
└────────────┘ └────────────┘ └─────────────-┘
Plugins only ever reference XAvalonia.Shell.Abstractions — zero coupling to the framework internals.
Default layout
┌─────────────────────────────────────────────────────┐
│ File View Help │ ← Menu bar
├──────────┬──────────────────────────┬───────────────┤
│ │ [ Doc 1 ] [ Doc 2 ] … │ │
│ ├──────────────────────────┤ │
│ Explorer │ Document content… │ Properties │
│ ├──────────────────────────┤ │
│ │ Output │ │
│ │ [INFO] Application … │ │
├──────────┴──────────────────────────┴───────────────┤
│ Ready No file open Ln 1 │ ← Status bar
└─────────────────────────────────────────────────────┘
Getting Started
Prerequisites
Run the sample app
git clone https://github.com/your-org/xavalonia.git
cd xavalonia
dotnet run --project XAvalonia.SampleApp
Writing a Plugin
A plugin is a class library that references only XAvalonia.Shell.Abstractions.
1. Implement IPlugin
public sealed class HelloPlugin : IPlugin
{
public string Id => "com.example.hello";
public string Name => "Hello Plugin";
public string Description => "A minimal XAvalonia plugin.";
public Version CurrentVersion => new(1, 0, 0);
public string? NuGetPackageId => null;
public IReadOnlyList<Type> ProvidedServices => [];
public void RegisterServices(IServiceCollection pServices)
{
pServices.AddSingleton<HelloDocumentViewModel>();
}
public void Initialize(IPluginServiceManager pServiceManager)
{
IMenuService lMenus = pServiceManager.RequestService<IMenuService>();
IDocumentService lDocs = pServiceManager.RequestService<IDocumentService>();
lMenus.RegisterMenuItem("menu.file", new MenuItemContribution
{
Id = "menu.file.hello",
Header = "_Hello World",
Order = 100,
Command = ReactiveCommand.Create(() =>
lDocs.RegisterDocument(new DocumentContribution
{
Id = "doc.hello",
Title = "Hello",
ViewModel = pServiceManager.RequestService<HelloDocumentViewModel>()
}))
});
}
}
2. Drop the DLL into the plugins directory
Point pluginsDirectory in technical_configuration.json to the folder containing your plugin's output.
XAvalonia scans all assemblies at startup — no manual registration required.
{
"pluginsDirectory": "C:\\MyApp\\Plugins"
}
3. Follow the View convention
The ViewLocator resolves views by naming convention:
| ViewModel | → View |
|---|---|
My.Plugin.ViewModels.HelloDocumentViewModel |
My.Plugin.Views.HelloDocumentView |
Project Structure
XAvalonia/
├── XAvalonia.Shell.Abstractions/ ← Plugin contract (no UI deps)
├── XAvalonia.Bootstrap/ ← Framework core & services
├── XAvalonia.MainWindow/ ← Default dock layout plugin
├── XAvalonia.SampleApp/ ← Minimal entry-point app
└── Plugins/
├── XAvalonia.PluginBrowser/ ← Browse & update plugins
├── XAvalonia.LogViewer/ ← Output panel
└── XAvalonia.Splashscreen/ ← Startup splash screen
Key Dependencies
| Package | Version | Role |
|---|---|---|
| Avalonia | 11.3 | Cross-platform UI framework |
| Dock.Avalonia | 11.3 | Docking layout engine |
| CommunityToolkit.Mvvm | 8.4 | MVVM source generators |
| Microsoft.Extensions.DependencyInjection | 8.0 | IoC container |
Roadmap
- Add a screenshot / GIF demo
- NuGet package for
XAvalonia.Shell.Abstractions - Theming API (light / dark / custom)
- Plugin marketplace integration
- Persistent user layout per plugin
Acknowledgements
Inspired by Gemini — the excellent WPF shell framework by @tgjones. XAvalonia brings the same plugin-first philosophy to cross-platform desktop development via Avalonia UI.
License
MIT — see 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 was computed. 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. |
-
net8.0
- Avalonia (>= 11.3.11)
- Avalonia.Desktop (>= 11.3.11)
- Avalonia.Fonts.Inter (>= 11.3.11)
- Avalonia.ReactiveUI (>= 11.3.8)
- Avalonia.Themes.Fluent (>= 11.3.11)
- CommunityToolkit.Mvvm (>= 8.4.2)
- Dock.Avalonia (>= 11.3.11.22)
- Dock.Avalonia.Themes.Fluent (>= 11.3.11.22)
- Dock.Model.ReactiveUI (>= 11.3.11.22)
- Material.Avalonia (>= 3.14.2)
- Microsoft.Extensions.DependencyInjection (>= 10.0.12)
- XAvalonia.Shell.Abstractions (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.