Пример #1
0
        protected virtual async Task InternalNavigateToAsync(Type viewModelType, object parameter, int?tagGroup)
        {
            var page = CreateAndBindPage(viewModelType, parameter);

            if (page is AuthorView)
            {
                CurrentApplication.MainPage = new CustomNavigationPage(page);
            }
            else
            {
                if (CurrentApplication.MainPage is CustomNavigationPage navigationPage)
                {
                    if (tagGroup != null)
                    {
                        SharedTransitionNavigationPage.SetSelectedTagGroup(page, tagGroup.Value);
                    }
                    await navigationPage.PushAsync(page);
                }
                else
                {
                    CurrentApplication.MainPage = new CustomNavigationPage(page);
                }
            }

            await(page.BindingContext as ViewModelBase).InitializeAsync(parameter);
        }
Пример #2
0
 private async void OnHighlightTapped(object sender, System.EventArgs e)
 {
     // TODO: Fix shared element transition using the NavigationService.
     SharedTransitionNavigationPage.SetSelectedTagGroup(this, 1);
     var context = (sender as View).BindingContext;
     await Navigation.PushAsync(new ArtDetailView(context));
 }
Пример #3
0
        private async void OnHighlightTapped(object sender, System.EventArgs e)
        {
            Xam.Rss.FeedItem context             = (Xam.Rss.FeedItem)(sender as View).BindingContext;
            Xam.LaGalerna.Entities.SectionType s = (Xam.LaGalerna.Entities.SectionType)(((Xam.Rss.FeedItem)context).Number);
            SharedTransitionNavigationPage.SetSelectedTagGroup(this, ((int)s) + 1);
            switch (s)
            {
            case Entities.SectionType.Articles:
                await Navigation.PushAsync(new RssDetailView(context));

                break;

            case Entities.SectionType.Youtube:
                await Navigation.PushAsync(new RssDetailVideoView(context));

                break;

            case Entities.SectionType.Spotify:
                await Navigation.PushAsync(new SpotifyPlayListView(context));

                break;

            default:
                break;
            }
        }
Пример #4
0
        private async void Related_SelectionChanged(object sender, System.EventArgs e)
        {
            MainViewModel.Instance.IsBusy = true;
            await Navigation.PopAsync();

            Rss.FeedItem context = (Rss.FeedItem)(sender as View).BindingContext;
            SharedTransitionNavigationPage.SetSelectedTagGroup(this, (context.Number) + 1);
            MainViewModel.Instance.IsBusy = false;
            await Navigation.PushAsync(new RssDetailView(context));
        }
 private async void ImageTapped(object sender, TappedEventArgs e)
 {
     SharedTransitionNavigationPage.SetSelectedTagGroup(this, 1);
     await Navigation.PushAsync(new Page2());
 }