Which of the three methods is correct for creating a UserControl with different x:class, using, and namespace? #15797
Replies: 2 comments 2 replies
-
I'm sorry but I don't quite understand the question. I'd use the templates with the icons applied but all three options should work. If you adjust namespace or name, remember to update the XAML file accordingly. |
Beta Was this translation helpful? Give feedback.
-
There is no "correct" here, only opinions. Just be consistent with your namespace conventions across the entire project. I use feature folders, so I always need to clean up namespaces to match my convention. The top templates (plain icon) are from AvaloniaVS. The bottom templates (Avalonia icon) are from avalonia-dotnet-templates. The latter cannot match folder-namespace convention due to AvaloniaUI/avalonia-dotnet-templates#235 |
Beta Was this translation helpful? Give feedback.
-
dotnet new avalonia.usercontrol -o Views -n UserControl3 --namespace ToDoList.Views
Which of the three methods is correct for creating a UserControl with different x:class, using, and namespace?
x:Class="ToDoList.Views.UserControl1" or x:Class="ToDoList.UserControl1"
Beta Was this translation helpful? Give feedback.
All reactions