Installation¶
Install the ReactiveUI package for your UI framework. It brings the core ReactiveUI package, and
ReactiveUI.Binding for bindings, so one reference is enough for an app project.
A class library that holds only view models references ReactiveUI.
dotnet add package ReactiveUI.WPF
The suite installation guide covers the other libraries, and how to pick
between the default packages and the .Reactive packages for an app that uses System.Reactive.
Packages by platform¶
Each platform page shows how to install the package and start ReactiveUI when your app starts.
| Platform | ReactiveUI package | It brings | NuGet |
|---|---|---|---|
| Class libraries | ReactiveUI | ReactiveUI.Binding | |
| WPF | ReactiveUI.WPF | ReactiveUI.Binding.Wpf | |
| Windows Forms | ReactiveUI.WinForms | ReactiveUI.Binding.WinForms | |
| MAUI | ReactiveUI.Maui | ReactiveUI.Binding.Maui | |
| WinUI | ReactiveUI.WinUI | ReactiveUI.Binding | |
| Android (AndroidX) | ReactiveUI.AndroidX | ReactiveUI.Binding | |
| Blazor | ReactiveUI.Blazor | ReactiveUI.Binding | |
| Avalonia | ReactiveUI.Avalonia | ReactiveUI.Binding | |
| Uno Platform | ReactiveUI.Uno | ReactiveUI.Binding | |
| Unit tests | ReactiveUI.Testing |
ReactiveUI.Avalonia and ReactiveUI.Uno live in their own repositories,
reactiveui/ReactiveUI.Avalonia and
reactiveui/ReactiveUI.Uno. The other packages come from
reactiveui/ReactiveUI.
Bindings come from ReactiveUI.Binding¶
ReactiveUI runs WhenAnyValue, Bind, OneWayBind, BindCommand, ToProperty and view location on
ReactiveUI.Binding. You do not add a Binding package yourself. The ReactiveUI package also imports the
ReactiveUI.Binding namespace into your project, so your binding calls compile with no new using.
ReactiveUI.Binding writes the code for each binding while your project builds. Build once after you install, and read
any warning that starts with RXUIBIND. Each one names a binding that gets no generated code. The
analyzer messages list the fixes.
Moving from an earlier version? The ReactiveUI.Binding migration guide walks through the upgrade.
Related packages¶
These packages add to ReactiveUI. Each has its own repository and its own section.
| Package | What it adds |
|---|---|
| ReactiveUI.SourceGenerators | Writes reactive properties and commands for you |
| ReactiveUI.Validation | Validation rules for view models |
| Sextant | Navigation that starts from the view model |
| ReactiveUI.Maui.Plugins.Popup | Reactive popup pages for MAUI |
ReactiveUI.Fody is legacy. Use ReactiveUI.SourceGenerators for new code. The migration guide shows how to move. Xamarin is no longer supported. See Xamarin to MAUI.
A typical solution¶
.
├── MyApp.Core (class library)
│ ├── ReactiveUI
│ └── ReactiveUI.SourceGenerators
├── MyApp.Wpf
│ └── ReactiveUI.WPF
├── MyApp.WinUI
│ └── ReactiveUI.WinUI
├── MyApp.Maui
│ └── ReactiveUI.Maui
├── MyApp.Avalonia
│ └── ReactiveUI.Avalonia
└── MyApp.Tests
└── ReactiveUI.Testing
Minimum versions lists the platform versions ReactiveUI needs.