Exemplo n.º 1
0
 public MainPageViewModel(INavigation navigation)
 {
     //Model→ViewModel
     this.Label1 = model.ObserveProperty(x => x.Name).ToReactiveProperty();
     //Button
     Button1.Subscribe(x => model.NamePlus(x));
     Button2.Subscribe(x => model.NamePlus(x));
     Button3.Subscribe(x => model.NamePlus(x));
     Button4.Subscribe(x => model.NamePlus(x));
     Button5.Subscribe(x => model.NamePlus(x));
     //Button(ページ遷移)
     NextPageButton.Subscribe(async _ => await navigation.PushAsync(new Views.NextPageView()));
 }