public SampleDataSource() { int i = 0; PortableLibrary.populateDataAsync(item => { var group = new SampleDataGroup(i++.ToString(), item.Title, item.SubTitle, null, item.Description); foreach (var subItem in item.SubItems) { group.Items.Add(new SampleDataItem(i++.ToString(), subItem.Title, subItem.SubTitle, null, subItem.Description, subItem.Content, group)); } AllGroups.Add(group); }); }
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; }
public SampleDataSource() { int i = 0; foreach (var item in PortableLibrary.getData(forSilverlight: false)) { var group = new SampleDataGroup(i++.ToString(), item.Title, item.SubTitle, null, item.Description); foreach (var subItem in item.SubItems) { group.Items.Add(new SampleDataItem(i++.ToString(), subItem.Title, subItem.SubTitle, null, subItem.Description, subItem.Content, group)); } AllGroups.Add(group); } }