This is a proof of concept port of Stylet to Avalonia. The goal of this port was to get Conductors and Screens working in Avalonia as I much prefer that architecture over ReactiveUI.
See further discussion here: canton7/Stylet#342
This implementation depends on Avalonia, similarly to how Stylet depends on WPF. Additionally, this version depends on Microsoft.Toolkit.Mvvm
. This allows for the removal of PropertyChangedBase
and EventAggregator
.
- Conductors
- Screens
- BindableCollection
- Execute
I found a few unsupported features in Avalonia. I'm not too familiar with Avalonia yet, some of these can probably be worked around.
-
There is no
Loaded
andUnloaded
events,so. See AvaloniaUI/Avalonia#7908. There is a workaround using events for attaching and detaching from the visual tree.OnViewLoaded()
does not work -
Avalonia windows do not allow the owner to be explicitly set.
-
Avalonia windows do not have
Top
andLeft
, so the start up location logic in WindowManager is disabled. Perhaps we need to listen to changes inBoundsProperty
?