diff --git a/README.md b/README.md index 1341b06..73e9e71 100644 --- a/README.md +++ b/README.md @@ -171,15 +171,15 @@ namespace Sample.App } #endif - UserNameTextBox = this.FindControl("UserNameTextBox"); - UserNameValidation = this.FindControl("UserNameValidation"); - PasswordTextBox = this.FindControl("PasswordTextBox"); - PasswordValidation = this.FindControl("PasswordValidation"); - AwesomeListView = this.FindControl("AwesomeListView"); - ConfirmPasswordTextBox = this.FindControl("ConfirmPasswordTextBox"); - ConfirmPasswordValidation = this.FindControl("ConfirmPasswordValidation"); - SignUpButton = this.FindControl("SignUpButton"); - CompoundValidation = this.FindControl("CompoundValidation"); + UserNameTextBox = this.FindNameScope()?.Find("UserNameTextBox"); + UserNameValidation = this.FindNameScope()?.Find("UserNameValidation"); + PasswordTextBox = this.FindNameScope()?.Find("PasswordTextBox"); + PasswordValidation = this.FindNameScope()?.Find("PasswordValidation"); + AwesomeListView = this.FindNameScope()?.Find("AwesomeListView"); + ConfirmPasswordTextBox = this.FindNameScope()?.Find("ConfirmPasswordTextBox"); + ConfirmPasswordValidation = this.FindNameScope()?.Find("ConfirmPasswordValidation"); + SignUpButton = this.FindNameScope()?.Find("SignUpButton"); + CompoundValidation = this.FindNameScope()?.Find("CompoundValidation"); } } } @@ -196,14 +196,14 @@ namespace Avalonia.NameGenerator.Sandbox.Views { partial class SignUpView { - internal global::Avalonia.NameGenerator.Sandbox.Controls.CustomTextBox UserNameTextBox => this.FindControl("UserNameTextBox"); - public global::Avalonia.Controls.TextBlock UserNameValidation => this.FindControl("UserNameValidation"); - private global::Avalonia.Controls.TextBox PasswordTextBox => this.FindControl("PasswordTextBox"); - internal global::Avalonia.Controls.TextBlock PasswordValidation => this.FindControl("PasswordValidation"); - internal global::Avalonia.Controls.TextBox ConfirmPasswordTextBox => this.FindControl("ConfirmPasswordTextBox"); - internal global::Avalonia.Controls.TextBlock ConfirmPasswordValidation => this.FindControl("ConfirmPasswordValidation"); - internal global::Avalonia.Controls.Button SignUpButton => this.FindControl("SignUpButton"); - internal global::Avalonia.Controls.TextBlock CompoundValidation => this.FindControl("CompoundValidation"); + internal global::Avalonia.NameGenerator.Sandbox.Controls.CustomTextBox UserNameTextBox => this.FindNameScope()?.Find("UserNameTextBox"); + public global::Avalonia.Controls.TextBlock UserNameValidation => this.FindNameScope()?.Find("UserNameValidation"); + private global::Avalonia.Controls.TextBox PasswordTextBox => this.FindNameScope()?.Find("PasswordTextBox"); + internal global::Avalonia.Controls.TextBlock PasswordValidation => this.FindNameScope()?.Find("PasswordValidation"); + internal global::Avalonia.Controls.TextBox ConfirmPasswordTextBox => this.FindNameScope()?.Find("ConfirmPasswordTextBox"); + internal global::Avalonia.Controls.TextBlock ConfirmPasswordValidation => this.FindNameScope()?.Find("ConfirmPasswordValidation"); + internal global::Avalonia.Controls.Button SignUpButton => this.FindNameScope()?.Find("SignUpButton"); + internal global::Avalonia.Controls.TextBlock CompoundValidation => this.FindNameScope()?.Find("CompoundValidation"); } } ``` diff --git a/external/XamlX b/external/XamlX index 5420df8..5e498f8 160000 --- a/external/XamlX +++ b/external/XamlX @@ -1 +1 @@ -Subproject commit 5420df861ce6f2be5ead9efa078fe7242ce88f18 +Subproject commit 5e498f8bcca403a34aff5efc825cbb4e12b7fa8e diff --git a/src/Avalonia.NameGenerator.Sandbox/App.xaml b/src/Avalonia.NameGenerator.Sandbox/App.xaml index 889bbe1..8b55cb6 100644 --- a/src/Avalonia.NameGenerator.Sandbox/App.xaml +++ b/src/Avalonia.NameGenerator.Sandbox/App.xaml @@ -2,6 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Avalonia.NameGenerator.Sandbox.App"> - + \ No newline at end of file diff --git a/src/Avalonia.NameGenerator.Sandbox/Avalonia.NameGenerator.Sandbox.csproj b/src/Avalonia.NameGenerator.Sandbox/Avalonia.NameGenerator.Sandbox.csproj index dee5d06..b88f991 100644 --- a/src/Avalonia.NameGenerator.Sandbox/Avalonia.NameGenerator.Sandbox.csproj +++ b/src/Avalonia.NameGenerator.Sandbox/Avalonia.NameGenerator.Sandbox.csproj @@ -7,12 +7,7 @@ true - - %(Filename) - - - Designer - + diff --git a/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml b/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml index 0f26a6f..f1f5ec3 100644 --- a/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml +++ b/src/Avalonia.NameGenerator.Sandbox/Controls/SignUpView.xaml @@ -27,6 +27,13 @@ TextWrapping="Wrap" Foreground="Red" FontSize="12" /> + + + + + + +