public ShellViewModel(IEventMessager eventMessager) { Title = "Big XAML Apps Demo"; ShowSpotTileCommand = new SimpleCommand <object, object>(x => eventMessager.Publish(new ShowNewSpotTileMessage())); SpotTrades = new ObservableCollection <SpotTrade>(); eventMessager.Observe <SpotTrade>() .Subscribe(x => { this.SpotTrades.Add(x); base.RaisePropertyChanged(() => SpotTrades); }); }
public ShellViewModel(IEventMessager eventMessager) { Title = "Big XAML Apps Demo"; ShowSpotTileCommand = new SimpleCommand<object, object>(x => eventMessager.Publish(new ShowNewSpotTileMessage())); SpotTrades = new ObservableCollection<SpotTrade>(); eventMessager.Observe<SpotTrade>() .Subscribe(x => { this.SpotTrades.Add(x); base.RaisePropertyChanged(()=>SpotTrades); }); }
private void SetupTopLevelSubscription() { disposables.Add(spotTileViewModel.OkCommand.CommandExecutedStream.Subscribe( x => { spotTileViewModel.IsEnabled = false; eventMessager.Publish(new SpotTrade( spotTileViewModel.SelectedDate, spotTileViewModel.FakeSpotPair, spotTileViewModel.RateViewModel.WholeRate, DateTime.Now)); })); }