public void RemoveActionItem(ActionItem actionItem) { if (ActionItems == null || actionItem == null || !ActionItems.Contains(actionItem)) { return; } ActionItems.Remove(actionItem); UpdateProperties(); }
private void Remove(ActionItem item) { double newHeight = ActionPanel.Height - item.ActualHeight; if (newHeight <= 0) { ActionPanel.Height = double.NaN; } else { ActionPanel.Height = newHeight; } ActionPanel.Children.Remove(item); ActionItems.Remove(item); if (ActionItems.Count == 1) { ActionPanel.Height = Double.NaN; } SortAction(); UpdateActionsLocation(); }