我有一个web服务,其中json数据采用以下格式。我需要做的是,“列表类别”应该绑定到groupheader并跳转标题列表。并将“List MenuItem”添加到ItemTemplate。我在xaml中设计了datatemplates。但不确定如何完成这项任务?
public class MenuItem
{
public int Menuitemid { get; set; }
public int Menucategoryid { get; set; }
public string Itemname { get; set; }
public string Description { get; set; }
public double Price { get; set; }
public string Picture { get; set; }
public bool Active { get; set; }
}
public class Category
{
public int Menucategoryid { get; set; }
public int Menuid { get; set; }
public string Categoryname { get; set; }
public string Description { get; set; }
public bool Active { get; set; }
public List<MenuItem> MenuItems { get; set; }
}
public class Data
{
public int Menuid { get; set; }
public int Appid { get; set; }
public string Menuname { get; set; }
public string Menudescription { get; set; }
public bool Active { get; set; }
public string Menuguid { get; set; }
public List<Category> Categories { get; set; }
}
public class RootObject
{
public Data data { get; set; }
}
答案 0 :(得分:1)