Is there a recommended solution to recreate a tree node by node and have the same nodes expanded/collapsed?
For example in the instance where you have a file explorer like app which has been generated programmatically based on an underlying customer data structure and would like to rebuild the tree but retain the expanded/collapsed nodes. Almost as if you wanted to clone the tree and have it displayed exactly the same.
I can imagine the brute force method of traversing the tree and keep a tally of all nodes that are expanded and reapply them. This method doesn't really scale very well, but is that the only way?
You can use the SaveAsXml/SaveAsBinary methods to serialize an object graph of the control, and LoadFromXml/LoadFromBinary to deserialize.