Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Commit fbcc40f

Browse files
authored
docs: Document InitializeComponent
1 parent 37a4482 commit fbcc40f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ namespace Sample.App
4848
{
4949
public SignUpView()
5050
{
51-
AvaloniaXamlLoader.Load(this);
52-
UserNameTextBox.Text = "Joseph"; // Cool stuff!
51+
// This method is generated. Call it before accessing any
52+
// of the generated properties. The 'UserNameTextBox'
53+
// property is also generated.
54+
InitializeComponent();
55+
UserNameTextBox.Text = "Joseph";
5356
}
5457
}
5558
}
@@ -67,7 +70,7 @@ public partial class SignUpView : ReactiveWindow<SignUpViewModel>
6770
{
6871
public SignUpView()
6972
{
70-
AvaloniaXamlLoader.Load(this);
73+
InitializeComponent();
7174
this.WhenActivated(disposables =>
7275
{
7376
this.BindValidation(ViewModel, x => x.UserName, x => x.UserNameValidation.Text)

0 commit comments

Comments
 (0)