public void Collapse()
 {
     foreach (DataItem selectedItem in TreeView.SelectedItems)
     {
         TreeView.Collapse(selectedItem);
     }
 }