AvaloniaUI / avalonia-docs

https://docs.avaloniaui.net/docs/welcome
62 stars 207 forks source link

Update inspect-the-xaml.md #456

Closed SdAm1n closed 6 months ago

SdAm1n commented 6 months ago

<UserControl ... x:Class="ToDoList.ToDoListView">

this is created instead of

<UserControl ... x:Class="ToDoList.Views.ToDoListView">

stevemonaco commented 6 months ago

This is caused by a difference in whether you create the UserControl using the VS extension templates or the templates from https://github.com/AvaloniaUI/avalonia-dotnet-templates. The VS extension creates types that follows folder convention while avalonia-dotnet-templates seems not to. You might want to create an issue there about this and let the team figure out which approach is "right".

For now, you should rename your View (both the code-behind class and the x:Class in XAML) to match the tutorial.