I need to call method when application is closing in Avalonia. Honestly on startup too, but this can be handled by view model constructor.
The obstacle is that Avalonia documentation is empty and barren, so I basically have zero information how to do it. I've already tried doing it the same as in WPF but it doesn't work. Example. Avalonia doesn't even have Exit or ExitEventArgs objects.
So the only thing left is to bash my head against the wall hoping that one of the random methods work, but this metod is yet to bear fruit.
Closing
andActivated
events on your main window – Cyanohydrin