protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!_displayOnly && e.Source is DesignerItem) { if (_currentDesignItem == null) { _currentDesignItem = e.Source as DesignerItem; // _currentDesignItem.ChangeColorToWhite(); } if (((DesignerItem)e.Source) != _currentDesignItem) { _currentDesignItem.RestoreOriginalColor(); _currentDesignItem = e.Source as DesignerItem; _currentDesignItem.ChangeColorToWhite(); InvalidateVisual(); RaiseComponentItemChanged(new EventArgs()); } //_currentDesignItem.BorderBrush = Brushes.BlueViolet; //_currentDesignItem.BorderThickness = new Thickness(10,10,10,10); //if (_currentDesignItem.Style.TargetType.GetType() == typeof(TextBox)) //{ // // _currentDesignItem //} //_currentDesignItem = "Orange"; // in case that this click is the start of a // drag operation we cache the start point // var point = new Point?(e.GetPosition(this)); //foreach (Control item in Children) //{ // Rect itemRect = VisualTreeHelper.GetDescendantBounds(item); // Rect itemBounds = item.TransformToAncestor(this).TransformBounds(itemRect); // if (itemRect.Contains(e.GetPosition(this)) && item is DesignerItem) // { // item.Focus(); // } // Focus(); // e.Handled = true; //} } }