WPF: Is there a built-in TreeGrid / TreeListView?

前端 未结 7 1235
长情又很酷
长情又很酷 2020-12-29 21:05

I need something just like this:

(I need both the TreeView and the ListView aspects. That is, Hirearchy and Columns.)

But, I need it in WPF. is thi

7条回答
  •  -上瘾入骨i
    2020-12-29 21:28

    You can somewhat obtain this behavior with the DataGrid by following this tutorial (scroll the the Fake grouping with the help of the ViewModel section).

    The tutorial's solution works well enough, but scrolling can get laggy and it's behavior unpredictable when some rows are collapsed.

    Update: I changed how the children are hidden. Instead of collapsing rows, I removed items in the bound ObservableCollection. Now scrolling works perfectly!

提交回复
热议问题