Browse Source

docs: Document InitializeComponent

pull/10407/head
Artyom V. Gorchakov 5 years ago
committed by GitHub
parent
commit
fbcc40f9fc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      README.md

9
README.md

@ -48,8 +48,11 @@ namespace Sample.App
{ {
public SignUpView() public SignUpView()
{ {
AvaloniaXamlLoader.Load(this); // This method is generated. Call it before accessing any
UserNameTextBox.Text = "Joseph"; // Cool stuff! // of the generated properties. The 'UserNameTextBox'
// property is also generated.
InitializeComponent();
UserNameTextBox.Text = "Joseph";
} }
} }
} }
@ -67,7 +70,7 @@ public partial class SignUpView : ReactiveWindow<SignUpViewModel>
{ {
public SignUpView() public SignUpView()
{ {
AvaloniaXamlLoader.Load(this); InitializeComponent();
this.WhenActivated(disposables => this.WhenActivated(disposables =>
{ {
this.BindValidation(ViewModel, x => x.UserName, x => x.UserNameValidation.Text) this.BindValidation(ViewModel, x => x.UserName, x => x.UserNameValidation.Text)

Loading…
Cancel
Save