private void Select(DiagramItem itemBlock) { Select(new List <DiagramItem>() { itemBlock }); }
private void Unselect(DiagramItem itemBlock) { if (IsUpdatingSelectedItems) { return; } BeginUpdateSelectedItems(); SelectedItems.Remove(ItemContainerGenerator.ItemFromContainer(itemBlock)); EndUpdateSelectedItems(); }
private void ToggleSelect(DiagramItem diagramItem) { if (diagramItem.IsSelected) { Unselect(diagramItem); } else { Select(diagramItem); } }
private void UpdateItemPosition(DiagramItem block) { if (!IsMeasureValid) { Measure(Size.Empty); } if (block is DiagramItemBlock) { Canvas.SetLeft(block, block.X - block.DesiredSize.Width / 2.0); Canvas.SetTop(block, block.Y - block.DesiredSize.Height / 2.0); } else { Canvas.SetLeft(block, block.X); Canvas.SetTop(block, block.Y); } }