private void CheckSearch(OrgChartDiagram org)
 {
     if ((org.DataContext as ChartViewModel).SearchVisibility == Visibility.Visible)
     {
         (org.DataContext as ChartViewModel).Item = null;
     }
     else if ((org.DataContext as ChartViewModel).SearchVisibility == Visibility.Visible)
     {
         (org.DataContext as ChartViewModel).Item = null;
     }
 }
 public static void PropertyChangedCallback(DependencyObject depObj, DependencyPropertyChangedEventArgs args)
 {
     diagram = depObj as OrgChartDiagram;
     if (args.NewValue == null)
     {
         diagram.Loaded -= sfdiagram_Loaded;
         diagram         = null;
     }
     if (diagram != null)
     {
         diagram.Loaded += sfdiagram_Loaded;
     }
 }