XAvalonia.MainWindow 0.2.0

dotnet add package XAvalonia.MainWindow --version 0.2.0
                    
NuGet\Install-Package XAvalonia.MainWindow -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XAvalonia.MainWindow" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XAvalonia.MainWindow" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="XAvalonia.MainWindow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XAvalonia.MainWindow --version 0.2.0
                    
#r "nuget: XAvalonia.MainWindow, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XAvalonia.MainWindow@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XAvalonia.MainWindow&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=XAvalonia.MainWindow&version=0.2.0
                    
Install as a Cake Tool

XAvalonia

A plugin-based, extensible desktop shell framework built on Avalonia UI — inspired by Gemini for WPF, reimagined for cross-platform .NET.

.NET 8 Avalonia 11 License: MIT Platform


XAvalonia Screenshot


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.cs is 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.0 0 10/12/2026
0.1.0 47 10/9/2026