{"id":14965100,"url":"https://github.com/avaloniacommunity/prism.avalonia","last_synced_at":"2025-05-16T03:06:00.056Z","repository":{"id":41144697,"uuid":"231124956","full_name":"AvaloniaCommunity/Prism.Avalonia","owner":"AvaloniaCommunity","description":"Prism Avalonia UI framework. Super charge your cross-platform apps with IoC, navigation, and more! Sponsored by Suess Labs. Prism is based on Microsoft patterns and practices.","archived":false,"fork":false,"pushed_at":"2025-04-21T16:21:43.000Z","size":1366,"stargazers_count":347,"open_issues_count":9,"forks_count":44,"subscribers_count":13,"default_branch":"develop","last_synced_at":"2025-05-16T03:05:59.003Z","etag":null,"topics":["avalonia","csharp","dependency-injection","dotnet","dotnetcore","mvvm","net6","net7","net8","prism","prismavalonia","suesslabs","xeno-innovations"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Prism.Avalonia/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvaloniaCommunity.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":".github/Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/Code-of-Conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/Security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-31T17:22:40.000Z","updated_at":"2025-05-14T00:39:12.000Z","dependencies_parsed_at":"2025-04-15T09:32:48.576Z","dependency_job_id":null,"html_url":"https://github.com/AvaloniaCommunity/Prism.Avalonia","commit_stats":{"total_commits":353,"total_committers":15,"mean_commits":"23.533333333333335","dds":0.2152974504249292,"last_synced_commit":"ac08916293265b10df9b7080602219a468c49bac"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaCommunity%2FPrism.Avalonia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaCommunity%2FPrism.Avalonia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaCommunity%2FPrism.Avalonia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaCommunity%2FPrism.Avalonia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvaloniaCommunity","download_url":"https://codeload.github.com/AvaloniaCommunity/Prism.Avalonia/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia","csharp","dependency-injection","dotnet","dotnetcore","mvvm","net6","net7","net8","prism","prismavalonia","suesslabs","xeno-innovations"],"created_at":"2024-09-24T13:34:13.282Z","updated_at":"2025-05-16T03:06:00.039Z","avatar_url":"https://github.com/AvaloniaCommunity.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prism.Avalonia\n\n\u003e ## Announcement\n\u003e\n\u003e **Prism.Avalonia** is officially moving to  [Prism Library](https://github.com/PrismLibrary/Prism)!\u003cbr /\u003e\n\u003e _Follow the [PR](https://github.com/PrismLibrary/Prism/pull/3127) for more information._\n\u003e\n\u003e Until full integration, keep reaching out on this site.\n\u003e \n\u003e Thank you all for helping to mature and make this project into what it is today. I look forward to continuing efforts on Prism Avalonia as part of the official package.\n\u003e\n\u003e _See you over there for future releases_!\n\u003e\n\u003e `- Damian`\n\u003e\n\n\u003ccenter\u003e\n\n![Logo](https://raw.githubusercontent.com/AvaloniaCommunity/Prism.Avalonia/develop/images/Prism.Avalonia.png)\n\u003c/center\u003e\n\n [Prism.Avalonia](https://github.com/AvaloniaCommunity/Prism.Avalonia) provides your cross-platform [Avalonia](https://avaloniaui.net/) apps with [Prism library](https://github.com/PrismLibrary/Prism) support so you can **Navigate**, create **Dialog Windows** and **Notifications**, provide **Dependency Injection** and internal **Messaging** easier than before!  To help get started, check out the _[official Prism.Avalonia Templates](https://github.com/SuessLabs/Prism.Avalonia.Templates)_ for Visual Studio.\n\n**For more samples outside of this repo, check out:**\n\n* [Avalonia Outlookish](https://github.com/DamianSuess/Learn.PrismAvaloniaOutlookish)\n* [Learn PrismLibrary](https://github.com/DamianSuess/Learn.PrismLibrary)\n* _If you have samples, let us know and we'll feature them!_\n\n\u003c!-- ![Sample Outlookish](logo/Sample-Outlookish.png) --\u003e\n![Sample Outlookish](https://raw.githubusercontent.com/AvaloniaCommunity/Prism.Avalonia/master/images/Sample-Outlookish.png)\n\nPrism.Avalonia's logic and development approach is **similar** to that of [Prism for WPF](https://github.com/PrismLibrary/Prism/) so can get started right away! Keep in mind, they are _similar_ and not 1-to-1. Check out our [Wiki](https://github.com/AvaloniaCommunity/Prism.Avalonia/wiki) and [Avalonia Outlookish](https://github.com/DamianSuess/Learn.PrismAvaloniaOutlookish) app for tips and tricks.\n\nThis 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. 😃\n\n## Package Releases\n\nJust like _Prism.WPF or Prism.Maui_, your project must reference both the **Prism.Avalonia** (_Core_) and **Prism.DryIoc.Avalonia** (_IoC container_) packages to work.\n\n\u003c!--\nOLD - BuildStats.info is defunct\nNew - Shields.io\n* Before: https://buildstats.info/nuget/Prism.Avalonia?dWidth=70\u0026includePreReleases=false\nAfter:\n* Current: https://img.shields.io/nuget/v/Prism.Avalonia\n* Preview: https://img.shields.io/nuget/vpre/Prism.Avalonia\n* Downloads: https://img.shields.io/nuget/dt/Prism.Avalonia\n--\u003e\n| Package | Stable | Preview\n|-|-|-|\n| Prism.Avalonia | [![Prism.Avalonia NuGet Badge](https://img.shields.io/nuget/v/Prism.Avalonia)](https://www.nuget.org/packages/Prism.Avalonia/) | [![Prism.Avalonia NuGet Badge](https://img.shields.io/nuget/vpre/Prism.Avalonia)](https://www.nuget.org/packages/Prism.Avalonia/)\n| Prism.DryIoc.Avalonia | [![Prism.DryIoc.Avalonia NuGet Badge](https://img.shields.io/nuget/v/Prism.DryIoc.Avalonia)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/) | [![Prism.DryIoc.Avalonia NuGet Badge](https://img.shields.io/nuget/vpre/Prism.DryIoc.Avalonia)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/)\n\n### Version Notice\n\nChoose the NuGet package version that matches your Avalonia version.\n\nOur [versioning schema](https://github.com/AvaloniaCommunity/Prism.Avalonia/wiki/Versioning-Schema) is based on the [SemVer](https://semver.org/) 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`.\n\n| Prism | Avalonia | Prism.Avalonia NuGet Package\n|-|-|-\n| v8.1.97       | **11.0.7**  | v8.1.97.11073 ([Core](https://www.nuget.org/packages/Prism.Avalonia/8.1.97.11073)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/8.1.97.11073))\n| v8.1.97       | **0.10.21** | v8.1.97.1021 ([Core](https://www.nuget.org/packages/Prism.Avalonia/8.1.97.1021)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/8.1.97.1021))\n\nBe sure to check out the [ChangeLog.md](ChangeLog.md) and guides when upgrading your NuGet packages:\n\n* [Upgrading to Prism v9.0.x-pre](https://github.com/AvaloniaCommunity/Prism.Avalonia/wiki/Upgrading-to-Prism-v9.0)\n* [Upgrading to Avalonia-11](Upgrading-to-Avalonia-11.md)\n* Also, the official [Avalonia Upgrading from v0.10](https://docs.avaloniaui.net/docs/next/stay-up-to-date/upgrade-from-0.10).\n\n## Contributing\n\nSee also, [Contributing.md](.github/Contributing.md)\n\nPrism.Avalonia is an open-source project under the MIT license. We encourage community members like yourself to contribute.\n\nYou 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.\n\nIssues posted without a description may be closed immediately. Use the discussion boards if you have a question, not Issues.\n\n## Install\n\nAdd the Prism.Avalonia and its DryIoc packages to your project:\n\n\u003c!--\n# Avalonia v11.1 - Latest Release\nInstall-Package Prism.Avalonia -Version 9.0.537.11130\nInstall-Package Prism.DryIoc.Avalonia -Version 9.0.537.11130\n--\u003e\n\n```powershell\n# Legacy: Avalonia v11.0\nInstall-Package Prism.Avalonia -Version 8.1.97.11073\nInstall-Package Prism.DryIoc.Avalonia -Version 8.1.97.11073\n\n# Legacy: Avalonia v0.10.1021\nInstall-Package Prism.Avalonia -Version 8.1.97.1021\nInstall-Package Prism.DryIoc.Avalonia -Version 8.1.97.1021\n```\n\n## How to use\n\n### Program.cs\n\nThe default Avalonia entrypoint `Program.cs` does not need to be modified. Below is provided as a sample.\n\n```csharp\nusing System;\nusing Avalonia;\n\nnamespace SampleBaseApp;\n\ninternal sealed class Program\n{\n  // Initialization code. Don't use any Avalonia, third-party APIs or any\n  // SynchronizationContext-reliant code before AppMain is called\n  [STAThread]\n  public static void Main(string[] args) =\u003e BuildAvaloniaApp()\n    .StartWithClassicDesktopLifetime(args);\n\n  // Avalonia configuration, don't remove; also used by visual designer.\n  public static AppBuilder BuildAvaloniaApp()\n    =\u003e AppBuilder.Configure\u003cApp\u003e()\n        .UsePlatformDetect()\n        .WithInterFont()\n        .LogToTrace();\n}\n\n```\n\n### App.axaml\n\n```xml\n\u003cApplication xmlns=\"https://github.com/avaloniaui\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n             x:Class=\"SampleBaseApp.App\"\n             xmlns:local=\"using:SampleBaseApp\"\n             RequestedThemeVariant=\"Default\"\u003e\n  \u003c!-- RequestedThemeVariant allows for the following types, \"Default\", \"Dark\", or \"Light\". --\u003e\n\n  \u003cApplication.Styles\u003e\n    \u003cFluentTheme /\u003e\n  \u003c/Application.Styles\u003e\n\u003c/Application\u003e\n```\n\n### App.axaml.cs\n\n\u003e **Notice:**\n\u003e\n\u003e We do not need the `OnFrameworkInitializationCompleted()` method. However, you must include `base.Initialize();` in the `Initialize()` method to kick-start Prism.Avalonia.\n\u003e\n\u003e Also, in your `App.axaml` you no longer need to device the `\u003cDesign.DataContext\u003e`. Prism takes care of this for you! (:\n\n```csharp\nusing System;\nusing Avalonia;\nusing Avalonia.Markup.Xaml;\nusing Prism.DryIoc;\nusing Prism.Ioc;\nusing SampleBaseApp.Views;\n\nnamespace SampleBaseApp;\n\npublic partial class App : PrismApplication\n{\n  public override void Initialize()\n  {\n    AvaloniaXamlLoader.Load(this);\n    base.Initialize();  // Required to initialize Prism.Avalonia - DO NOT REMOVE\n  }\n\n  protected override AvaloniaObject CreateShell()\n  {\n    Console.WriteLine(\"CreateShell()\");\n\n    return Container.Resolve\u003cMainWindow\u003e();\n  }\n\n  protected override void RegisterTypes(IContainerRegistry containerRegistry)\n  {\n    // Add Services and ViewModel registrations here\n\n    Console.WriteLine(\"RegisterTypes()\");\n\n    // Services\n    //// containerRegistry.RegisterSingleton\u003cISampleService, ISampleService\u003e();\n\n    // Views - Region Navigation\n    //// containerRegistry.RegisterForNavigation\u003cDashboardView, DashboardViewModel\u003e();\n\n    // Dialogs\n    //// containerRegistry.RegisterDialog\u003cMessageBoxView, MessageBoxViewModel\u003e();\n    //// containerRegistry.RegisterDialogWindow\u003cCustomDialogWindow\u003e(nameof(CustomDialogWindow));\n  }\n\n    protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)\n    {\n      // Register modules\n      //// moduleCatalog.AddModule\u003cDummyModule.DummyModule1\u003e();\n    }\n```\n\n## House Keeping\n\n### Branching Strategy\n\nBelow is a basic branching hierarchy and strategy.\n\n| Branch | Purpose\n|-|-|\n| `master`    | All releases are tagged published using the `master` branch\n| `develop`   | The **default** \u0026 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.\n| `feature/*` | New feature branch. Once completed, it is merged into `develop` and the branch must be deleted.\n| `stable/*`  | Stable release base build which shares cherry-picked merges from `develop`. This branch **must not** be deleted.\n\n### Code of Conduct\n\nSee, [Code of Conduct](.github/Code-of-Conduct.md)\n\n### Security\n\nSee, [Security](.github/Security.md)\n\n**Sponsored by:** [Suess Labs](https://suesslabs.com) a subsidary of Xeno Innovations, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniacommunity%2Fprism.avalonia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaloniacommunity%2Fprism.avalonia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniacommunity%2Fprism.avalonia/lists"}