I have a WinForms TreeView and a tree, built from custom node objects which inherits TreeNode the problem is that these nodes can be displayed in only one tree at the time.
Now I have multiple controls with a TreeView that should display these nodes. How can I indicate that the treeView is displayed?
I can catch the VisibleChanged event but I don't know how to detect if the TreeView is really visible (The visible property does not change!).
I know that one solution can be to wrap my data in TreeNode objects and not using inheritance from TreeNode. But I hope there is a faster solution.
Best Answer
How do you decide which treeview gets to display the items?
Generally, I don't think that's a good design at all. Better use an
FeedTreeNode(MyObject o)
and a suitable updater.