Skip to content

UI: Update to Avalonia 12, .NET 10 and replace ReactiveUI with MVVM community toolkit#142

Open
SourMesen wants to merge 2 commits into
masterfrom
SourAvaloniaDotNetUpdates
Open

UI: Update to Avalonia 12, .NET 10 and replace ReactiveUI with MVVM community toolkit#142
SourMesen wants to merge 2 commits into
masterfrom
SourAvaloniaDotNetUpdates

Conversation

@SourMesen
Copy link
Copy Markdown
Collaborator

This updates the UI to use .NET 10 and updates all nuget packages to their latest version, specifically:

  • Avalonia (12.0.3)
  • AvaloniaEdit (12.0.0)
  • Dock.Avalonia (12.0.0.2)

ReactiveUI.Fody and Avalonia.ReactiveUI (which was deprecated) are no longer used and have been replaced with CommunityToolkit.Mvvm (which is responsible for nearly all the changes in this PR), in particular:

  • [Reactive] -> [ObservableProperty]
  • ReactiveObject -> ObservableObject
  • Properties using [ObservableProperty] must be marked as "partial" to work, along with their parent class (needed because this is implemented via source generators)
  • ReactiveUI's WhenAnyValue was replaced with custom code/helpers

Avalonia 12 no longer supports .NET 6, which means the .NET 6 build for Windows 7 / 8 users can no longer be supported. The build definitions and readme have been updated to remove the Windows .NET 6 build.

@SourMesen SourMesen force-pushed the SourAvaloniaDotNetUpdates branch from 237359b to 95b9e60 Compare May 26, 2026 11:09
@SourMesen SourMesen marked this pull request as ready for review May 26, 2026 11:15
@SourMesen SourMesen closed this May 26, 2026
@SourMesen SourMesen reopened this May 26, 2026
@SourMesen SourMesen closed this May 26, 2026
@SourMesen SourMesen reopened this May 26, 2026
@yuriks
Copy link
Copy Markdown

yuriks commented May 26, 2026

Out of curiosity: While Avalonia.ReactiveUI was removed from Avalonia itself, I think the intent was that people move to the ReactiveUI.Avalonia package released as a standalone project, from what I could tell from release notes. Did you just decide to rewrite using Mvvm as a preference or was that an oversight?

@SourMesen
Copy link
Copy Markdown
Collaborator Author

@yuriks Yes, this was on purpose. ReactiveUI.Avalonia does exist, but is not maintained by the Avalonia team itself. Also, Mesen currently depends on ReactiveUI.Fody, which is now deprecated, like Avalonia.ReactiveUI is. To get rid of Fody, I would have to switch to using ReactiveUI.SourceGenerators, which would require nearly as many changes (all [Reactive] properties would still have to be marked as partial for this to work, at a minimum).

From my experience, ReactiveUI has some performance issues (or at least, I've had to avoid using some of its features to avoid slow window load times in the past), while CommunityToolkit.Mvvm is a more lightweight option (with less features, for sure) which is good enough for nearly everything the code needed ReactiveUI for.

@SourMesen SourMesen mentioned this pull request May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants