diff --git a/ChangeLog.md b/ChangeLog.md index 2bdddac..40c8dc0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,7 +2,23 @@ Change log history for Prism.Avalonia -## v9.0.401-pre (20204-04-13) +## v9.0.401.11110-pre (2024-08-03) + +* Upgraded to Avalonia v11.1.1 +* Fixed ItemsControlRegionAdapter not attaching object due to previous binding + +## v9.0.401.11074-pre (2024-07-26) + +* Prism.Core v9.0.401-pre +* Removed dependency on Avalonia.ReactiveUI +* Updated documentation +* Synced with latest develop + +## v9.0.401.11000-pre (2024-04-28) + +* Fixed Prism.Core targeting v9.0.401-pre + +## v9.0.401.11074-pre (2024-04-13) * Fixed typos * DynamicallyAccessedMembers Attribute for linker hints @@ -11,8 +27,9 @@ Change log history for Prism.Avalonia ## v9.0.271-pre (2024-04-12) * Upgraded Prism.Core to v9.0.271-pre +* Using Prism.Container * Breaking Changes: - * `Prism.Dialog` + * `Prism.Dialog` [see PR #128](https://github.com/AvaloniaCommunity/Prism.Avalonia/pull/128) * `Prism.Region` -> `Prism.Navigation.Region` ## v8.1.97.11073 (2024-04-28) diff --git a/Directory.Packages.props b/Directory.Packages.props index e7c9188..42d8cf4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,5 +1,4 @@ - @@ -7,19 +6,17 @@ - - - - - - + + + + + - - + + - @@ -30,18 +27,16 @@ - - - + - + \ No newline at end of file diff --git a/README.md b/README.md index bc2653d..c4307d7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ > **Announcement!** > > * _Prism.Avalonia v9.0.401-pre just arrived!_ -> * _Prism.Avalonia v9.0.271-pre just arrived!_ +> * _Support for Avalonia v11.1.x has arrived!_ > * Follow the [Upgrading to Prism v9.0.x-pre](https://github.com/AvaloniaCommunity/Prism.Avalonia/wiki/Upgrading-to-Prism-v9.0) guide for breaking changes **For more samples outside of this repo, check out:** @@ -21,7 +21,7 @@ With Prism.Avalonia's logic and development approach being **similar** to that o ## 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. +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 |-|-|-| @@ -34,9 +34,10 @@ Choose the NuGet package version that matches your Avalonia version. Our [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 `v8.1.97.11073` equates to, Prism `v8.1.97`, Avalonia `v11.0.7`, _revision_ `3`. -| Prism Version | Avalonia Version | NuGet Package +| Prism | Avalonia | Prism.Avalonia NuGet Package |-|-|- -| v9.0.401-pre | **11.0.7** | v9.0.401.11000-pre ([Core](https://www.nuget.org/packages/Prism.Avalonia/9.0.401.11000-pre)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/9.0.401.11000-pre)) +| v9.0.401-pre | **11.1.1** | v9.0.401.11110-pre ([Core](https://www.nuget.org/packages/Prism.Avalonia/9.0.401.11110-pre)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/9.0.401.11110-pre)) +| v9.0.401-pre | **11.0.7** | v9.0.401.11074-pre ([Core](https://www.nuget.org/packages/Prism.Avalonia/9.0.401.11074-pre)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/9.0.401.11074-pre)) | v9.0.271-pre | **11.0.7** | v9.0.271.11000-pre ([Core](https://www.nuget.org/packages/Prism.Avalonia/9.0.271.11000-pre)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/9.0.271.11000-pre)) | 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)) | 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)) @@ -62,7 +63,11 @@ Issues posted without a description may be closed immediately. Use the discussio Add the Prism.Avalonia and its DryIoc packages to your project: ```powershell -# Avalonia v11 +# Latest Preview Release +Install-Package Prism.Avalonia -Version 9.0.401.11110-pre +Install-Package Prism.DryIoc.Avalonia -Version 9.0.401.11110-pre + +# Avalonia v11 (GA) Install-Package Prism.Avalonia -Version 8.1.97.11073 Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.11073 diff --git a/Upgrading-Prism.md b/Upgrading-Prism.md index b0bacb9..4630e0b 100644 --- a/Upgrading-Prism.md +++ b/Upgrading-Prism.md @@ -19,21 +19,16 @@ This file documents the upgrade path from Prism v8.1.97 to v9.0-pre support. Soo Each of the following will be tagged and merged into the branch `Prism-9x` before being merged with `develop` and `master` branches. -**Progress:** - -* [/] 9.0.271-pre - Will be tagged and released -* [ ] 9.0.401-pre - Will be tagged and released - ### Release Comparison As we all know, not everything is straight forward between these two XAML technologies. However, it's a good reminder to document the differences and 'got-yas'. -* [Prism v7.2.0.1422 to v8.0.0.1909](https://github.com/PrismLibrary/Prism/compare/v7.2.0.1422...v8.0.0.1909) -* [Prism v7.2.0.1422 to v8.1.97](https://github.com/PrismLibrary/Prism/compare/v7.2.0.1422...v8.1.97) -* [Prism v8.0.0.1909 to v8.1.97](https://github.com/PrismLibrary/Prism/compare/v8.0.0.1909...v8.1.97) -* [DNF - 9.0.264-pre](https://github.com/PrismLibrary/Prism/compare/DNF...9.0.264-pre) - (_DNF = Dot Net Foundation_) -* [9.0.264-pre - 9.0.274-pre](https://github.com/PrismLibrary/Prism/compare/9.0.264-pre...9.0.271-pre) * [9.0.274-pre - 9.0.401-pre](https://github.com/PrismLibrary/Prism/compare/9.0.271-pre...9.0.401-pre) +* [9.0.264-pre - 9.0.274-pre](https://github.com/PrismLibrary/Prism/compare/9.0.264-pre...9.0.271-pre) +* [DNF - 9.0.264-pre](https://github.com/PrismLibrary/Prism/compare/DNF...9.0.264-pre) - (_DNF = Dot Net Foundation_) +* [Prism v8.0.0.1909 to v8.1.97](https://github.com/PrismLibrary/Prism/compare/v8.0.0.1909...v8.1.97) +* [Prism v7.2.0.1422 to v8.1.97](https://github.com/PrismLibrary/Prism/compare/v7.2.0.1422...v8.1.97) +* [Prism v7.2.0.1422 to v8.0.0.1909](https://github.com/PrismLibrary/Prism/compare/v7.2.0.1422...v8.0.0.1909) ### Changes @@ -529,7 +524,8 @@ public class ItemMetadata : AvaloniaObject ### Property -Note +Note: + * Avalonia places WPF's `propertyType` as part of `TValue` in `` * The `THost` object type is what is used in the Get and Set methods. diff --git a/build/Base.props b/build/Base.props index 7c6e063..1bdc392 100644 --- a/build/Base.props +++ b/build/Base.props @@ -2,7 +2,7 @@ - 9.0.401.11074-pre + 9.0.401.11110-pre https://github.com/AvaloniaCommunity/Prism.Avalonia Copyright (c) 2024 Xeno Innovations, Inc. MIT diff --git a/build/Nuget.props b/build/Nuget.props index be915ee..0a088d4 100644 --- a/build/Nuget.props +++ b/build/Nuget.props @@ -6,9 +6,9 @@ true true + * Upgraded to support Avalonia v11.1.1 * Upgraded to support Prism v9.0.401-pre - * Upgraded to support Avalonia v11.0.7 - * Removed dependency on Avalonia.ReactiveUI + * Fixed ItemsControlRegionAdapter not attaching object due to previous binding (Avalonia v11.x) diff --git a/e2e/DummyModule1/DummyModule1.cs b/e2e/DummyModule1/DummyModule1.cs index 1cc6bf9..04c7d79 100644 --- a/e2e/DummyModule1/DummyModule1.cs +++ b/e2e/DummyModule1/DummyModule1.cs @@ -1,13 +1,9 @@ -// Temp disabled logging: -// - Prism.Logging has been moved and `ILoggerFacade` is deprecated.Prism.Logging.Serilog is out of date. -// - https://github.com/augustoproiete/prism-logging-serilog/issues/3 -using System.Threading; +using System.Threading; using DummyModule.View; using ModulesSample.Infrastructure; using Prism.Avalonia.Infrastructure.Events; using Prism.Events; using Prism.Ioc; -////using Prism.Logging; using Prism.Modularity; using Prism.Navigation.Regions; @@ -15,40 +11,43 @@ namespace DummyModule { public class DummyModule1 : IModule { - ////private readonly ILoggerFacade _logger; private readonly IModuleTracker _moduleTracker; + private readonly IEventAggregator _eventAggregator; private readonly IRegionManager _regionManager; public DummyModule1(IModuleTracker moduleTracker, IEventAggregator eventAggregator, IRegionManager regionManager) - ////public DummyModule1(ILoggerFacade logger, IModuleTracker moduleTracker, IEventAggregator eventAggregator, IRegionManager regionManager) { - ////_logger = logger; _moduleTracker = moduleTracker; _eventAggregator = eventAggregator; _regionManager = regionManager; - } - private void DummyEventPublisher() - { - while (true) - { - Thread.Sleep(2500); - _eventAggregator.GetEvent().Publish(); - } + _moduleTracker.RecordModuleConstructed(ModuleNames.ModuleDummy1); } public void RegisterTypes(IContainerRegistry containerRegistry) { + _moduleTracker.RecordModuleLoaded(ModuleNames.ModuleDummy1); } public void OnInitialized(IContainerProvider containerProvider) { - Thread thread = new Thread(new ThreadStart(DummyEventPublisher)); + // Send Event messages for subscribers to react to + Thread thread = new(new ThreadStart(DummyEventPublisher)); thread.Start(); _regionManager.RegisterViewWithRegion(RegionNames.Region1, typeof(DummyModuleView)); _moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy1); } + + /// Publish events to subscribers. + private void DummyEventPublisher() + { + while (true) + { + Thread.Sleep(500); + _eventAggregator.GetEvent().Publish(); + } + } } } diff --git a/e2e/DummyModule2/DumyModule2.cs b/e2e/DummyModule2/DumyModule2.cs index 11080a1..f575e56 100644 --- a/e2e/DummyModule2/DumyModule2.cs +++ b/e2e/DummyModule2/DumyModule2.cs @@ -15,16 +15,19 @@ public DummyModule2(IModuleTracker moduleTracker, IRegionManager regionManager) { _moduleTracker = moduleTracker; _regionManager = regionManager; + + _moduleTracker.RecordModuleConstructed(ModuleNames.ModuleDummy2); } public void OnInitialized(IContainerProvider containerProvider) { - _moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy1); + _moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy2); _regionManager.RegisterViewWithRegion(RegionNames.Region2, typeof(DummyModuleView2)); } public void RegisterTypes(IContainerRegistry containerRegistry) { + _moduleTracker.RecordModuleLoaded(ModuleNames.ModuleDummy2); } } } diff --git a/e2e/DummyModule2/Views/DummyModuleView2.axaml b/e2e/DummyModule2/Views/DummyModuleView2.axaml index e63d4db..8918669 100644 --- a/e2e/DummyModule2/Views/DummyModuleView2.axaml +++ b/e2e/DummyModule2/Views/DummyModuleView2.axaml @@ -1,13 +1,17 @@  - - - - + x:Class="DummyModule2.View.DummyModuleView2" + prism:ViewModelLocator.AutoWireViewModel="True"> + + - + \ No newline at end of file diff --git a/e2e/DummyModule2/Views/DummyModuleView2.axaml.cs b/e2e/DummyModule2/Views/DummyModuleView2.axaml.cs index 61f85fb..8a39800 100644 --- a/e2e/DummyModule2/Views/DummyModuleView2.axaml.cs +++ b/e2e/DummyModule2/Views/DummyModuleView2.axaml.cs @@ -10,10 +10,13 @@ namespace DummyModule2.View public partial class DummyModuleView2 : UserControl { private readonly IEventAggregator _eventAggregator; - private TextBox _regionViewTextBox; + private readonly Label _regionViewTextBox; + private int _counter = 0; public DummyModuleView2() { + // Placed here so Avalonia viewer doesn't freak out + // Since we're not using an MVVM approach here } public DummyModuleView2(IEventAggregator eventAggregator, IRegionManager regionManager) @@ -22,18 +25,23 @@ public DummyModuleView2(IEventAggregator eventAggregator, IRegionManager regionM InitializeComponent(); - _regionViewTextBox = this.FindControl("RegionViewTextBox"); + _regionViewTextBox = this.FindControl