Exemplo n.º 1
0
        async Task OpenDetectionDetails(string detectionId)
        {
            await Navigation.PopToRootAsync(true);

            var detectionDetailsViewModel = new DetectionDetailsViewModel(detectionId);
            await detectionDetailsViewModel.Init();

            var detectionDetails = new DetectionDetailsPage()
            {
                BindingContext = detectionDetailsViewModel
            };
            await Navigation.PushAsync(detectionDetails);
        }
Exemplo n.º 2
0
        async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
        {
            var detection = e.SelectedItem as Detection;

            if (detection == null)
            {
                return;
            }

            var detectionDetailsContext = new DetectionDetailsViewModel(detection);
            var detailsPage             = new DetectionDetailsPage()
            {
                BindingContext = detectionDetailsContext
            };
            await Navigation.PushAsync(detailsPage);

            DetectionsListView.SelectedItem = null;
        }