├── .editorconfig
├── .github
├── Code-of-Conduct.md
├── Contributing.md
├── ISSUE_TEMPLATE
│ ├── feature-request.md
│ └── issue.md
├── PULL_REQUEST_TEMPLATE.md
└── Security.md
├── .gitignore
├── .markdownlint.json
├── ChangeLog.md
├── Directory.Build.props
├── Directory.Build.targets
├── Directory.Packages.props
├── LICENSE
├── Prism.Avalonia.sln
├── PrismLibrary_Avalonia.slnf
├── README.md
├── Settings.XamlStyler
├── Upgrading-Prism.md
├── Upgrading-to-Avalonia-11.md
├── build.ps1
├── build
├── AvaloniaDependency.props
├── Base.props
├── BuildTargets.props
├── EmbedXaml.props
├── Library.props
├── Nuget.props
├── PrismDependency.props
└── SampleApp.props
├── e2e
├── BootstrapperShellSample
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── BootstrapperShellSample.csproj
│ └── Views
│ │ ├── MainWindow.axaml
│ │ └── MainWindow.axaml.cs
├── DummyModule1
│ ├── DummyModule1.cs
│ ├── DummyModule1.csproj
│ └── Views
│ │ ├── DummyModuleView.axaml
│ │ └── DummyModuleView.axaml.cs
├── DummyModule2
│ ├── DummyModule2.csproj
│ ├── DumyModule2.cs
│ └── Views
│ │ ├── DummyModuleView2.axaml
│ │ └── DummyModuleView2.axaml.cs
├── ModulesSample.Infrastructure
│ ├── Events
│ │ └── DummyEvent.cs
│ ├── IModuleTracker.cs
│ ├── ModuleInitializationStatus.cs
│ ├── ModuleNames.cs
│ ├── ModulesSample.Infrastructure.csproj
│ └── RegionNames.cs
├── ModulesSample
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── MainWindow.axaml
│ ├── MainWindow.axaml.cs
│ ├── ModuleSystemLogic
│ │ ├── AggregateModuleCatalog.cs
│ │ ├── DiscoveryMethod.cs
│ │ ├── ModuleTracker.cs
│ │ └── ModuleTrackingState.cs
│ └── ModulesSampleApp.csproj
├── SampleBaseApp
│ ├── .editorconfig
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── Assets
│ │ └── avalonia-logo.ico
│ ├── Program.cs
│ ├── SampleBaseApp.csproj
│ ├── ViewModels
│ │ ├── MainWindowViewModel.cs
│ │ └── ViewModelBase.cs
│ ├── Views
│ │ ├── MainWindow.axaml
│ │ └── MainWindow.axaml.cs
│ └── app.manifest
├── SampleDialogApp
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── Program.cs
│ ├── SampleDialogApp.csproj
│ ├── ViewModels
│ │ ├── DialogViewModel.cs
│ │ ├── MainWindowViewModel.cs
│ │ ├── MessageBoxViewModel.cs
│ │ └── ViewModelBase.cs
│ └── Views
│ │ ├── CustomDialogWindow.axaml
│ │ ├── CustomDialogWindow.axaml.cs
│ │ ├── DialogView.axaml
│ │ ├── DialogView.axaml.cs
│ │ ├── MainWindow.axaml
│ │ ├── MainWindow.axaml.cs
│ │ ├── MessageBoxView.axaml
│ │ └── MessageBoxView.axaml.cs
├── SampleMvvmApp
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── Program.cs
│ ├── RegionAdapters
│ │ └── ItemsControlRegionAdapter.cs
│ ├── RegionNames.cs
│ ├── SampleMvvmApp.csproj
│ ├── Services
│ │ ├── INotifictionService.cs
│ │ └── NotifictionService.cs
│ ├── Styles
│ │ └── Icons.axaml
│ ├── ViewModels
│ │ ├── DashboardViewModel.cs
│ │ ├── MainWindowViewModel.cs
│ │ ├── SettingsViewModel.cs
│ │ ├── SidebarViewModel.cs
│ │ ├── SubSettingsViewModel.cs
│ │ └── ViewModelBase.cs
│ ├── Views
│ │ ├── DashboardView.axaml
│ │ ├── DashboardView.axaml.cs
│ │ ├── MainWindow.axaml
│ │ ├── MainWindow.axaml.cs
│ │ ├── Setting1View.axaml
│ │ ├── Setting1View.axaml.cs
│ │ ├── Setting2View.axaml
│ │ ├── Setting2View.axaml.cs
│ │ ├── SettingsView.axaml
│ │ ├── SettingsView.axaml.cs
│ │ ├── SidebarView.axaml
│ │ ├── SidebarView.axaml.cs
│ │ ├── SubSettingsView.axaml
│ │ └── SubSettingsView.axaml.cs
│ └── readme.md
└── ViewDiscovery
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── Program.cs
│ ├── RegionNames.cs
│ ├── ViewDiscovery.csproj
│ ├── ViewModels
│ ├── ViewAViewModel.cs
│ └── ViewBViewModel.cs
│ └── Views
│ ├── MainWindow.axaml
│ ├── MainWindow.axaml.cs
│ ├── ViewA.axaml
│ ├── ViewA.axaml.cs
│ ├── ViewB.axaml
│ └── ViewB.axaml.cs
├── images
├── Avalonia.png
├── Prism.Avalonia-ico.xcf
├── Prism.Avalonia.ico
├── Prism.Avalonia.png
├── Prism.Avalonia.xcf
├── Prism.png
└── Sample-Outlookish.png
├── src
├── Prism.Avalonia
│ ├── Common
│ │ ├── MvvmHelpers.cs
│ │ ├── ObservableObject.cs
│ │ └── Stubs.cs
│ ├── Dialogs
│ │ ├── Dialog.cs
│ │ ├── DialogService.cs
│ │ ├── DialogWindow.axaml
│ │ ├── DialogWindow.axaml.cs
│ │ ├── IDialogServiceCompatExtensions.cs
│ │ ├── IDialogWindow.cs
│ │ ├── IDialogWindowExtensions.cs
│ │ └── KnownDialogParameters.cs
│ ├── Extensions
│ │ ├── AvaloniaObjectExtensions.cs
│ │ ├── CollectionExtensions.cs
│ │ └── ObservableExtensions.cs
│ ├── Interactivity
│ │ ├── CommandBehaviorBase.cs
│ │ └── InvokeCommandAction.cs
│ ├── Ioc
│ │ ├── ContainerProviderExtension.cs
│ │ └── IContainerRegistryExtensions.cs
│ ├── Modularity
│ │ ├── AssemblyResolver.Desktop.cs
│ │ ├── ConfigurationModuleCatalog.Desktop.cs
│ │ ├── ConfigurationStore.Desktop.cs
│ │ ├── DirectoryModuleCatalog.net45.cs
│ │ ├── DirectoryModuleCatalog.netcore.cs
│ │ ├── FileModuleTypeLoader.Desktop.cs
│ │ ├── IAssemblyResolver.Desktop.cs
│ │ ├── IConfigurationStore.Desktop.cs
│ │ ├── IModuleCatalogExtensions.cs
│ │ ├── IModuleGroupsCatalog.cs
│ │ ├── IModuleTypeLoader.cs
│ │ ├── ModuleAttribute.Desktop.cs
│ │ ├── ModuleCatalog.cs
│ │ ├── ModuleConfigurationElement.Desktop.cs
│ │ ├── ModuleConfigurationElementCollection.Desktop.cs
│ │ ├── ModuleDependencyCollection.Desktop.cs
│ │ ├── ModuleDependencyConfigurationElement.Desktop.cs
│ │ ├── ModuleInfo.Desktop.cs
│ │ ├── ModuleInfo.cs
│ │ ├── ModuleInfoGroup.cs
│ │ ├── ModuleInfoGroupExtensions.cs
│ │ ├── ModuleInitializer.cs
│ │ ├── ModuleManager.Desktop.cs
│ │ ├── ModuleManager.cs
│ │ ├── ModuleTypeLoaderNotFoundException.Desktop.cs
│ │ ├── ModuleTypeLoaderNotFoundException.cs
│ │ ├── ModulesConfigurationSection.Desktop.cs
│ │ └── XamlModuleCatalog.cs
│ ├── Mvvm
│ │ └── ViewModelLocator.cs
│ ├── Navigation
│ │ └── Regions
│ │ │ ├── AllActiveRegion.cs
│ │ │ ├── Behaviors
│ │ │ ├── AutoPopulateRegionBehavior.cs
│ │ │ ├── BindRegionContextToAvaloniaObjectBehavior.cs
│ │ │ ├── ClearChildViewsRegionBehavior.cs
│ │ │ ├── DelayedRegionCreationBehavior.cs
│ │ │ ├── DestructibleRegionBehavior.cs
│ │ │ ├── IHostAwareRegionBehavior.cs
│ │ │ ├── RegionActiveAwareBehavior.cs
│ │ │ ├── RegionManagerRegistrationBehavior.cs
│ │ │ ├── RegionMemberLifetimeBehavior.cs
│ │ │ ├── SelectorItemsSourceSyncBehavior.cs
│ │ │ └── SyncRegionContextWithHostBehavior.cs
│ │ │ ├── ContentControlRegionAdapter.cs
│ │ │ ├── DefaultRegionManagerAccessor.cs
│ │ │ ├── INavigationAware.cs
│ │ │ ├── IRegionManagerAccessor.cs
│ │ │ ├── ItemMetadata.cs
│ │ │ ├── ItemsControlRegionAdapter.cs
│ │ │ ├── Region.cs
│ │ │ ├── RegionAdapterBase.cs
│ │ │ ├── RegionAdapterMappings.cs
│ │ │ ├── RegionContext.cs
│ │ │ ├── RegionManager.cs
│ │ │ ├── RegionNavigationContentLoader.cs
│ │ │ ├── RegionNavigationService.cs
│ │ │ ├── RegionViewRegistry.cs
│ │ │ ├── SelectorRegionAdapter.cs
│ │ │ ├── SingleActiveRegion.cs
│ │ │ └── ViewsCollection.cs
│ ├── Prism.Avalonia.csproj
│ ├── PrismApplicationBase.cs
│ ├── PrismBootstrapperBase.cs
│ ├── PrismInitializationExtensions.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── Prism.DryIoc.Avalonia
│ ├── GlobalSuppressions.cs
│ ├── Prism.DryIoc.Avalonia.csproj
│ ├── PrismApplication.cs
│ ├── PrismBootstrapper.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ └── build
│ │ └── Package.targets
├── Prism.Unity.Avalonia
│ ├── GlobalSuppressions.cs
│ ├── Prism.Unity.Avalonia.csproj
│ ├── PrismApplication.cs
│ ├── PrismBootstrapper.cs
│ └── Properties
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
└── ReadMe.md
└── tests
├── Avalonia
├── Prism.Avalonia.Tests
│ ├── CollectionChangedTracker.cs
│ ├── CollectionExtensionsFixture.cs
│ ├── CompilerHelper.Desktop.cs
│ ├── ExceptionAssert.cs
│ ├── Interactivity
│ │ ├── CommandBehaviorBaseFixture.cs
│ │ ├── InvokeCommandActionFixture.cs
│ │ └── ObservableBehaviorFixture.cs
│ ├── ListDictionaryFixture.cs
│ ├── Mocks
│ │ ├── MockAsyncModuleTypeLoader.cs
│ │ ├── MockClickableObject.cs
│ │ ├── MockCommand.cs
│ │ ├── MockConfigurationStore.Desktop.cs
│ │ ├── MockContainerAdapter.cs
│ │ ├── MockDelegateReference.cs
│ │ ├── MockDependencyObject.cs
│ │ ├── MockFrameworkContentElement.cs
│ │ ├── MockFrameworkElement.cs
│ │ ├── MockHostAwareRegionBehavior.cs
│ │ ├── MockInteractionRequestAwareElement.cs
│ │ ├── MockModuleTypeLoader.cs
│ │ ├── MockPresentationRegion.cs
│ │ ├── MockRegion.cs
│ │ ├── MockRegionAdapter.cs
│ │ ├── MockRegionBehavior.cs
│ │ ├── MockRegionBehaviorCollection.cs
│ │ ├── MockRegionManager.cs
│ │ ├── MockRegionManagerAccessor.cs
│ │ ├── MockSortableViews.cs
│ │ ├── MockViewsCollection.cs
│ │ ├── Modules
│ │ │ ├── MockAbstractModule.cs
│ │ │ ├── MockAttributedModule.cs
│ │ │ ├── MockDependantModule.cs
│ │ │ ├── MockDependencyModule.cs
│ │ │ ├── MockExposingTypeFromGacAssemblyModule.cs
│ │ │ ├── MockModuleA.cs
│ │ │ ├── MockModuleReferencedAssembly.cs
│ │ │ ├── MockModuleReferencingAssembly.cs
│ │ │ ├── MockModuleReferencingOtherModule.cs
│ │ │ └── MockModuleThrowingException.cs
│ │ ├── ViewModels
│ │ │ ├── MockOptOutViewModel.cs
│ │ │ └── MockViewModel.cs
│ │ └── Views
│ │ │ ├── Mock.cs
│ │ │ ├── MockOptOut.cs
│ │ │ └── MockView.cs
│ ├── Modularity
│ │ ├── AssemblyResolverFixture.Desktop.cs
│ │ ├── ConfigurationModuleCatalogFixture.Desktop.cs
│ │ ├── ConfigurationStoreFixture.Desktop.cs
│ │ ├── DirectoryModuleCatalogFixture.Desktop.cs
│ │ ├── FileModuleTypeLoaderFixture.Desktop.cs
│ │ ├── ModuleAttributeFixture.Desktop.cs
│ │ ├── ModuleCatalogFixture.cs
│ │ ├── ModuleCatalogXaml
│ │ │ ├── InvalidDependencyModuleCatalog.xaml
│ │ │ └── SimpleModuleCatalog.xaml
│ │ ├── ModuleDependencySolverFixture.cs
│ │ ├── ModuleInfoGroupExtensionsFixture.cs
│ │ ├── ModuleInfoGroupFixture.cs
│ │ ├── ModuleInitializerFixture.cs
│ │ ├── ModuleManagerFixture.cs
│ │ └── NotAValidDotNetDll.txt.dll
│ ├── Mvvm
│ │ └── ViewModelLocatorFixture.cs
│ ├── Prism.Avalonia.Tests.csproj
│ ├── PrismApplicationBaseFixture.cs
│ ├── PrismBootstrapperBaseFixture.cs
│ └── Regions
│ │ ├── AllActiveRegionFixture.cs
│ │ ├── Behaviors
│ │ ├── AutoPopulateRegionBehaviorFixture.cs
│ │ ├── BindRegionContextToAvaloniaObjectBehaviorFixture.cs
│ │ ├── ClearChildViewsRegionBehaviorFixture.cs
│ │ ├── DelayedRegionCreationBehaviorFixture.cs
│ │ ├── RegionActiveAwareBehaviorFixture.cs
│ │ ├── RegionManagerRegistrationBehaviorFixture.cs
│ │ ├── RegionMemberLifetimeBehaviorFixture.cs
│ │ ├── SelectorItemsSourceSyncRegionBehaviorFixture.cs
│ │ └── SyncRegionContextWithHostBehaviorFixture.cs
│ │ ├── ContentControlRegionAdapterFixture.cs
│ │ ├── ItemsControlRegionAdapterFixture.cs
│ │ ├── LocatorNavigationTargetHandlerFixture.cs
│ │ ├── NavigationAsyncExtensionsFixture.cs
│ │ ├── NavigationContextFixture.cs
│ │ ├── RegionAdapterBaseFixture.cs
│ │ ├── RegionAdapterMappingsFixture.cs
│ │ ├── RegionBehaviorCollectionFixture.cs
│ │ ├── RegionBehaviorFactoryFixture.cs
│ │ ├── RegionBehaviorFixture.cs
│ │ ├── RegionFixture.cs
│ │ ├── RegionManagerFixture.cs
│ │ ├── RegionManagerRequestNavigateFixture.cs
│ │ ├── RegionNavigationJournalFixture.cs
│ │ ├── RegionNavigationServiceFixture.new.cs
│ │ ├── RegionViewRegistryFixture.cs
│ │ ├── SelectorRegionAdapterFixture.cs
│ │ ├── SingleActiveRegionFixture.cs
│ │ └── ViewsCollectionFixture.cs
├── Prism.Container.Avalonia.Shared
│ ├── Fixtures
│ │ ├── Application
│ │ │ └── PrismApplicationFixture.cs
│ │ ├── Bootstrapper
│ │ │ ├── BootstrapperFixture.cs
│ │ │ ├── BootstrapperNullModuleCatalogFixture.cs
│ │ │ └── BootstrapperRunMethodFixture.cs
│ │ ├── ContainerExtensionCollection.cs
│ │ ├── Ioc
│ │ │ ├── ContainerExtensionFixture.cs
│ │ │ └── ContainerProviderExtensionFixture.cs
│ │ ├── Mvvm
│ │ │ └── ViewModelLocatorFixture.cs
│ │ └── Regions
│ │ │ └── RegionNavigationContentLoaderFixture.cs
│ ├── Mocks
│ │ └── NullModuleCatalogBootstrapper.cs
│ ├── Prism.Container.Avalonia.Shared.projitems
│ └── Prism.Container.Avalonia.Shared.shproj
├── Prism.DryIoc.Avalonia.Tests
│ ├── ContainerHelper.cs
│ ├── Fixtures
│ │ └── BootstrapperRunMethodFixture.cs
│ ├── Mocks
│ │ ├── MockBootstrapper.cs
│ │ ├── MockedContainerBootstrapper.cs
│ │ ├── NullLoggerBootstrapper.cs
│ │ └── NullModuleCatalogBootstrapper.cs
│ └── Prism.DryIoc.Avalonia.Tests.csproj
└── Prism.IocContainer.Avalonia.Tests.Support
│ ├── BootstrapperFixtureBase.cs
│ ├── Mocks
│ ├── DependantA.cs
│ ├── DependantB.cs
│ ├── MockModuleLoader.cs
│ ├── MockRegionManager.cs
│ ├── MockService.cs
│ ├── ViewModels
│ │ └── MockViewModel.cs
│ └── Views
│ │ └── MockView.cs
│ └── Prism.IocContainer.Avalonia.Tests.Support.csproj
└── Prism.Core.Tests
├── Commands
├── AsyncDelegateCommandFixture.cs
├── CompositeCommandFixture.cs
├── DelegateCommandFixture.cs
└── TestPurposeBindableBase.cs
├── Common
├── Mocks
│ ├── MockEnum.cs
│ └── MockParameters.cs
├── MulticastExceptionHandlerFixture.cs
└── ParametersFixture.cs
├── Events
├── BackgroundEventSubscriptionFixture.cs
├── DataEventArgsFixture.cs
├── DelegateReferenceFixture.cs
├── DispatcherEventSubscriptionFixture.cs
├── EventAggregatorFixture.cs
├── EventBaseFixture.cs
├── EventSubscriptionFixture.cs
├── MockDelegateReference.cs
└── PubSubEventFixture.cs
├── Extensions
└── TaskExtensionsFixture.cs
├── Mocks
├── ViewModels
│ ├── MockValidatingViewModel.cs
│ └── MockViewModel.cs
└── Views
│ ├── Mock.cs
│ └── MockView.cs
├── Mvvm
├── BindableBaseFixture.cs
├── ErrorsContainerFixture.cs
├── PropertySupportFixture.cs
└── ViewModelLocationProviderFixture.cs
├── Navigation
└── NavigationParametersFixture.cs
└── Prism.Core.Tests.csproj
/.github/Code-of-Conduct.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation and knowledge readily available to others. We inspire everyone to learn from one another, to share ideas, and help grow the community.
6 |
7 | ## Our Standards
8 |
9 | * Focus on what is best to improve the project's codebase
10 | * Give constructive feedback
11 | * Be respectful towards one another
12 | * Feedback is welcome
13 | * Jokes are welcomed - _don't like it, rub dirt on it_
14 | * _Keep political views out of code_
15 |
16 | After all, we're all human.. _except for AI, that's just an algorithm_.
17 |
--------------------------------------------------------------------------------
/.github/Contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Prism.Avalonia is an open-source project under the MIT license. We encourage community members like yourself to contribute.
4 |
5 | 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.
6 |
7 | Issues posted without a description may be closed immediately. Use the discussion boards if you have a question, not Issues.
8 |
9 | We will close your _PR_ if it doesn't have an approved issue / feature request.
10 |
11 | We reserve the right to close your "_issue_" or feature request if:
12 |
13 | * It's an inquiry, not an issue.
14 | * Error in your code for not following the documentation
15 | * Not providing a description and steps to reproduce
16 | * Not providing a sample when asked to do so
17 |
18 | ## "Keep It Prism"
19 |
20 | "_Keep it Prism_" simply means:
21 |
22 | * Does it work this way for Prism.WPF?
23 | * _or, Prism.Uno, Prism.Maui, etc?_
24 |
25 | There have been requests in the past where individuals wanted changes for the sake of personal ease rather than how it would affect the ecosystem compatibility. This project should maintain compatibility with other Prism components, not just _one-offs_.
26 |
27 | ## Branching Strategy
28 |
29 | Below is a basic branching hierarchy and strategy.
30 |
31 | | Branch | Purpose
32 | |-|-|
33 | | `master` | All releases are tagged published using the `master` branch
34 | | `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.
35 | | `feature/*` | New feature branch. Once completed, it is merged into `develop` and the branch must be deleted.
36 | | `stable/*` | Stable release base build which shares cherry-picked merges from `develop`. This branch **must not** be deleted.
37 |
38 | ## Regards
39 |
40 | > Thank you,
41 | >
42 | > Damian Suess
43 | > Xeno Innovations, Inc. / Suess Labs
44 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: Suggest an idea for this project
4 | title: "[Enhancement] "
5 | labels: enhancement, not-reviewed
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Description
11 | A clear and concise description of what you want to happen. Why is this feature important?
12 |
13 | ## Context
14 | Add any other context, examples, or screenshots about the feature request here.
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/issue.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Issue
3 | about: Create a report to help us improve
4 | title: "[Issue] "
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Description
11 | A clear and concise description of what the bug is and include samples (using code blocks) if applicable.
12 |
13 | ## Environment
14 | * **OS:** _Windows 10, Ubuntu 22.04, etc._
15 | * **Prism.Avalonia Version:**
16 | * **Avalonia Version:**
17 |
18 | ## Severity (1-5)
19 | 1=Low (_annoyance_), 5=High (_crashes visual studio_)
20 |
21 | ## Steps To Reproduce
22 | Steps to reproduce the behavior:
23 | 1. Go to '...'
24 | 2. Click on '...'
25 | 3. Scroll down to '...'
26 | 4. Error message '...'
27 |
28 | ## Expected Behavior
29 | A clear and concise description of what you expected to happen.
30 |
31 | ## Screenshots
32 | If applicable, add screenshots to help explain your problem.
33 |
34 | ## Additional context
35 | Add any other context about the problem here.
36 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Details
2 |
3 | _REMOVE ME: Descritpion of PR. If you don't provide a full description, we will cancel this PR._
4 |
5 | ## Linked To Issue/Feature
6 |
7 | * #XXXX - _issue/discussion_
8 |
9 | _REMOVE ME: Remember to link to issue/discussion post number_
10 |
--------------------------------------------------------------------------------
/.github/Security.md:
--------------------------------------------------------------------------------
1 | # Security
2 |
3 | Report issues via the discussion boards
4 |
--------------------------------------------------------------------------------
/.markdownlint.json:
--------------------------------------------------------------------------------
1 | {
2 | "default": true,
3 | "no-hard-tabs": true,
4 | "MD007": { "indent": 2 },
5 | "MD013": false,
6 | "MD024": { "siblings_only": true, "allow_different_nesting": true },
7 | "MD033": {
8 | "allowed_elements": [ "br", "hr" ]
9 | },
10 | "MD055": false,
11 | "MD056": false
12 | }
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | en
4 | true
5 |
6 |
7 |
8 |
9 | true
10 | $(NoWarn);NU5104;NU5100;NU5118;NU5123;NU1603;CS1701;CS1702;XA0101;MSB3277;CS8785;CS8669;CS1998;NU1507
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Directory.Packages.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Prism can be licensed either under the Prism Community License or the Prism Commercial license.
2 |
3 | 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.
4 |
5 | Customers who do not qualify for the community license can visit the Prism Library website (https://prismlibrary.com/) for commercial licensing options.
6 |
7 | 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.
8 |
9 | The Prism license that contains the terms and conditions can be found at
10 | https://cdn.prismlibrary.com/downloads/prism_license.pdf
11 |
--------------------------------------------------------------------------------
/PrismLibrary_Avalonia.slnf:
--------------------------------------------------------------------------------
1 | {
2 | "solution": {
3 | "path": "Prism.Avalonia.sln",
4 | "projects": [
5 | "src\\Prism.Avalonia\\Prism.Avalonia.csproj",
6 | "src\\Prism.DryIoc.Avalonia\\Prism.DryIoc.Avalonia.csproj",
7 | "tests\\Avalonia\\Prism.Avalonia.Tests\\Prism.Avalonia.Tests.csproj",
8 | "tests\\Avalonia\\Prism.DryIoc.Avalonia.Tests\\Prism.DryIoc.Avalonia.Tests.csproj",
9 | ]
10 | }
11 | }
--------------------------------------------------------------------------------
/Settings.XamlStyler:
--------------------------------------------------------------------------------
1 | {
2 | "AttributesTolerance": 2,
3 | "KeepFirstAttributeOnSameLine": true,
4 | "MaxAttributeCharactersPerLine": 0,
5 | "MaxAttributesPerLine": 1,
6 | "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransfom, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter",
7 | "SeparateByGroups": false,
8 | "AttributeIndentation": 0,
9 | "AttributeIndentationStyle": 1,
10 | "RemoveDesignTimeReferences": false,
11 | "EnableAttributeReordering": true,
12 | "AttributeOrderingRuleGroups": [
13 | "xmlns, xmlns:x",
14 | "xmlns:*",
15 | "x:Class",
16 | "x:Key, Key, x:Name, Name, x:Uid, Uid, Title, Text",
17 | "Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom",
18 | "Content",
19 | "Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
20 | "Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
21 | "Source",
22 | "*:*, *",
23 | "PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint",
24 | "mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
25 | "Storyboard.*, From, To, Duration"
26 | ],
27 | "FirstLineAttributes": "Text",
28 | "OrderAttributesByName": true,
29 | "PutEndingBracketOnNewLine": false,
30 | "RemoveEndingTagOfEmptyElement": true,
31 | "SpaceBeforeClosingSlash": true,
32 | "RootElementLineBreakRule": 0,
33 | "ReorderVSM": 2,
34 | "ReorderGridChildren": false,
35 | "ReorderCanvasChildren": false,
36 | "ReorderSetters": 0,
37 | "FormatMarkupExtension": true,
38 | "NoNewLineMarkupExtensions": "x:Bind, Binding",
39 | "ThicknessSeparator": 2,
40 | "ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin",
41 | "FormatOnSave": true,
42 | "CommentPadding": 2
43 | }
--------------------------------------------------------------------------------
/build.ps1:
--------------------------------------------------------------------------------
1 | # Build script for generating NuGet packages
2 |
3 | if (Test-Path -Path "bin")
4 | {
5 | Remove-Item bin\* -Recurse -Force
6 | }
7 |
8 | # Clean both debug and release
9 | dotnet clean
10 | dotnet clean --configuration Release
11 |
12 | # build package for release
13 | dotnet build --configuration Release
14 |
15 | ## TODO: Build project and set version to 1.2.3.4
16 | # dotnet build -p:Version=1.2.3.4
17 |
--------------------------------------------------------------------------------
/build/AvaloniaDependency.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/build/Base.props:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 9.0.537.11300-pre
6 | https://github.com/AvaloniaCommunity/Prism.Avalonia
7 | Copyright (c) 2025 Xeno Innovations, Inc.
8 | MIT
9 | https://github.com/AvaloniaCommunity/Prism.Avalonia
10 |
11 |
12 |
13 | $(NoWarn);NU5104;NU5100;NU5118;NU5123;NU1603;CS1701;CS1702;XA0101;MSB3277;CS8785;CS8669;CS1998;NU1507
14 |
15 |
16 |
--------------------------------------------------------------------------------
/build/BuildTargets.props:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 | net6.0;net7.0;net8.0
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/build/EmbedXaml.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 | %(Filename)
9 |
10 |
11 | %(Filename)
12 |
13 |
14 | Designer
15 |
16 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/build/Library.props:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | True
14 | True
15 | Resources.resx
16 |
17 |
18 |
19 |
20 |
21 | PublicResXFileCodeGenerator
22 | Resources.Designer.cs
23 |
24 |
25 |
26 |
27 | $(SolutionDir)bin\
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/build/Nuget.props:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | true
7 | true
8 |
9 | * Upgraded to Avalonia v11.3.0
10 | * .NET 9 supported
11 | * Deprecation Notice: .NET Framework 4.x
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/build/PrismDependency.props:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/build/SampleApp.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/e2e/BootstrapperShellSample/App.axaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/e2e/BootstrapperShellSample/App.axaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Avalonia;
3 | using Avalonia.Controls;
4 | using Avalonia.Markup.Xaml;
5 | using Prism.DryIoc;
6 | using System.Threading;
7 | using Prism.Ioc;
8 | using BootstrapperShellSample.Views;
9 |
10 | namespace BootstrapperShellSample
11 | {
12 | class App : PrismApplication
13 | {
14 | public static AppBuilder BuildAvaloniaApp()
15 | {
16 | var builder = AppBuilder
17 | .Configure()
18 | .UsePlatformDetect();
19 | #if DEBUG
20 | builder.LogToTrace();
21 | #endif
22 | return builder;
23 | }
24 |
25 | public override void Initialize()
26 | {
27 | AvaloniaXamlLoader.Load(this);
28 | base.Initialize();
29 | }
30 |
31 | static void Main(string[] args)
32 | {
33 | BuildAvaloniaApp().Start(AppMain, args);
34 | }
35 |
36 | // Application entry point. Avalonia is completely initialized.
37 | static void AppMain(Application app, string[] args)
38 | {
39 | // A cancellation token source that will be used to stop the main loop
40 | var cts = new CancellationTokenSource();
41 |
42 | // Start the main loop
43 | app.Run(cts.Token);
44 | }
45 |
46 | protected override void RegisterTypes(IContainerRegistry containerRegistry)
47 | {
48 | }
49 |
50 | protected override AvaloniaObject CreateShell()
51 | {
52 | return Container.Resolve();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/e2e/BootstrapperShellSample/BootstrapperShellSample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | net6.0;net7.0;net8.0
5 | Damian Suess
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/e2e/BootstrapperShellSample/Views/MainWindow.axaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/e2e/BootstrapperShellSample/Views/MainWindow.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Controls;
3 | using Avalonia.Markup.Xaml;
4 |
5 | namespace BootstrapperShellSample.Views
6 | {
7 | ///
8 | /// Interaction logic for MainWindow.xaml
9 | ///
10 | public partial class MainWindow : Window
11 | {
12 | public MainWindow()
13 | {
14 | this.InitializeComponent();
15 | #if DEBUG
16 | this.AttachDevTools();
17 | #endif
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/e2e/DummyModule1/DummyModule1.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using DummyModule.View;
3 | using ModulesSample.Infrastructure;
4 | using Prism.Avalonia.Infrastructure.Events;
5 | using Prism.Events;
6 | using Prism.Ioc;
7 | using Prism.Modularity;
8 | using Prism.Navigation.Regions;
9 |
10 | namespace DummyModule
11 | {
12 | public class DummyModule1 : IModule
13 | {
14 | private readonly IModuleTracker _moduleTracker;
15 |
16 | private readonly IEventAggregator _eventAggregator;
17 | private readonly IRegionManager _regionManager;
18 |
19 | public DummyModule1(IModuleTracker moduleTracker, IEventAggregator eventAggregator, IRegionManager regionManager)
20 | {
21 | _moduleTracker = moduleTracker;
22 | _eventAggregator = eventAggregator;
23 | _regionManager = regionManager;
24 |
25 | _moduleTracker.RecordModuleConstructed(ModuleNames.ModuleDummy1);
26 | }
27 |
28 | public void RegisterTypes(IContainerRegistry containerRegistry)
29 | {
30 | _moduleTracker.RecordModuleLoaded(ModuleNames.ModuleDummy1);
31 | }
32 |
33 | public void OnInitialized(IContainerProvider containerProvider)
34 | {
35 | // Send Event messages for subscribers to react to
36 | Thread thread = new(new ThreadStart(DummyEventPublisher));
37 | thread.Start();
38 |
39 | _regionManager.RegisterViewWithRegion(RegionNames.Region1, typeof(DummyModuleView));
40 | _moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy1);
41 | }
42 |
43 | /// Publish events to subscribers.
44 | private void DummyEventPublisher()
45 | {
46 | while (true)
47 | {
48 | Thread.Sleep(500);
49 | _eventAggregator.GetEvent().Publish();
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/e2e/DummyModule1/DummyModule1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0;net7.0;net8.0
5 | Damian Suess
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | DummyModuleView.axaml
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/e2e/DummyModule1/Views/DummyModuleView.axaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/e2e/DummyModule1/Views/DummyModuleView.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 | using Prism.Events;
3 |
4 | namespace DummyModule.View
5 | {
6 | public partial class DummyModuleView : UserControl
7 | {
8 | private readonly IEventAggregator _eventAggregator;
9 |
10 | public DummyModuleView()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/DummyModule2/DummyModule2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0;net7.0;net8.0
5 | Damian Suess
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/e2e/DummyModule2/DumyModule2.cs:
--------------------------------------------------------------------------------
1 | using DummyModule2.View;
2 | using ModulesSample.Infrastructure;
3 | using Prism.Ioc;
4 | using Prism.Modularity;
5 | using Prism.Navigation.Regions;
6 |
7 | namespace DummyModule2
8 | {
9 | public class DummyModule2 : IModule
10 | {
11 | private readonly IModuleTracker _moduleTracker;
12 | private readonly IRegionManager _regionManager;
13 |
14 | public DummyModule2(IModuleTracker moduleTracker, IRegionManager regionManager)
15 | {
16 | _moduleTracker = moduleTracker;
17 | _regionManager = regionManager;
18 |
19 | _moduleTracker.RecordModuleConstructed(ModuleNames.ModuleDummy2);
20 | }
21 |
22 | public void OnInitialized(IContainerProvider containerProvider)
23 | {
24 | _moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy2);
25 | _regionManager.RegisterViewWithRegion(RegionNames.Region2, typeof(DummyModuleView2));
26 | }
27 |
28 | public void RegisterTypes(IContainerRegistry containerRegistry)
29 | {
30 | _moduleTracker.RecordModuleLoaded(ModuleNames.ModuleDummy2);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/e2e/DummyModule2/Views/DummyModuleView2.axaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/e2e/DummyModule2/Views/DummyModuleView2.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 | using Avalonia.Threading;
3 | using ModulesSample.Infrastructure;
4 | using Prism.Avalonia.Infrastructure.Events;
5 | using Prism.Events;
6 | using Prism.Navigation.Regions;
7 |
8 | namespace DummyModule2.View
9 | {
10 | public partial class DummyModuleView2 : UserControl
11 | {
12 | private readonly IEventAggregator _eventAggregator;
13 | private readonly Label _regionViewTextBox;
14 | private int _counter = 0;
15 |
16 | public DummyModuleView2()
17 | {
18 | // Placed here so Avalonia viewer doesn't freak out
19 | // Since we're not using an MVVM approach here
20 | }
21 |
22 | public DummyModuleView2(IEventAggregator eventAggregator, IRegionManager regionManager)
23 | {
24 | _eventAggregator = eventAggregator;
25 |
26 | InitializeComponent();
27 |
28 | _regionViewTextBox = this.FindControl