How do I add icons next to the nodes in a WPF TreeView?

前端 未结 3 1639
太阳男子
太阳男子 2020-12-31 17:00

I have a WPF TreeView with just 1 level of items. The TreeView is data bound to an ObservableCollection of strings. How can I ensure that the same icon appears to the left

3条回答
  •  独厮守ぢ
    2020-12-31 17:28

    I think one of the best articles that will help you to understand the TreeView is this one http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx. In general, this describes a good set of patterns that can make a lot of scenarios in WPF/SL much easier.

提交回复
热议问题