Skip to content

Music app tutorial help. ViewLocator returns Not found #17967

Answered by stevemonaco
ARogala asked this question in Q&A
Discussion options

You must be logged in to vote

Your XAML and code-behind no longer match the same type which is why InitializeComponent isn't found.

namespace Avalonia.MusicStore.Views.AlbumView; // Change this

public partial class AlbumView : UserControl

This means the type will be Avalonia.MusicStore.Views.AlbumView.AlbumView. (Incorrect)

x:Class="Avalonia.MusicStore.Views.AlbumView"

This means the XAML side is Avalonia.MusicStore.Views.AlbumView. (Correct)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ARogala
Comment options

@stevemonaco
Comment options

Answer selected by ARogala
@ARogala
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants