protected override void OnNavigatedTo(NavigationEventArgs e) { Wrappers.Older param = (Wrappers.Older)e.Parameter; NewsTitle.Text = param.title; NewsDate.Text = param.date; NewsDescription.Text = param.description != null ? param.description : "Sorry, this article description could not be loaded. Check the API..."; setProperties(param); }
private void NewsList_SelectionChangedAsync(object sender, SelectionChangedEventArgs e) { TextBlock date = (TextBlock)((StackPanel)((ListView)sender).SelectedItem).Children[0]; Wrappers.Older older = news.older.ElementAt(((ListView)sender).SelectedIndex); older.date = date.Text; if (older != null) { Frame.Navigate(typeof(NewsDetail), older); } }
private void setProperties(Wrappers.Older older) { Title = setEmptyIfBlank(older.title); Date = setEmptyIfBlank(older.date); Description = setEmptyIfBlank(older.description); }