Prism Documentation

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy Prism on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name prism -p 4010:4010 --restart always stoplightio/prism:latest

1. Project Overview & Quickstart (PrismLibrary/Prism)

File: README.md

Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Avalonia, MAUI, Uno Platform and WinUI. Separate releases are available for each platform and those will be developed on independent timelines. Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, EventAggregator, and others. Prism's core functionality is a shared code base supported in .NET Standard 2.0, .NET Framework 4.6 / 4.7, and .NET6.0/.NET8.0. Those things that need to be platform specific are implemented in the respective libraries for the target platform. Prism also provides great integration of these patterns with the target platform.

Licensing

The Prism Team would first and foremost like to thank all of those developers who have stepped up over the past 4 years with GitHub Sponsors. We are committed to ensuring the longevity and success of the Prism Library. As a result Prism 9.0 is now Dual License. We continue to offer a FREE Community License for the vast majority of our community, while the Commercial License will now be required by larger organizations to help fund and support the development of Prism. We additionally have the Commercial Plus License which grants access to a number of additional support libraries that build on top of Prism as well as a private Discord channel where you can ask questions and interact with the Prism Team.

Build Status

Status
Full Build
Prism.Core
Prism.Wpf
Prism.Avalonia
Prism.Uno
Prism.Maui

Support

  • Documentation is maintained in the Prism-Documentation repo under /docs and can be found in a readable format on the website.
  • StackOverflow: NOTE The Prism Team no longer supports or engages with questions posted on StackOverflow. Questions posted there may or may not receive correct answers.
  • For general questions and support, post your questions in GitHub Discussions.
  • You can enter bugs and feature requests in our Issues.
  • Enterprise Support: If you are interested in Enterprise Support please email the Prism Team at [email protected]

Videos & Training

By watching our courses, not only do you help support the project financially, but you might also learn something along the way. We believe this is a win-win for everyone.

We appreciate your support.

NuGet Packages

Official Prism releases are available on NuGet. Prism packages are also available on the private Commercial Plus Feed which will be updated with each merged PR. If you want to take advantage of a new feature as soon as it's merged into the code base, or if there is a critical bug you need fixed we invite you to purchase the Commercial Plus License to take advantage of these packages.

Core Packages

These are the base packages for each platform, together with the Prism's Core assembly as a cross-platform PCL.

Platform Package NuGet Commercial Plus Feed
Cross Platform Prism.Core CoreNuGetShield CorePrismNuGetShield
Cross Platform Prism.Events EventsNuGetShield EventsPrismNuGetShield
Cross Platform Prism.Container.Abstractions ContainerAbstractionsNuGetShield ContainerAbstractionsPrismNuGetShield
Cross Platform Prism.Container.DryIoc ContainerDryIocNuGetShield ContainerDryIocPrismNuGetShield
Cross Platform Prism.Container.Unity ContainerUnityNuGetShield ContainerUnityPrismNuGetShield
WPF Prism.Wpf WpfNuGetShield WpfPrismNuGetShield
Avalonia Prism.Avalonia AvaloniaNuGetShield AvaloniaPrismNuGetShield
.NET MAUI Prism.Maui MauiNuGetShield MauiPrismNuGetShield
Uno Platform and WinUI Prism.Uno UnoNuGetShield UnoPrismNuGetShield

Container-specific packages

Each supported IoC container has its own package assisting in the setup and usage of that container together with Prism. The assembly is named using this convention: Prism.Container.Platform.dll, e.g. Prism.Unity.Wpf.dll. Starting with version 7.0, Prism is moving to separate packages for each platform. Be sure to install the package for the Container and the Platform of your choice.

WPF

Package NuGet Commercial Plus Feed
Prism.DryIoc DryIocWpfNuGetShield DryIocWpfPrismNuGetShield
Prism.Unity UnityWpfNuGetShield UnityWpfPrismNuGetShield

Avalonia

Package NuGet Commercial Plus Feed
Prism.DryIoc.Avalonia DryIocAvaloniaNuGetShield DryIocAvaloniaPrismNuGetShield

.NET MAUI

Package NuGet Commercial Plus Feed
Prism.Maui MauiNuGetShield MauiPrismNuGetShield
Prism.DryIoc.Maui DryIocMauiNuGetShield DryIocMauiPrismNuGetShield
Prism.Maui.Rx MauiRxNuGetShield MauiRxPrismNuGetShield

Uno Platform

Package NuGet Commercial Plus Feed
Prism.DryIoc.Uno DryIocUnoPlatformNuGetShield DryIocUnoPlatformPrismNuGetShield

A detailed overview of each assembly per package is available here.

Samples

For stable samples be sure to check out the samples repo for the platform you are most interested in.

Contributing

We strongly encourage you to get involved and help us evolve the code base.

  • You can see what our expectations are for pull requests here.

File: e2e/Uno/HelloWorld/ReadMe.md

Prism Uno playground (e2e)

Single-project Uno sample: regions (NavigationView + nested ContentControl), dialogs, modularity (Playground.Module), DryIoc, ILoadableShell / splash, and InvokeCommandAction on Home.

Build from repo root

Prism packages are project references; builds compile src/Uno as needed.

Skia / workloads: This sample omits SkiaRenderer in UnoFeatures so dotnet workload restore succeeds on Android/iOS heads (Uno ReplaceUnoRuntime / RuntimeAssetsSelectorTask issue when Skia is forced for those TFMs).

`dotnet build` (CLI-friendly TFMs)

powershell
dotnet build .\e2e\Uno\HelloWorld\HelloWorld.csproj -f net10.0-desktop
dotnet build .\e2e\Uno\HelloWorld\HelloWorld.csproj -f net10.0-browserwasm

WinUI (`net10.0-windows10.0.*`)

Uno blocks dotnet build for WinUI class libraries that contain XAML (error UNOB0008). Build the Windows TFM with Visual Studio or msbuild (same as CI for Prism.Uno):

powershell
msbuild .\e2e\Uno\HelloWorld\HelloWorld.csproj -restore -p:TargetFramework=net10.0-windows10.0.26100

Full solution file

HelloWorld.slnx includes Prism library projects. Do not pass a single -f to the whole solution: that forces every project (including Prism.Core) onto one TFM. Prefer building HelloWorld.csproj per TFM as above.

Getting started (Uno)

https://aka.platform.uno/get-started

https://aka.platform.uno/using-uno-sdk


File: e2e/README.md

End to End Apps

The End to End apps here are used for both local testing and development and in some cases for full UI Testing integrations in the Build Pipeline. These are not necessarily examples meant to demonstrate best practices. They are however meant to provide the team the ability to validate functionality.

Stable samples

More complete and stable samples showing how to use Prism for your application development will be posted in separate repositories under the PrismLibrary GitHub organization. These samples are based on public released NuGet packages and are thus more stable than the sandbox samples. Guidance on specific scenarios can be found in these stable samples.


File: src/Avalonia/ReadMe.md

Thank you for installing Prism.Avalonia v9.0!

Help Support Prism

While Prism.Avalonia is, and will continue to be totally free to download, Open Source is not free. If you or your company have the resources, please consider becoming a GitHub Sponsor. GitHub Sponsorships help to make Open Source Development more sustainable.

Support & FAQ

  1. Support: Prism is distributed under the MIT License this means "AS IS", WITHOUT WARRANTY OF ANY KIND. If you require code level support, architectural guidance, or custom builds of Prism, please reach out at https://github.com/PrismLibrary/Prism to inquire about Enterprise support options.

  2. Community Support: GitHub issues are not the place to ask questions, these are reserved for feature requests and legitimate bug reports. You are free to ask questions on Stack Overflow however the Prism team does not monitor questions posted there. We do encourage you to post questions using GitHub Discussions on the main Prism repo. If you see a question that you know the answer to please pay it forward and help other developers that may just be starting out. https://github.com/PrismLibrary/Prism/discussions

  3. Reporting Bugs: If you believe you have encountered a bug, please be sure to search the open and closed issues as you may find the issue has already been fixed as and is awaiting release. If you find that you have a new issue, please create a new project that focuses on ONLY the necessary steps to reproduce the issue you are facing. Issues that are opened which do not have a sample app reproducing the issue will be closed. In addition to this being required by the Prism team, this is just good etiquette for any Open Source project. Additionally we ask that you do not try to be an Archaeologist, trying to comment on PR's, commits and issues from long ago, if there is a legitimate issue, open a new issue referencing what you need to reference. Archaeologists will be ignored.

  4. Samples: Currently the Prism.Avalonia team maintains a wide variety of samples for Avalonia. If you would like to help give back, and help build out a sample(s) repo please contact the Prism.Avalonia team via the GitHub Discussions forum.


File: src/ReadMe.md

Prism Licensing Update

Hello and thank you for using Prism!

Prism’s licensing terms have recently changed. It's essential to understand and abide by these changes before continuing to use our software.

Licensing Options:

Prism Community License

For customers that qualify for the Community License, Prism can be used free of charge.

This license is available to those who:

  • Have an annual gross revenue of less than one (1) million U.S. dollars ($1,000,000.00 USD) per year.
  • Have less than five (5) total developers.
  • Have never received more than $3 million USD in capital from outside sources, such as private equity or venture capital.

Note: To use Prism under the Community License, you must also agree to be bound by Prism's terms and conditions.

Prism Commercial License

For customers who do not qualify for the community license, a Commercial License must be purchased.

To explore our commercial licensing options, visit the Prism Library website.

Important Reminders:

You cannot use this product without:

  1. Possessing either a Community License or a Commercial License.
  2. Agreeing and abiding by Prism's license containing all terms and conditions.

To view the full Prism license containing the terms and conditions, please visit this link.

How to Purchase Your License:

  1. Determine if you qualify for the Prism Community License by reviewing the criteria above.
  2. If you qualify, make sure to read, understand, and agree to Prism's terms and conditions found in the Prism License.
  3. If you do not qualify for the Community License, visit the Prism Library website for commercial licensing options and further instructions.

Thank you for your attention to this matter. We're committed to delivering the best experience with Prism and appreciate your understanding and cooperation.

If you have any questions, please don't hesitate to reach out to our support team at [email protected].

Best Regards,

The Prism Team

2. Official Technical Reference & Guides (PrismLibrary/Prism-Documentation)

File: README.md

Prism-Documentation

This is the official repository for the Prism project documentation and the raw content of the docs website.

Overview of Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.


File: docs/index.md


Introduction to Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, .NET MAUI, Uno Platform and Avalonia. Separate releases are available for each platform and those will be developed on independent timelines. Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, EventAggregator, and others. Prism's core functionality is a shared code base in a Cross Compiled .NET Standard and .NET 4.5/4.8 Library. Those things that need to be platform specific are implemented in the respective libraries for the target platform. Prism also provides great integration of these patterns with the target platform. For example, Prism for .NET MAUI allows you to use an abstraction for navigation that is unit testable, but that layers on top of the platform concepts and APIs for navigation so that you can fully leverage what the platform itself has to offer, but done in the MVVM way.

Prism 9 represents a major leap forward for app developers with a lot of focus having been spent on unifying the API across all platforms. This will unlock many possibilities for developers to move code forward from legacy applications or transition from one app development platform to another maximizing code reuse and eliminating development costs.

Licensing

Note that the Prism License has changed for Prism 9. In order to help ensure that Prism continues to be a sustainable project Prism 9 and future versions of Prism will ship under a dual Community / Commercial License.

:::important License

Prism can be licensed either under the Prism Community License or the Prism Commercial license.

To be qualified for the Prism Community License you must have an annual gross revenue of less than one (1) million U.S. dollars ($1,000,000.00 USD) per year or have never received more than $3 million USD in capital from an outside source, such as private equity or venture capital, and agree to be bound by Prism's terms and conditions.

Customers who do not qualify for the community license can visit the Prism Library website (https://prismlibrary.com/) for commercial licensing options.

Under no circumstances can you use this product without (1) either a Community License or a Commercial License and (2) without agreeing and abiding by Prism's license containing all terms and conditions.

The Prism license that contains the terms and conditions can be found at https://cdn.prismlibrary.com/downloads/prism_license.pdf
:::

Download the full Prism License

Commercial Plus License

The Commercial Plus license offers a number of additional packages to help developers. At the time of writing the docs this would include:

  • Prism.Plugin.Popups (.NET MAUI)
  • Prism.Plugin.Essentials - A cross between several Shiny and .NET MAUI Essentials APIs abstracted and supported across all Prism Platforms allowing you to make use of these APIs with the same ViewModel regardless of which platform you are developing with.
  • Prism.Magician - A collection of Roslyn Analyzers, Source Generators, and IL Weaving to help you write less code and catch issues in your code quicker
  • Support for additional containers
    • Microsoft.Extensions.DependencyInjection
    • Grace Ioc

Additionally Commercial Plus license holders have access to a private Discord group where they can ask questions, help one another and get help directly from the Prism team.