Music app tutorial help. ViewLocator returns Not found #17967
-
Getting stuck on the tutorial at this point https://docs.avaloniaui.net/docs/tutorials/music-store-app/album-view When i inherit from ViewModelBase
the ViewLocatior just returns not found. Anyone else run into this? my MusicStoreViewModel.cs is this
My MusicStoreView is this
My AlbumViewModel is this
And my AlbumVIew is
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The ViewModel -> View mapping that the default ViewLocator performs also includes the namespaces. So you need to change your view to |
Beta Was this translation helpful? Give feedback.
Your XAML and code-behind no longer match the same type which is why
InitializeComponent
isn't found.This means the type will be
Avalonia.MusicStore.Views.AlbumView.AlbumView
. (Incorrect)This means the XAML side is
Avalonia.MusicStore.Views.AlbumView
. (Correct)