Prism.Avalonia
9.0.537.11130
dotnet add package Prism.Avalonia --version 9.0.537.11130
NuGet\Install-Package Prism.Avalonia -Version 9.0.537.11130
<PackageReference Include="Prism.Avalonia" Version="9.0.537.11130" />
<PackageVersion Include="Prism.Avalonia" Version="9.0.537.11130" />
<PackageReference Include="Prism.Avalonia" />
paket add Prism.Avalonia --version 9.0.537.11130
#r "nuget: Prism.Avalonia, 9.0.537.11130"
#addin nuget:?package=Prism.Avalonia&version=9.0.537.11130
#tool nuget:?package=Prism.Avalonia&version=9.0.537.11130
Prism.Avalonia
Prism.Avalonia provides your cross-platform Avalonia apps with Prism framework support so you can Navigate, create Dialog Windows and Notifications, provide Dependency Injection and internal Messaging easier than before! You will need both packages installed to get started.
Announcement!
- NEW: Official Prism.Avalonia Templates arrived!
- Prism.Avalonia v9.0.537 - Available!
- Check out the Upgrading to Prism v9.0 guide to avoid breaking changes in your apps
For more samples outside of this repo, check out:
- Avalonia Outlookish
- Learn PrismLibrary
- If you have samples, let us know and we'll feature them!
With Prism.Avalonia's logic and development approach being similar to that of Prism for WPF, so you can get started right away! Keep in mind, they are similar and not 1-to-1. Check out our Wiki and Avalonia Outlookish app for tips and tricks.
This project currently supports cross-platform Desktop applications (Windows, Linux, Mac). Support for Android, iOS, and web apps is still under evaluation; and is not 100%. Feel free to contribute and help us improve. 😃
Package Releases
Just like Prism.WPF or Prism.Maui, your project must reference both the Prism.Avalonia (Core) and Prism.DryIoc.Avalonia (IoC container) packages to work.
Package | Stable | Preview |
---|---|---|
Prism.Avalonia | ||
Prism.DryIoc.Avalonia |
Version Notice
Choose the NuGet package version that matches your Avalonia version.
Our versioning schema is based on the SemVer using the format MAJOR.MINOR.PATCH.REVISION
. The REVISION
segment indicates the Avalonia version support. For instance v9.0.537.11234
equates to, Prism v9.0.537
, Avalonia v11.2.3
, revision 4
.
Prism | Avalonia | Prism.Avalonia NuGet Package |
---|---|---|
v9.0.537 | 11.1.3 | v9.0.537.11130 (Core) (DryIoc) |
v9.0.401-pre | 11.1.1 | v9.0.401.11110-pre (Core) (DryIoc) |
v9.0.401-pre | 11.0.7 | v9.0.401.11074-pre (Core) (DryIoc) |
v9.0.271-pre | 11.0.7 | v9.0.271.11000-pre (Core) (DryIoc) |
v8.1.97 | 11.0.7 | v8.1.97.11073 (Core) (DryIoc) |
v8.1.97 | 0.10.21 | v8.1.97.1021 (Core) (DryIoc) |
Be sure to check out the ChangeLog.md and guides when upgrading your NuGet packages:
- Upgrading to Prism v9.0.x-pre
- Upgrading to Avalonia-11
- Also, the official Avalonia Upgrading from v0.10.
Contributing
See also, Contributing.md
Prism.Avalonia is an open-source project under the MIT license. We encourage community members like yourself to contribute.
You can contribute today by creating a feature request, issue, or discussion on the forum. From there we can have a brief discussion as to where this fits into the backlog priority. If this is something that fits within the Prism architecture, we'll kindly ask you to create a Pull Request. Any PR made without first having an issue/discussion may be closed.
Issues posted without a description may be closed immediately. Use the discussion boards if you have a question, not Issues.
Install
Add the Prism.Avalonia and its DryIoc packages to your project:
# Avalonia v11.1 - Latest Release
Install-Package Prism.Avalonia -Version 9.0.537.11130
Install-Package Prism.DryIoc.Avalonia -Version 9.0.537.11130
# Legacy: Avalonia v11.0
Install-Package Prism.Avalonia -Version 8.1.97.11073
Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.11073
# Legacy: Avalonia v0.10.1021
Install-Package Prism.Avalonia -Version 8.1.97.1021
Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.1021
How to use
Program.cs
The default Avalonia entrypoint Program.cs
does not need to be modified. Below is provided as a sample.
using System;
using Avalonia;
namespace SampleBaseApp;
internal sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
}
App.axaml
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SampleBaseApp.App"
xmlns:local="using:SampleBaseApp"
RequestedThemeVariant="Default">
<Application.Styles>
<FluentTheme />
</Application.Styles>
</Application>
App.axaml.cs
Notice:
We do not need the
OnFrameworkInitializationCompleted()
method. However, you must includebase.Initialize();
in theInitialize()
method to kick-start Prism.Avalonia.Also, in your
App.axaml
you no longer need to device the<Design.DataContext>
. Prism takes care of this for you! (:
using System;
using Avalonia;
using Avalonia.Markup.Xaml;
using Prism.DryIoc;
using Prism.Ioc;
using SampleBaseApp.Views;
namespace SampleBaseApp;
public partial class App : PrismApplication
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
base.Initialize(); // Required to initialize Prism.Avalonia - DO NOT REMOVE
}
protected override AvaloniaObject CreateShell()
{
Console.WriteLine("CreateShell()");
return Container.Resolve<MainWindow>();
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
// Add Services and ViewModel registrations here
Console.WriteLine("RegisterTypes()");
// Services
//// containerRegistry.RegisterSingleton<ISampleService, ISampleService>();
// Views - Region Navigation
//// containerRegistry.RegisterForNavigation<DashboardView, DashboardViewModel>();
// Dialogs
//// containerRegistry.RegisterDialog<MessageBoxView, MessageBoxViewModel>();
//// containerRegistry.RegisterDialogWindow<CustomDialogWindow>(nameof(CustomDialogWindow));
}
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
{
// Register modules
//// moduleCatalog.AddModule<DummyModule.DummyModule1>();
}
House Keeping
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. |
stable/* |
Stable release base build which shares cherry-picked merges from develop . This branch must not be deleted. |
Code of Conduct
See, Code of Conduct
Security
See, Security
Sponsored by: Suess Labs a subsidary of Xeno Innovations, Inc.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
-
net6.0
- Avalonia (>= 11.1.3)
- Avalonia.Markup.Xaml.Loader (>= 11.1.3)
- Prism.Container.DryIoc (>= 9.0.107)
- Prism.Core (>= 9.0.537)
- System.Configuration.ConfigurationManager (>= 8.0.0)
-
net7.0
- Avalonia (>= 11.1.3)
- Avalonia.Markup.Xaml.Loader (>= 11.1.3)
- Prism.Container.DryIoc (>= 9.0.107)
- Prism.Core (>= 9.0.537)
- System.Configuration.ConfigurationManager (>= 8.0.0)
-
net8.0
- Avalonia (>= 11.1.3)
- Avalonia.Markup.Xaml.Loader (>= 11.1.3)
- Prism.Container.DryIoc (>= 9.0.107)
- Prism.Core (>= 9.0.537)
- System.Configuration.ConfigurationManager (>= 8.0.0)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Prism.Avalonia:
Package | Downloads |
---|---|
Prism.DryIoc.Avalonia
This extension is used to build Prism.Avalonia applications based on DryIoc. Users must install the Prism.Avalonia NuGet package as well. |
|
Prism.Unity.Avalonia
Package Description |
|
OneWare.Essentials
Essentials Needed for One Ware Plugin Development |
|
Hypocrite.Services.Avalonia
A powerful base for Mvvm apps with Prism |
|
Abdrakov.Container.AvaloniaPrismAdapter
A lightweight container with adapter for Prism.Avalonia |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Prism.Avalonia:
Repository | Stars |
---|---|
yaobiao131/downkyicore
哔哩下载姬(跨平台版)downkyi,哔哩哔哩网站视频下载工具,支持批量下载,支持8K、HDR、杜比视界,提供工具箱(音视频提取、去水印等)。
|
|
dorisoy/Dorisoy.SMS
基于.net6.0的跨平台WPF学校信息管理系统,现代化UI界面、简单易用的功能让您完全控制管理学生、员工、用户、家长、班级、费用,收入信息、生物识别职工打卡,学生上学/离校信息推送等等, 项目使用MVVM 和Mediator设计模式。
|
Version | Downloads | Last updated |
---|---|---|
9.0.537.11130 | 2,172 | 8/24/2024 |
9.0.401.11110-pre | 1,885 | 8/4/2024 |
9.0.401.11074-pre | 133 | 7/26/2024 |
9.0.401.11000-pre | 333 | 4/28/2024 |
9.0.271.11074-pre | 201 | 4/13/2024 |
8.1.97.11073 | 11,451 | 4/28/2024 |
8.1.97.11072 | 8,603 | 1/27/2024 |
8.1.97.11000 | 8,698 | 7/5/2023 |
8.1.97.11000-rc1.1 | 814 | 6/2/2023 |
8.1.97.1021 | 2,155 | 6/1/2023 |
8.1.97.11-preview.11.8 | 131 | 5/31/2023 |
8.1.97.4-preview.11.5 | 530 | 2/8/2023 |
8.1.97.3-preview.11.4 | 152 | 2/4/2023 |
8.1.97.2 | 2,620 | 12/9/2022 |
8.1.97.1 | 913 | 12/9/2022 |
8.1.97 | 2,569 | 7/18/2022 |
7.2.0.1430 | 7,810 | 1/28/2021 |
7.2.0.1429 | 1,893 | 9/26/2020 |
7.2.0.1428 | 2,449 | 4/14/2020 |
7.2.0.1427 | 1,760 | 2/11/2020 |
7.2.0.1426 | 1,687 | 1/31/2020 |
7.2.0.1425 | 1,626 | 1/30/2020 |
7.2.0.1424 | 1,807 | 12/30/2019 |
7.2.0.1423 | 1,642 | 12/18/2019 |
7.2.0.1422 | 1,799 | 11/26/2019 |
7.2.0.1367 | 2,174 | 9/3/2019 |
7.1.0.431 | 1,799 | 6/25/2019 |
* Upgraded to support Prism v9.0.537
* Upgraded to support Avalonia v11.1.3