The
TreeNode
class has an
Expand
method, you could use that
and walk up the tree using the Parent
property to expand all parents. Optionally you could use the EnsureVisible
method which does all of that for you. (edited, you only want to expand child nodes, not parent nodes).
You should really try reading the
documentation[
^] sometime. It'll help you discover the answers to question like this all by yourself.