public SampleDataSource() { var grp1 = new SampleDataGroup("stud", "Новости МИЦ", "Последние обновления новостей о мероприятих МИЦ", "LightGray.png", "Новости МИЦ"); var doc = XDocument.Load("http://ulmic.ru/index.php?format=feed&type=rss"); Func<string,string> cvt = Windows.Data.Html.HtmlUtilities.ConvertToText; var res = from x in doc.Descendants("item")//251 127 64 select new SampleDataItem( x.Element("guid").Value, x.Element("title").Value, x.Element("title").Value, GetImageFromPostContents(x.Element("description").Value), cvt(x.Element("description").Value), cvt(x.Element("description").Value), grp1); foreach (var g in res) { grp1.Items.Add(g); } AllGroups.Add(grp1); }
public SampleDataItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content, SampleDataGroup group) : base(uniqueId, title, subtitle, imagePath, description) { this._content = content; this._group = group; }