Exemplo n.º 1
0
 public void Bind(PersonViewModel viewmodel)
 {
     TxtName.SetBinding(TextBox.TextProperty, new Binding("Name"));
     TxtBirth.SetBinding(TextBox.TextProperty, new Binding("BirthText"));
     BtnNext.Click += new RoutedEventHandler(
         (sender, e) => { viewmodel.GetNextPerson(); });
     this.Loaded += new RoutedEventHandler(
         (sender, e) => { viewmodel.GetNextPerson(); });
     this.DataContext = viewmodel;
 }