public async void Update(CategoryPageViewModel categoryViewModel) { _filterDefinition = categoryViewModel.FilterDefinition; FilterName = _categoryNameProvider.GetName(_filterDefinition.Categories); Items.Clear(); await Load(); }
public MainPageViewModel() { _dataSource = App.DataSource; _settings = App.SettingsProvider; var notifier = App.SettingsNotifier; notifier.Subscribe(this); _newsViewModel = new NewsViewModel(_dataSource); _eventsViewModel = new EventsViewModel(_dataSource); _categoryPageViewModel = new CategoryPageViewModel(_dataSource, _eventsViewModel); _eventsViewModel.SetCategoryNameProvider(_categoryPageViewModel); _selectionsViewModel = new SelectionsViewModel(_dataSource); _moviesViewModel = new MoviesViewModel(_dataSource); _eventFilterCommand = new DelegateCommand(Filter); UpdateCity(); }