private void PodcastGroupTapped(object sender, System.Windows.Input.GestureEventArgs e) { BrowsePodcastsGroupModel group = (sender as StackPanel).DataContext as BrowsePodcastsGroupModel; PhoneApplicationFrame applicationFrame = Application.Current.RootVisual as PhoneApplicationFrame; applicationFrame.Navigate(new Uri(string.Format("/Views/PodcastListCategory.xaml?categoryName={0}", group.Name), UriKind.Relative)); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { String categoryName = NavigationContext.QueryString["categoryName"] as String; m_groupModel = AddSubscription.PodcastGroups.FirstOrDefault(category => category.Name == categoryName); this.DataContext = m_groupModel; if (String.IsNullOrEmpty(m_groupModel.CachedJSON)) { WebClient wc = new WebClient(); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadCategoryJSONCompleted); wc.DownloadStringAsync(m_groupModel.RestAPIUrl); } else { populateCategoryList(m_groupModel.CachedJSON); } }