.NET 6.0 .NET Core 3.1
This is a prerelease version of Prism.Avalonia.
dotnet add package Prism.Avalonia --version
NuGet\Install-Package Prism.Avalonia -Version
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="Prism.Avalonia" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Prism.Avalonia --version
#r "nuget: Prism.Avalonia,"
#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.
// Install Prism.Avalonia as a Cake Addin
#addin nuget:?package=Prism.Avalonia&version=

// Install Prism.Avalonia as a Cake Tool
#tool nuget:?package=Prism.Avalonia&version=


Prism.Avalonia provides your Avalonia apps with Prism framework support so you can navigate and perform dependency injection easier than before. You will need both packages installed to get started.

With Prism.Avalonia's logic and development approach being similar to that of Prism for WPF, you can get started right away! Keep in mind, they are similar and not 1-to-1.

Package Stable Preview
Prism.Avalonia Prism.Avalonia NuGet Badge Prism.Avalonia NuGet Badge
Prism.DryIoc.Avalonia Prism.DryIoc.Avalonia NuGet Badge Prism.DryIoc.Avalonia NuGet Badge

Version Notice

Choose the NuGet package version that matches your Avalonia version.

Avalonia Version NuGet Package
11.0 Preview 4
11.0 Preview 5 (COMING SOON)

Be sure to check out the and when upgrading your NuGet packages


Add the Prism.Avalonia and its DryIoc packages to your project:

Install-Package Prism.Avalonia -Version
Install-Package Prism.DryIoc.Avalonia -Version

How to use


public class App : PrismApplication
    public static bool IsSingleViewLifetime =>
            .Any(a => a == "--fbdev" || a == "--drm");

    public static AppBuilder BuildAvaloniaApp() =>

    public override void Initialize()
        base.Initialize();              // <-- Required

    protected override void RegisterTypes(IContainerRegistry containerRegistry)
        // Register Services
        containerRegistry.Register<IRestService, RestService>();

        // Views - Generic

        // Views - Region Navigation
        containerRegistry.RegisterForNavigation<DashboardView, DashboardViewModel>();
        containerRegistry.RegisterForNavigation<SettingsView, SettingsViewModel>();
        containerRegistry.RegisterForNavigation<SidebarView, SidebarViewModel>();

    protected override AvaloniaObject CreateShell()
        if (IsSingleViewLifetime)
            return Container.Resolve<MainControl>(); // For Linux Framebuffer or DRM
            return Container.Resolve<MainWindow>();

    protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
        // Register modules

    /// <summary>Called after <seealso cref="Initialize"/>.</summary>
    protected override void OnInitialized()
      // Register initial Views to Region.
      var regionManager = Container.Resolve<IRegionManager>();
      regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(DashboardView));
      regionManager.RegisterViewWithRegion(RegionNames.SidebarRegion, typeof(SidebarView));


Your default Avalonia Program.cs file does not need modified. Below is provided as a sample.

public static class Program
    public static AppBuilder BuildAvaloniaApp() =>
            .With(new X11PlatformOptions
                EnableMultiTouch = true,
                UseDBusMenu = true
            .With(new Win32PlatformOptions { AllowEglInitialization = true })

    static int Main(string[] args)
        double GetScaling()
            var idx = Array.IndexOf(args, "--scaling");
            if (idx != 0 && args.Length > idx + 1 &&
                double.TryParse(args[idx + 1], NumberStyles.Any, CultureInfo.InvariantCulture, out var scaling))
                return scaling;
            return 1;

        var builder = BuildAvaloniaApp();
        if (args.Contains("--fbdev"))
            return builder.StartLinuxFbDev(args, scaling: GetScaling());
        else if (args.Contains("--drm"))
            return builder.StartLinuxDrm(args, scaling: GetScaling());
            return builder.StartWithClassicDesktopLifetime(args);

    static void SilenceConsole()
        new Thread(() =>
            Console.CursorVisible = false;
            while (true)
        { IsBackground = true }.Start();

Branching Strategy

Below is a basic branching hierarchy and strategy.

Branch Purpose
master All releases are tagged published using the master branch
develop The default & active development branch. When a feature set is completed and ready for public release, the develop branch will be merged into master and a new NuGet package will be published.
feature/* New feature branch. Once completed, it is merged into develop and the branch must be deleted.


Prism.Avalonia is an open-source project under the MIT license. We encourage community members like yourself to contribute.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Prism.Avalonia:

Package Downloads

This extension is used to build Prism.Avalonia applications based on DryIoc. Users must install the Prism.Avalonia NuGet package as well.


Package Description


Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 116 2/8/2023 58 2/4/2023 675 12/9/2022 247 12/9/2022
8.1.97 1,102 7/18/2022 5,829 1/28/2021 1,036 9/26/2020 1,472 4/14/2020 866 2/11/2020 810 1/31/2020 746 1/30/2020 1,003 12/30/2019 868 12/18/2019 1,011 11/26/2019 1,227 9/3/2019 821 6/25/2019

* Upgraded to support Avalonia v11.0.0-preview5