diff --git a/ChangeLog.md b/ChangeLog.md
index 009dff7..e4cdcdb 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -2,6 +2,10 @@
Change log history for Prism.Avalonia
+## v8.1.97.11073 (2024-04-28)
+
+* Removed dependency on Avalonia.ReactiveUI
+
## v8.1.97.11072 (2024-01-27)
* Added support for .NET 8
diff --git a/README.md b/README.md
index 5578a8c..de11063 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,11 @@
[Prism.Avalonia](https://github.com/AvaloniaCommunity/Prism.Avalonia) provides your [Avalonia](https://avaloniaui.net/) apps with [Prism framework](https://github.com/PrismLibrary/Prism) 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:**
-> _Prism.Avalonia v9.0 beta coming soon!_
+> **Announcement!**
+>
+> * _Prism.Avalonia v9.0.401-pre just arrived!_
+> * _Prism.Avalonia v9.0.271-pre just 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:**
@@ -11,10 +14,13 @@
* [Learn PrismLibrary](https://github.com/DamianSuess/Learn.PrismLibrary)
* _If you have samples, let us know and we'll feature them!_
-![Sample Outlookish](logo/Sample-Outlookish.png)
+
+![Sample Outlookish](https://raw.githubusercontent.com/AvaloniaCommunity/Prism.Avalonia/stable/v8.1.97.11xx/logo/Sample-Outlookish.png)
With Prism.Avalonia's logic and development approach being **similar** to that of [Prism for WPF](https://github.com/PrismLibrary/Prism/), so you 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.
+## 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
@@ -22,23 +28,32 @@ Just like Prism.WPF or Prism.Maui, your project must reference both the Prism.Av
| Prism.Avalonia | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=false)](https://www.nuget.org/packages/Prism.Avalonia/) | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.Avalonia/)
| Prism.DryIoc.Avalonia | [![Prism.DryIoc.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.DryIoc.Avalonia?dWidth=70&includePreReleases=false)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/) | [![Prism.DryIoc.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.DryIoc.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/)
-## Version Notice
+### Version Notice
Choose the NuGet package version that matches your Avalonia version.
-The Avalonia version of this package uses [SemVer](https://semver.org/) format: `MAJOR.MINOR.PATCH.REVISION`. The `REVISION` segment indicates
-the Avalonia version support. For instance `v8.1.97.11000` of this library supports, Avalonia v11.0.0.
+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.11000` of this library supports, Prism `v8.1.97` and Avalonia `v11.0.x`.
-| Avalonia Version | NuGet Package |
-|-|-|
-| **11.0** | 8.1.97.11000 ([Core](https://www.nuget.org/packages/Prism.Avalonia/8.1.97.11000)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/8.1.97.11000))
-| **0.10.21** | 8.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))
-| **11.0 RC-1.1** | 8.1.97.11000-rc1.1 ([Core](https://www.nuget.org/packages/Prism.Avalonia/8.1.97.11000-rc1.1)) ([DryIoc](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/8.1.97.11000-rc1.1))
-| 11.0 Preview 8 | 8.1.97.11-preview.11.8
-| 11.0 Preview 5 | 8.1.97.4-preview.11.5
-| 11.0 Preview 4 | 8.1.97.3-preview.11.4
+| Prism Version | Avalonia Version | 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.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))
+
+Be sure to check out the [ChangeLog.md](ChangeLog.md) and guides when upgrading your NuGet packages:
+
+* [Upgrading to Prism v9.0.x-pre](https://github.com/AvaloniaCommunity/Prism.Avalonia/wiki/Upgrading-to-Prism-v9.0)
+* [Upgrading to Avalonia-11](Upgrading-to-Avalonia-11.md)
+* Also, the official [Avalonia Upgrading from v0.10](https://docs.avaloniaui.net/docs/next/stay-up-to-date/upgrade-from-0.10).
+
+## Contributing
+
+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.
-Be sure to check out the [ChangeLog.md](ChangeLog.md) and [Upgrading-to-Avalonia-11.md](Upgrading-to-Avalonia-11.md) when upgrading your NuGet packages. Also, view the official [Avalonia Upgrading from v0.10](https://docs.avaloniaui.net/docs/next/stay-up-to-date/upgrade-from-0.10).
+Issues posted without a description may be closed immediately. Use the discussion boards if you have a question, not Issues.
## Install
@@ -46,8 +61,8 @@ Add the Prism.Avalonia and its DryIoc packages to your project:
```powershell
# Avalonia v11
-Install-Package Prism.Avalonia -Version 8.1.97.11000
-Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.11000
+Install-Package Prism.Avalonia -Version 8.1.97.11073
+Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.11073
# Avalonia v0.10.1021
Install-Package Prism.Avalonia -Version 8.1.97.1021
@@ -188,12 +203,4 @@ Below is a basic branching hierarchy and strategy.
| `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.
-## Contributing
-
-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.
-
-
-
**Sponsored by:** [Suess Labs](https://suesslabs.com) a subsidary of Xeno Innovations, Inc.
diff --git a/build/AvaloniaDependency.props b/build/AvaloniaDependency.props
index fd5be6a..f6e537b 100644
--- a/build/AvaloniaDependency.props
+++ b/build/AvaloniaDependency.props
@@ -4,7 +4,6 @@
-
diff --git a/build/Base.props b/build/Base.props
index f374eea..722bbf3 100644
--- a/build/Base.props
+++ b/build/Base.props
@@ -2,7 +2,7 @@
- 8.1.97.11072
+ 8.1.97.11073
https://github.com/AvaloniaCommunity/Prism.Avalonia
Copyright (c) 2024 Xeno Innovations, Inc.
MIT
diff --git a/samples/SampleMvvmApp/readme.md b/samples/SampleMvvmApp/readme.md
index fcc47b4..2ff79aa 100644
--- a/samples/SampleMvvmApp/readme.md
+++ b/samples/SampleMvvmApp/readme.md
@@ -2,10 +2,10 @@
This demonstrates the following Prism.Avalonia features:
-* .NET 6 - Cross-platform
+* .NET 6, 7, 8 - Cross-platform
* MVVM Pattern - _Model View ViewModel_
* Prism Navigation with and without passing parameters.
-* Prism Journling backwards
+* Prism Journaling backwards
* Prism Regions for placing views
* Prism Region with multiple views - registering multiple views and displaying them in a single ItemsControl using a custom ItemsControlRegionAdapter
* Prism.DryIoc for Dependency Injection of Services
diff --git a/src/Prism.Avalonia/Common/ObservableObject.cs b/src/Prism.Avalonia/Common/ObservableObject.cs
index cde4a6d..9a7358a 100644
--- a/src/Prism.Avalonia/Common/ObservableObject.cs
+++ b/src/Prism.Avalonia/Common/ObservableObject.cs
@@ -1,5 +1,5 @@
-using System;
-using System.ComponentModel;
+using System.ComponentModel;
+using Prism.Extensions;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/Prism.Avalonia/Common/Stubs.cs b/src/Prism.Avalonia/Common/Stubs.cs
new file mode 100644
index 0000000..c414a71
--- /dev/null
+++ b/src/Prism.Avalonia/Common/Stubs.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace Prism.Common
+{
+ internal static class Stubs
+ {
+ public static readonly Action Nop = () => { };
+ public static readonly Action Throw = ex => { throw ex; };
+ }
+}
diff --git a/src/Prism.Avalonia/Extensions/ObservableExtensions.cs b/src/Prism.Avalonia/Extensions/ObservableExtensions.cs
new file mode 100644
index 0000000..dad8f94
--- /dev/null
+++ b/src/Prism.Avalonia/Extensions/ObservableExtensions.cs
@@ -0,0 +1,35 @@
+using System;
+using Avalonia.Reactive;
+using Prism.Common;
+
+namespace Prism.Extensions
+{
+ internal static class ObservableExtensions
+ {
+ ///
+ /// Subscribes an element handler to an observable sequence.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Observable sequence to subscribe to.
+ /// Action to invoke for each element in the observable sequence.
+ /// object used to unsubscribe from the observable sequence.
+ /// or is null.
+ public static IDisposable Subscribe(this IObservable source, Action onNext)
+ {
+ if (source == null)
+ {
+ throw new ArgumentNullException(nameof(source));
+ }
+
+ if (onNext == null)
+ {
+ throw new ArgumentNullException(nameof(onNext));
+ }
+
+ //
+ // [OK] Use of unsafe Subscribe: non-pretentious constructor for an observer; this overload is not to be used internally.
+ //
+ return source.Subscribe/*Unsafe*/(new AnonymousObserver(onNext, Stubs.Throw, Stubs.Nop));
+ }
+ }
+}
diff --git a/src/Prism.Avalonia/Mvvm/ViewModelLocator.cs b/src/Prism.Avalonia/Mvvm/ViewModelLocator.cs
index b6c68f5..dcfa255 100644
--- a/src/Prism.Avalonia/Mvvm/ViewModelLocator.cs
+++ b/src/Prism.Avalonia/Mvvm/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using System.ComponentModel;
-using System.Threading;
-using System;
+using Prism.Extensions;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/Prism.Avalonia/Properties/AssemblyInfo.cs b/src/Prism.Avalonia/Properties/AssemblyInfo.cs
index e503e22..3cfc4be 100644
--- a/src/Prism.Avalonia/Properties/AssemblyInfo.cs
+++ b/src/Prism.Avalonia/Properties/AssemblyInfo.cs
@@ -1,4 +1,5 @@
using System;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Avalonia.Metadata;
@@ -18,3 +19,5 @@
[assembly: XmlnsDefinition("http://prismlibrary.com/", "Prism.Interactivity")]
[assembly: XmlnsDefinition("http://prismlibrary.com/", "Prism.Services.Dialogs")]
[assembly: XmlnsDefinition("http://prismlibrary.com/", "Prism.Ioc")]
+
+[assembly: InternalsVisibleTo("Prism.Avalonia.Tests")]
diff --git a/src/Prism.Avalonia/Regions/ItemMetadata.cs b/src/Prism.Avalonia/Regions/ItemMetadata.cs
index 321ff25..b7debab 100644
--- a/src/Prism.Avalonia/Regions/ItemMetadata.cs
+++ b/src/Prism.Avalonia/Regions/ItemMetadata.cs
@@ -1,4 +1,5 @@
-using Avalonia;
+using Avalonia;
+using Prism.Extensions;
using System;
namespace Prism.Regions
diff --git a/src/Prism.Avalonia/Regions/RegionContext.cs b/src/Prism.Avalonia/Regions/RegionContext.cs
index e21bccd..946b46e 100644
--- a/src/Prism.Avalonia/Regions/RegionContext.cs
+++ b/src/Prism.Avalonia/Regions/RegionContext.cs
@@ -1,6 +1,7 @@
-using System;
+using System;
using Avalonia;
using Prism.Common;
+using Prism.Extensions;
namespace Prism.Regions
{
diff --git a/src/Prism.Avalonia/Regions/RegionManager.cs b/src/Prism.Avalonia/Regions/RegionManager.cs
index 14037be..9940c82 100644
--- a/src/Prism.Avalonia/Regions/RegionManager.cs
+++ b/src/Prism.Avalonia/Regions/RegionManager.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
@@ -9,6 +9,7 @@
using System.Threading;
using Prism.Common;
using Prism.Events;
+using Prism.Extensions;
using Prism.Ioc;
using Prism.Properties;
using Prism.Regions.Behaviors;
diff --git a/src/Prism.Avalonia/Services/Dialogs/Dialog.cs b/src/Prism.Avalonia/Services/Dialogs/Dialog.cs
index faf8d43..9255ab0 100644
--- a/src/Prism.Avalonia/Services/Dialogs/Dialog.cs
+++ b/src/Prism.Avalonia/Services/Dialogs/Dialog.cs
@@ -1,7 +1,7 @@
-using System;
-using Avalonia;
+using Avalonia;
using Avalonia.Controls;
using Avalonia.Styling;
+using Prism.Extensions;
namespace Prism.Services.Dialogs
{
diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Interactivity/ObservableBehaviorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Interactivity/ObservableBehaviorFixture.cs
new file mode 100644
index 0000000..1c58b61
--- /dev/null
+++ b/tests/Avalonia/Prism.Avalonia.Tests/Interactivity/ObservableBehaviorFixture.cs
@@ -0,0 +1,56 @@
+using Avalonia;
+using Xunit;
+using Prism.Extensions;
+
+namespace Prism.Avalonia.Tests.Interactivity
+{
+ public class ObservableBehaviorFixture
+ {
+ [Fact]
+ public void SubscribeWorksOnIObservableWithLambda()
+ {
+ var targetUIElement = new TestAvaloniaObject();
+ targetUIElement.Test = "123";
+
+ Assert.Equal("123", targetUIElement.OutTest);
+ }
+ }
+
+ class TestAvaloniaObject : AvaloniaObject
+ {
+ ///
+ /// The property to subscribe on.
+ ///
+ public static readonly StyledProperty TestProperty =
+ AvaloniaProperty.Register("Test");
+
+ ///
+ /// Gets or sets a value to the TestProperty.
+ ///
+ public string Test
+ {
+ get { return (string)GetValue(TestProperty); }
+ set { SetValue(TestProperty, value); }
+ }
+
+ ///
+ /// The out test property to check after TestProperty change
+ ///
+ public string OutTest { get; set; }
+
+ ///
+ /// Initializes a new instance of .
+ ///
+#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ public TestAvaloniaObject()
+#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ {
+ TestProperty.Changed.Subscribe(args => OnPropertyChanged(args));
+ }
+
+ private void OnPropertyChanged(AvaloniaPropertyChangedEventArgs args)
+ {
+ OutTest = args.NewValue.Value;
+ }
+ }
+}