WPF可折叠列表视图

时间:2013-12-02 16:57:31

标签: c# wpf listview

我正在尝试按照http://www.wpf-tutorial.com/listview-control/listview-grouping/向Master-Detail Collection(例如Order-OrderDetails)实现可折叠列表视图,但没有成功。我的目标是扩展Listview行(Order)并在用户行选择时显示所有OrderDetail条目。

public class Order 
{
    public int Id { get; set; }
    public string OrderNumber{ get; set; }
    public ObservableCollection<OrderDetail> OrderDetails { get; set; }
}
public class OrderDetail 
{
    public int Id { get; set; }
    public string OrderNumber{ get; set; }
    public string Description{ get; set; }
    public double Cost{ get; set; }
    public virtual Order Order { get; set; }
}

0 个答案:

没有答案