/// <summary> /// Gets if the specified components can be deleted. /// </summary> public static bool CanDeleteComponents(ICollection <DesignItem> items) { IPlacementBehavior b = PlacementOperation.GetPlacementBehavior(items); return(b != null && b.CanPlace(items, PlacementType.Delete, PlacementAlignment.Center)); }
void UpdateAdornerVisibility() { FrameworkElement fe = this.ExtendedItem.View as FrameworkElement; foreach (DesignerThumb r in _designerThumbs) { bool isVisible = resizeBehavior != null && resizeBehavior.CanPlace(extendedItemArray, PlacementType.Resize, r.Alignment); r.Visibility = isVisible ? Visibility.Visible : Visibility.Hidden; } }
public void Start(Point p) { startPoint = p; IPlacementBehavior b = PlacementOperation.GetPlacementBehavior(selectedItems); if (b != null && b.CanPlace(selectedItems, PlacementType.Move, PlacementAlignment.TopLeft)) { List <DesignItem> sortedSelectedItems = new List <DesignItem>(selectedItems); sortedSelectedItems.Sort(ModelTools.ComparePositionInModelFile); selectedItems = sortedSelectedItems; operation = PlacementOperation.Start(selectedItems, PlacementType.Move); } }