Hammad Saleem

Hammad Saleem

  • NA
  • 8
  • 4.8k

how to access all items and subitems of treeview in wpf c#

Oct 20 2015 1:13 AM
how to access all items and subitems of treeview in wpf c#
i have a treeview like this
<TreeView Name="TreeView1">
<TreeViewItem Name="Pak" Header="Pakistan">
<TreeViewItem Header="Karachi"/>
</TreeViewItem>
<TreeViewItem Header="India">
<TreeViewItem Header="Mumbai"/>
</TreeViewItem>
</treeview>
i want to access all items and sub items of treeview1 and put them into list how to do this?