ReactiveUI.WinUI 24.2.0

Prefix Reserved
dotnet add package ReactiveUI.WinUI --version 24.2.0
                    
NuGet\Install-Package ReactiveUI.WinUI -Version 24.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ReactiveUI.WinUI" Version="24.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ReactiveUI.WinUI" Version="24.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ReactiveUI.WinUI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ReactiveUI.WinUI --version 24.2.0
                    
#r "nuget: ReactiveUI.WinUI, 24.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ReactiveUI.WinUI@24.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ReactiveUI.WinUI&version=24.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ReactiveUI.WinUI&version=24.2.0
                    
Install as a Cake Tool

Build Code Coverage #yourfirstpr alternate text is missing from this package README image

<br> <a href="https://github.com/reactiveui/reactiveui"> <img width="160" heigth="160" src="https://raw.githubusercontent.com/reactiveui/styleguide/master/logo/main.png"> </a> <br>

What is ReactiveUI?

ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming, which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application.

πŸ”¨ Get Started πŸ› Install Packages 🎞 Watch Videos πŸŽ“ View Samples 🎀 Discuss ReactiveUI

Documentation

  • RxSchedulers - Using ReactiveUI schedulers without RequiresUnreferencedCode attributes

Book

There has been an excellent book written by our Alumni maintainer Kent Boogart.

NuGet Packages

Install the following packages to start building your own ReactiveUI app. <b>Note:</b> some of the platform-specific packages are required. This means your app won't perform as expected until you install the packages properly. See the <a href="https://reactiveui.net/documentation/getting-started/installation/">Installation</a> docs page for more info.

Platform ReactiveUI Package NuGet
.NET Standard ReactiveUI CoreBadge
Any ReactiveUI.SourceGenerators SGBadge
Unit Testing ReactiveUI.Testing TestBadge
WPF ReactiveUI.WPF WpfBadge
WinUI ReactiveUI.WinUI WinUiBadge
MAUI ReactiveUI.Maui MauiBadge
Windows Forms ReactiveUI.WinForms WinBadge
AndroidX ReactiveUI.AndroidX DroXBadge
Blazor ReactiveUI.Blazor BlazBadge
Platform Uno ReactiveUI.Uno UnoBadge
Platform Uno ReactiveUI.Uno.WinUI UnoWinUiBadge
Avalonia ReactiveUI.Avalonia AvaBadge
Any ReactiveUI.Validation ValBadge
Any ReactiveUI.Extensions ExtBadge

Choosing a distribution: ReactiveUI.Primitives or System.Reactive

ReactiveUI ships in two interchangeable distributions with an identical public API, both built on the same ReactiveUI.Primitives engine and the same high-performance custom schedulers/sinks. The only difference is which reactive interop types appear in the public API β€” so you pick a distribution, you don't rewrite code:

You want… Reference these packages Public reactive types
The new, lighter default (no System.Reactive dependency) ReactiveUI, ReactiveUI.Wpf, ReactiveUI.WinForms, ReactiveUI.WinUI, ReactiveUI.Maui, ReactiveUI.Blazor, ReactiveUI.AndroidX, … ReactiveUI.Primitives β€” RxVoid, ISequencer, Signal<T>
Drop-in interop with existing System.Reactive code ReactiveUI.Reactive, ReactiveUI.Wpf.Reactive, ReactiveUI.WinForms.Reactive, ReactiveUI.WinUI.Reactive, ReactiveUI.Maui.Reactive, ReactiveUI.Blazor.Reactive, … System.Reactive β€” Unit, IScheduler

The .Reactive family is not "old ReactiveUI" β€” it runs on the exact same Primitives engine and custom schedulers as the default and simply surfaces System.Reactive.Unit/IScheduler (and Subject<T>) so it composes with code that already uses System.Reactive.

The default distribution drops the System.Reactive dependency for a smaller closure and a better trimming/AOT story, and is markedly faster on the hottest MVVM paths β€” in representative micro-benchmarks roughly 3–4Γ— faster on WhenAnyValue/ToProperty subscribe and emit, with 5–13Γ— less allocation (for example WhenAnyValue emit drops from ~6.8 MB to ~0.5 MB per run, and ToProperty construction from ~7.3 Β΅s to ~1.0 Β΅s). The fast schedulers now live in ReactiveUI.Primitives and back both distributions.

If you take the default packages, note the public reactive types change: IScheduler β†’ ISequencer, System.Reactive.Unit β†’ RxVoid, and Subject<T>/BehaviorSubject<T> β†’ Signal<T>/BehaviorSignal<T>. To upgrade with zero source changes, reference the matching *.Reactive packages instead β€” they keep IScheduler, Unit and Subject<T>.

Core routing (RoutingState, IScreen, RoutedViewHost) stays in the main package, but the DynamicData change-set routing/collection/auto-persist helpers now live in a separate ReactiveUI.Routing package (ReactiveUI.Routing.Reactive for the System.Reactive flavor), so core no longer depends on DynamicData. Add ReactiveUI.Routing if you use those extensions.

Analyzers are opt-in

The ReactiveUI packages reference ReactiveUI.Primitives with ExcludeAssets="analyzers", so the analyzers that ship inside ReactiveUI.Primitives do not flow to your project and will not run against your code just because you installed ReactiveUI. We don't impose our analyzers on downstream consumers. If you want them, opt in explicitly by adding a direct reference to ReactiveUI.Primitives (without excluding the analyzer assets), e.g.:

<PackageReference Include="ReactiveUI.Primitives" Version="x.y.z" />

Sponsorship

The core team members, ReactiveUI contributors and contributors in the ecosystem do this open-source work in their free time. If you use ReactiveUI, a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.

Become a sponsor.

Migration from Xamarin and .NET 8 MAUI