如何在WPF中将列表对象添加到Treeview [英] how to add a list object to a treeview in wpf
本文介绍了如何在WPF中将列表对象添加到Treeview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是wpf的新手.请给我详细解释.
I''m new to wpf.please give me explanation in detail.
推荐答案
好吧,如果您有树视图,则可以添加循环列出.
-循环查看列表中的所有项目
-为每个项目创建一个新的treeviewItem
-将其添加到树视图
Well, if you have a treeview, you could add each items of the list in a loop.
- Loop on all the items of the list
- For each items, create a new treeviewItem
- Add it to the treeview
这篇关于如何在WPF中将列表对象添加到Treeview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文