You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avalonia templates are currently split between avalonia-dotnet-templates and AvaloniaVS. However, each has their own type convention when creating a UserControl (possibly others) within a folder. avalonia-dotnet-templates will omit any folder names while AvaloniaVS preserves them. eg.
This has led to several issues / PRs being opened in avalonia-docs from beginners.
To Reproduce
Use VS. Have both AvaloniaVS and avalonia-dotnet-templates installed.
Create "User Control (Avalonia)" in a folder
Create "Avalonia UserControl (AvaloniaUI)" in a folder
Compare full type names
Avalonia Templates version
11.0.10.1
Avalonia version
No response
Additional context
I'm not necessarily advocating for one way or the other, only consistency whether the update is made here or in AvaloniaVS.
I use feature folders, so I always need to fix up these things anyways. My preference would be always: AvaloniaApplication.Views.TestView regardless of what folder the UserControl is created in, but I don't think this is a popular convention. VS matches namespaces to folder structure by default for other files (C#), so that's probably the user expectation.
The text was updated successfully, but these errors were encountered:
Thanks. Will avalonia-dotnet-templates adopt adding the folder convention to the namespace if/when it's available? I will need to add a caution section to the Avalonia docs (possibly a few places) in the meantime.
Describe the bug
Avalonia templates are currently split between avalonia-dotnet-templates and AvaloniaVS. However, each has their own type convention when creating a
UserControl
(possibly others) within a folder. avalonia-dotnet-templates will omit any folder names while AvaloniaVS preserves them. eg.AvaloniaApplication.TestView
- avalonia-dotnet-templatesAvaloniaApplication.Views.TestView
- AvaloniaVSThis has led to several issues / PRs being opened in avalonia-docs from beginners.
To Reproduce
Avalonia Templates version
11.0.10.1
Avalonia version
No response
Additional context
I'm not necessarily advocating for one way or the other, only consistency whether the update is made here or in AvaloniaVS.
I use feature folders, so I always need to fix up these things anyways. My preference would be always:
AvaloniaApplication.Views.TestView
regardless of what folder theUserControl
is created in, but I don't think this is a popular convention. VS matches namespaces to folder structure by default for other files (C#), so that's probably the user expectation.The text was updated successfully, but these errors were encountered: