How to use ReactiveUI events in avalonia?

140 Views Asked by At

If I make a new project with the latest Avalonia, and try the following code:

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        this.Events().Closed.Subscribe((e) =>
        {
            
        });
    }
}

The .Events() can't be resolved.

Having <PackageReference Include="Avalonia.ReactiveUI.Events" Version="0.10.22" /> does not help.

I can see this breaking change: https://github.com/AvaloniaUI/Avalonia/pull/5423

I tried to use Pharmacist per instructions on that link but then I get 50 other errors (on a fresh new project).

Does anyone know how to use RxUI events?

BTW I am new to Avalonia so I might be missing something glaring. I did spend several hours trying to figure this out to no avail. A simple rudimentary Hello World example would be extremely helpful.

0

There are 0 best solutions below