protected async override void OnNavigatedTo(NavigationEventArgs e) { if (e.NavigationMode == NavigationMode.New || myFollowVideoVM == null) { await myFollowVideoVM.LoadFavorite(); } }
private async void pivot_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (pivot.SelectedItem == null) { return; } switch (pivot.SelectedIndex) { case 0: if (videoVM.Loading || videoVM.MyFavorite != null) { return; } await videoVM.LoadFavorite(); break; case 1: if (animeVM.Loading || animeVM.Follows != null) { return; } await animeVM.LoadFollows(); break; case 2: if (cinemaVM.Loading || cinemaVM.Follows != null) { return; } await cinemaVM.LoadFollows(); break; default: break; } }