private void OnToggleExpandAll_Unchecked(object sender, RoutedEventArgs e)
 {
     if (resetting)
     {
         return;
     }
     ToggleExpandAll.ToolTip = "Show Details";
     writer.CollapseAll();
     ToggleExpandAllImage.SetResourceReference(Image.SourceProperty, "ExpandAllIcon");
 }