private static void RemoveStandardItem(IToolboxService ts) { ToolboxItemCollection items = ts.GetToolboxItems(); ToolboxItem standardItem = items.OfType <ToolboxItem>().FirstOrDefault(x => String.Equals(x.DisplayName, "Chart")); if (standardItem != null) { ts.RemoveToolboxItem(standardItem); } }
private static void RemoveStandardItem(IToolboxService ts) { ToolboxItemCollection items = ts.GetToolboxItems(); ToolboxItem standardItem = items.OfType <ToolboxItem>().FirstOrDefault(x => x.DisplayName == "Label"); if (standardItem != null) { ts.RemoveToolboxItem(standardItem); } }