public ResortsPage() { InitializeComponent(); BindingContext = new ResortsViewModel() { Resorts = Mapper.Map <ObservableCollection <ResortViewModel> >(ResortsService.GetAll()) }; var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += OnResortsFilterPage; FilterFrame.GestureRecognizers.Add(tapGestureRecognizer); }
protected override void OnAppearing() { var context = (ResortsViewModel)BindingContext; var filter = ResortsService.GetFilter(); context.Resorts = Mapper.Map <ObservableCollection <ResortViewModel> >(filter != null ? ResortsService.ApplyFilter() : ResortsService.GetAll()); }