title: Expand selected node after refresh TreeView in C#
body: <p>I have a treeview with many items</p>
  
  <p>When I expand an item and its childs and after I called refresh method, that expanded item childs becomes collapsed.</p>
  
  <p>Can you give me an idea how to store the selected node and after refresh, to call the Expand method again...</p>
  
  <p>I tried :</p>
  
  <pre><code> TreeNode selectedNode = new TreeNode();
   TreeNode selectedNode = SelectedTreeNode();  //method which takes selected node from TV
   RestoreFolderTreeWithLastSelectedItem(); //method which initialise treeview object
   //here I want to call Expand() method but it not exists to TreeNode.
  </code></pre>
  
  <p>For treeview, I used <code>Windows.Controls.treeView</code> namespace
  I am beginner...
  Thank you</p>
  
  <p>I will explain you via images</p>
  
  <p>I expanded all items:
  <img src="https://i.stack.imgur.com/NEgsL.jpg" alt="enter image description here"></p>
  
  <p>If I press F5 or call Refresh function (RestoreFolderTreeWithLastSelectedItem();) then they will be collapsed like as:</p>
  
  <p><img src="https://i.stack.imgur.com/hroiS.jpg" alt="enter image description here"></p>
  
  <p>instead of first image...</p>