This is the cross-platform alternative of the Avalonia's official MusicStore sample application that targets both Desktop (Mac, Windows, Linux) and Mobile (Android, iOS) platforms.
To be able truly cross-platform, the following changes were made:
- We can't use multi-window approach on mobile platforms, so the app is single-windowed on mobile platforms. This means we had to sacrifice the dialog-approach of showing the
MusicStore
- Instead of dialogs we've used ReactiveUI's routing system in combination with
RoutedViewHost
andInteractions
to handle the back navigation withAlbum
from theMusicStoreView
to the main window where saved albums are displayed. In the future, we may integrate Avalonia.DialogViewHost to get cross-platform dialog implementation - Instead of using hardcoded
.\Cache
path for saving data, we use platform-specificEnvironment.SpecialFolder.LocalApplicationData
path - I usually prefer
DryIoc
as my main DI container. So, the specialSplat.DryIoc
nuget was used to replace the ReactiveUI's default DI container with Dry.Ioc