Exemplo n.º 1
0
        private async void OnRouteSelected(object sender, SelectionChangedEventArgs e)
        {
            // Route clicked; open preselected route in map view

            // Check if selection is null
            if (e.CurrentSelection.Count == 0)
            {
                return;
            }

            // Open map page
            RouteInfo      info     = e.CurrentSelection[0] as RouteInfo;
            List <Exhibit> exhibits = FiltersViewModel.GetFilteredExhibits(info.ArtistFilter, info.TimePeriodFilter,
                                                                           info.ArtStyleFilter);
            await Navigation.PushAsync(new MapPage(exhibits));

            // Deselect item
            routesCollView.SelectedItem = null;
        }
Exemplo n.º 2
0
 private async void OnCreateRoutePressed(object sender, EventArgs e)
 {
     var selectedExhibits = viewModel.GetFilteredExhibits();
     await Navigation.PushAsync(new MapPage(selectedExhibits));
 }