Exemplo n.º 1
0
 void NewsPaperDetail_Loaded(object sender, RoutedEventArgs e)
 {
     //MessageBox.Show(index);
     //mainViewModel = new MainViewModel();
     //mainViewModel.NewsSource(Convert.ToInt32(index));
     newsData = new NewsPaperData();
     string[] newsUrls = newsData.returnNewsUrls();
     NewsPaperBrowser.Navigate(new Uri(newsUrls[Convert.ToInt32(index)], UriKind.Absolute));
 }
Exemplo n.º 2
0
        void LoadNewsPaperData()
        {
            Items = new ObservableCollection <ItemViewModel>();
            NewsPaperData nData = new NewsPaperData();

            newsTitles = nData.returnNewsTitles();
            newsUrls   = nData.returnNewsUrls();
            for (int i = 0; i < newsTitles.Length; i++)
            {
                this.NewsItems.Add(new NewsPaperViewModel()
                {
                    NewsTitle = newsTitles[i], NewsUrl = newsUrls[i]
                });
            }
        }