示例#1
0
 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);
     });
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }
示例#4
0
 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);
     }
 }