protected override DependencyObject GetContainerForItemOverride()
        {
            TreeViewItemCompResult container = new TreeViewItemCompResult();

            container.OtherParentComp = this.OtherParentComp;
            container.ParentWindow    = this.ParentWindow;
            container.User            = this.User;
            return(container);
        }
        private void eh_MouseLeave(object sender, MouseEventArgs e)
        {
            TreeViewItemCompResult tvie = sender as TreeViewItemCompResult;

            // header-highlighting preparation
            if (tvie != null && tvie.Header is ParameterStructure.Parameter.ComparableContent)
            {
                ParameterStructure.Parameter.ComparableContent cc = tvie.Header as ParameterStructure.Parameter.ComparableContent;
                if (cc.Buddy != null)
                {
                    cc.Buddy.IsHLByBuddy = false;
                }
            }
        }
 public void PropagateCompInfoToItems(ParameterStructure.Component.Component _comp, CompCompareWindow _win)
 {
     if (_comp == null)
     {
         return;
     }
     foreach (object item in this.Items)
     {
         TreeViewItemCompResult tvi = this.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItemCompResult;
         if (tvi != null)
         {
             tvi.OtherParentComp = _comp;
             tvi.ParentWindow    = _win;
             tvi.User            = this.User;
         }
     }
 }
        private void eh_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            TreeViewItemCompResult tvie = sender as TreeViewItemCompResult;

            if (tvie != null && tvie.Header is ParameterStructure.Component.Component)
            {
                ParameterStructure.Component.Component comp = tvie.Header as ParameterStructure.Component.Component;
                if (comp != null && this.ParentWindow != null)
                {
                    if (this.OtherParentComp != null && this.ParentWindow.C1 != null && this.ParentWindow.C2 != null)
                    {
                        // choose this component for comparison...
                        if (this.OtherParentComp.ID == this.ParentWindow.C1.ID)
                        {
                            this.ParentWindow.C2 = comp;
                        }
                        else
                        {
                            this.ParentWindow.C1 = comp;
                        }
                    }
                }
            }
        }
        protected override DependencyObject GetContainerForItemOverride()
        {
            TreeViewItemCompResult container = new TreeViewItemCompResult();

            return(container);
        }