Package Installation
If you want to get started with ReactiveUI for WinUI, you will need to install some packages and follow some steps.
Here is a brief introduction:
Install packages:
You will need to install the ReactiveUI.WinUI package, which contains the core functionality and base classes for WinUI applications. You will also need to install the ReactiveMarbles.ObservableEvents.SourceGenerator package, which enables automatic property change notifications. You can use the NuGet Package Manager or the Package Manager Console to install these packages.
Create a view model:
A view model is a class that represents the state and logic of your user interface. You can use the ReactiveObject base class to create a view model that supports reactive properties and commands. You can also use the ReactiveValidationObject base class to create a view model that supports validation rules and error messages.
Create a view:
A view is a class that defines the appearance and layout of your user interface.
You can use the IViewFor
Assuming the following project structure:
- MyCoolApp (netstandard library)
- MyCoolApp.WinUI (application)
- MyCoolApp.UnitTests (tests)
- Install ReactiveUI into your netstandard libraries and tests.
- Install ReactiveUI.WinUI into your application and tests.
- Install ReactiveMarbles.ObservableEvents.SourceGenerator into your application.
- Install ReactiveUI.Testing into your tests.