I’ve been having issues with the TreeView
in WPF. This control makes it very hard to access the TreeViewItem
s it’s showing.
On several occasion
No, I dont see in what way accessing the items of a treeview is wrong.
I think the difficulties you are encountering are because you aren't seeing the treeview as it should be.
A leaf has a parent, but no children. A node can have a parent, and can have children. A node without a parent is a root.
Based on these principles (SourceMaking Composite pattern) you should be able to do whatever you want using recursivity. (in both XAML and code)