具有匹配列的 WPF ListView 嵌套表
我有一个像这样的业务实体:
public class Entity
{
public string Name;
public string Description;
public Entity Parent;
public ObservableCollection<Entity> Children
}
我想将 ListView 绑定到实体集合并从中获取嵌套表,如下所示:
http://leeontech.wordpress.com/2008/03/11/listview-masterdetail/
但是我想要嵌套表(它具有相同的columns 作为其父表)以与父表相同的方式定位和调整其列的大小。我该怎么做?
I have a business entity like so:
public class Entity
{
public string Name;
public string Description;
public Entity Parent;
public ObservableCollection<Entity> Children
}
I would like to bind a ListView to a collection of Enities and get a nested table out of it like this:
http://leeontech.wordpress.com/2008/03/11/listview-masterdetail/
however I would like the nested table (which has the same columns as its parent) to position and resize its columns the same as the parent table. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想检查树视图是否适合您;有多种方法可以使其成为多列(TreeListView)。检查此处的示例:TreeListView Sample 是否适合您。应该看起来像下图中的控件:
控件的源代码您可以在此处找到图片
you might want to check if treeview would work for you; there are ways of making it multi column (TreeListView). Check if example here: TreeListView Sample would work for you. Should be looking like a control on the picture below:
source code for the control on the picture you can find here