diff --git a/README.md b/README.md index 450544b2d2..1341b0694b 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,11 @@ The `x:Name` generator can be configured via MsBuild properties that you can put The generator will process only XAML files with base classes' namespaces matching the specified glob pattern(s). Example: `MyApp.Presentation.*`, `MyApp.Presentation.Views;MyApp.Presentation.Controls` +- `AvaloniaNameGeneratorViewFileNamingStrategy` + Possible values: `ClassName`, `NamespaceAndClassName` + Default value: `NamespaceAndClassName` + Determines how the automatically generated view files should be [named](https://github.com/AvaloniaUI/Avalonia.NameGenerator/issues/92). + The default values are given by: ```xml @@ -119,6 +124,7 @@ The default values are given by: internal * * + NamespaceAndClassName diff --git a/src/Avalonia.NameGenerator.Sandbox/App.xaml.cs b/src/Avalonia.NameGenerator.Sandbox/App.xaml.cs index 896de180ee..320d78bbd9 100644 --- a/src/Avalonia.NameGenerator.Sandbox/App.xaml.cs +++ b/src/Avalonia.NameGenerator.Sandbox/App.xaml.cs @@ -1,6 +1,5 @@ using Avalonia.Markup.Xaml; using Avalonia.NameGenerator.Sandbox.ViewModels; -using Avalonia.NameGenerator.Sandbox.Views; namespace Avalonia.NameGenerator.Sandbox; @@ -10,7 +9,7 @@ public class App : Application public override void OnFrameworkInitializationCompleted() { - var view = new SignUpView + var view = new Views.SignUpView { ViewModel = new SignUpViewModel() }; diff --git a/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml b/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml new file mode 100644 index 0000000000..0f26a6fa71 --- /dev/null +++ b/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml @@ -0,0 +1,38 @@ + + + + + + + + +