When adding a new Avalonia Window or UserControl in a subfolder, the new item does not include the subfolder in the namespace. EG: for /Views/UserControl1.axaml.cs :
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace AvaloniaTemplateNamespaceIssue;
public partial class UserControl1 : UserControl
This is different & confusing behaviour since the initial items created by the new project template do include the subfolder. EG: for /Views/MainWindow.axaml.cs :
using Avalonia.Controls;
namespace AvaloniaTemplateNamespaceIssue.Views;
public partial class MainWindow : Window
Avalonia v11.0.4
Avalonia for Visual Studio 2022 v11.1
Avalonia.Templates v11.0.2
When adding a new Avalonia Window or UserControl in a subfolder, the new item does not include the subfolder in the namespace. EG: for /Views/UserControl1.axaml.cs :
This is different & confusing behaviour since the initial items created by the new project template do include the subfolder. EG: for /Views/MainWindow.axaml.cs :
Avalonia v11.0.4 Avalonia for Visual Studio 2022 v11.1 Avalonia.Templates v11.0.2