5 types derived from ToolboxItem
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
17private class AxToolboxItem : ToolboxItem
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
17internal class CfCodeToolboxItem : ToolboxItem
System.Windows.Forms.Design.Tests (3)
System\Drawing\Design\ToolboxItemTests.cs (3)
1639private class SubToolboxItem : ToolboxItem 1728private class NoValidationToolboxItem : ToolboxItem 1743private class NullComponentsToolboxItem : ToolboxItem
80 instantiations of ToolboxItem
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
54ToolboxItem toolboxItem = new(typeof(ToolStripContainer));
System\Windows\Forms\Design\ItemTypeToolStripMenuItem.cs (1)
14private static readonly ToolboxItem s_invalidToolboxItem = new();
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
119tbxItem = new ToolboxItem(itemType);
System.Windows.Forms.Design.Tests (76)
System\Drawing\Design\ToolboxItemCollectionTests.cs (7)
13ToolboxItem item = new(); 30ToolboxItem item = new(); 48ToolboxItem item = new(); 50Assert.False(collection.Contains(new ToolboxItem { DisplayName = "Other" })); 57ToolboxItem item = new(); 59Assert.Equal(-1, collection.IndexOf(new ToolboxItem { DisplayName = "Other" })); 66ToolboxItem item = new();
System\Drawing\Design\ToolboxItemTests.cs (66)
20ToolboxItem item = new(); 52ToolboxItem item = new() 96ToolboxItem item = new(); 110ToolboxItem item = new() 126ToolboxItem item = new(); 134ToolboxItem item = new() 150ToolboxItem item = new(); 166ToolboxItem item = new() 202ToolboxItem item = new(); 210ToolboxItem item = new() 226ToolboxItem item = new(); 234ToolboxItem item = new() 250ToolboxItem item = new(); 266ToolboxItem item = new() 282ToolboxItem item = new(); 290ToolboxItem item = new() 306ToolboxItem item = new(); 313ToolboxItem item = new(); 321ToolboxItem item = new() 337ToolboxItem item = new(); 345ToolboxItem item = new() 361ToolboxItem item = new(); 368ToolboxItem item = new() 424ToolboxItem item = new() 482ToolboxItem item = new() 548ToolboxItem item = new() 674ToolboxItem item = new() 983ToolboxItem item = new(); 985yield return new object[] { item, new ToolboxItem(), true }; 991new ToolboxItem 1004new ToolboxItem { TypeName = "TypeName" }, 1005new ToolboxItem { TypeName = "TypeName" }, 1010new ToolboxItem { TypeName = "TypeName" }, 1011new ToolboxItem { TypeName = "typename" }, 1016new ToolboxItem { TypeName = "TypeName" }, 1017new ToolboxItem(), 1022new ToolboxItem(), 1023new ToolboxItem { TypeName = "TypeName" }, 1047new ToolboxItem { DisplayName = "DisplayName" }, 1048new ToolboxItem { DisplayName = "DisplayName" }, 1053new ToolboxItem { DisplayName = "DisplayName" }, 1054new ToolboxItem { DisplayName = "displayname" }, 1059new ToolboxItem { DisplayName = "DisplayName" }, 1060new ToolboxItem(), 1065new ToolboxItem(), 1066new ToolboxItem { DisplayName = "DisplayName" }, 1090new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1091new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1096new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1097new ToolboxItem { AssemblyName = new AssemblyName("name") }, 1102new ToolboxItem(), 1103new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1108new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1109new ToolboxItem(), 1113yield return new object[] { new ToolboxItem(), new(), false }; 1114yield return new object[] { new ToolboxItem(), null, false }; 1177yield return new object[] { new ToolboxItem() }; 1178yield return new object[] { new ToolboxItem { TypeName = "TypeName", DisplayName = "DisplayName" } }; 1287ToolboxItem item = new() 1343ToolboxItem item = new() 1388ToolboxItem item = new() 1417ToolboxItem item = new() 1444ToolboxItem item = new(); 1452ToolboxItem item = new(); 1521yield return new object[] { new ToolboxItem(), string.Empty }; 1522yield return new object[] { new ToolboxItem { DisplayName = "DisplayName" }, "DisplayName" };
System\Windows\Forms\Design\ItemTypeToolStripMenuItemTests.cs (1)
46ToolboxItem toolboxItem = new(typeof(string));
System\Windows\Forms\Design\OleDragDropHandlerTests.cs (1)
66ToolboxItem toolboxItem = new();
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
221ToolboxItem toolboxItem = new(typeof(Button));
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
47ToolboxItem toolboxItem = new()
150 references to ToolboxItem
System.Windows.Forms.Design (78)
System\Drawing\Design\IToolboxService.cs (12)
43void AddLinkedToolboxItem(ToolboxItem toolboxItem, IDesignerHost host); 48void AddLinkedToolboxItem(ToolboxItem toolboxItem, string category, IDesignerHost host); 53void AddToolboxItem(ToolboxItem toolboxItem); 58void AddToolboxItem(ToolboxItem toolboxItem, string category); 63ToolboxItem DeserializeToolboxItem(object serializedObject); 68ToolboxItem DeserializeToolboxItem(object serializedObject, IDesignerHost host); 73ToolboxItem GetSelectedToolboxItem(); 78ToolboxItem GetSelectedToolboxItem(IDesignerHost host); 142void RemoveToolboxItem(ToolboxItem toolboxItem); 147void RemoveToolboxItem(ToolboxItem toolboxItem, string category); 158object SerializeToolboxItem(ToolboxItem toolboxItem); 170void SetSelectedToolboxItem(ToolboxItem toolboxItem);
System\Drawing\Design\IToolboxUser.cs (2)
16bool GetToolSupported(ToolboxItem tool); 22void ToolPicked(ToolboxItem tool);
System\Drawing\Design\ToolboxComponentsCreatedEventHandler.cs (1)
7/// Represents a method that will handle the <see cref="ToolboxItem.ComponentsCreated"/> event.
System\Drawing\Design\ToolboxComponentsCreatingEventHandler.cs (1)
7/// Represents a method that will handle the <see cref="ToolboxItem.ComponentsCreating"/> event.
System\Drawing\Design\ToolboxItem.cs (8)
94/// Gets or sets the company name for this <see cref="ToolboxItem"/>. 119/// Gets or sets the display name for this <see cref="ToolboxItem"/>. 381ToolboxItem otherItem = (ToolboxItem)obj; 721/// will be called when this <see cref="ToolboxItem"/> creates a component. 730/// will be called before this <see cref="ToolboxItem"/> creates a component. 807private readonly ToolboxItem _item; 808internal LockableDictionary(ToolboxItem item, int capacity) : base(capacity)
System\Drawing\Design\ToolboxItemCollection.cs (11)
9/// A collection that stores <see cref="ToolboxItem"/> objects. 22/// Initializes a new instance of <see cref="ToolboxItemCollection"/> containing any array of <see cref="ToolboxItem"/> objects. 24public ToolboxItemCollection(ToolboxItem[] value) 30/// Represents the entry at the specified index of the <see cref="ToolboxItem"/>. 32public ToolboxItem this[int index] => (ToolboxItem)InnerList[index]!; 36/// contains the specified <see cref="ToolboxItem"/>. 38public bool Contains(ToolboxItem value) => InnerList.Contains(value); 44public void CopyTo(ToolboxItem[] array, int index) 50/// Returns the index of a <see cref="ToolboxItem"/> in 53public int IndexOf(ToolboxItem value) => InnerList.IndexOf(value);
System\Drawing\Design\ToolboxItemCreatorCallback.cs (1)
9public delegate ToolboxItem ToolboxItemCreatorCallback(object serializedObject, string format);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
269ToolboxItem item = toolboxService.DeserializeToolboxItem(e.Data, host);
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
54ToolboxItem toolboxItem = new(typeof(ToolStripContainer));
System\Windows\Forms\Design\CommandSet.cs (1)
1883ToolboxItem? ti = ts.DeserializeToolboxItem(dataObj, host);
System\Windows\Forms\Design\ComponentDocumentDesigner.cs (3)
88bool IToolboxUser.GetToolSupported(ToolboxItem tool) 93void IToolboxUser.ToolPicked(ToolboxItem tool) 127protected virtual bool GetToolSupported(ToolboxItem tool)
System\Windows\Forms\Design\ComponentTray.cs (5)
55private ToolboxItem _mouseDragTool; // the tool that's being dragged; only for drag/drop 749protected virtual bool CanCreateComponentFromTool(ToolboxItem tool) 817public void CreateComponentFromTool(ToolboxItem tool) 1074ToolboxItem tool = _mouseDragTool; 1234ToolboxItem tool = _toolboxService.GetSelectedToolboxItem((IDesignerHost)GetService(typeof(IDesignerHost)));
System\Windows\Forms\Design\DocumentDesigner.cs (7)
305private static ToolboxItem CreateCfCodeToolboxItem(IDataObject dataObject) 310return (ToolboxItem)serializationData; 645protected virtual bool GetToolSupported(ToolboxItem tool) 1031private ToolboxItem OnCreateToolboxItem(object serializedData, string format) 1350protected virtual void ToolPicked(ToolboxItem tool) 1421bool IToolboxUser.GetToolSupported(ToolboxItem tool) 1430void IToolboxUser.ToolPicked(ToolboxItem tool)
System\Windows\Forms\Design\ItemTypeToolStripMenuItem.cs (2)
14private static readonly ToolboxItem s_invalidToolboxItem = new(); 53public ToolboxItem ToolboxItem { get; set; } = s_invalidToolboxItem;
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (2)
43/// Saves the state of this <see cref="ToolboxItem"/> to the specified serialization info. 55/// Loads the state of this <see cref="ToolboxItem"/> from the stream.
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
134public IComponent[] CreateTool(ToolboxItem tool, Control? parent, int x, int y, int width, int height, bool hasLocation, bool hasSize) 139public IComponent[] CreateTool(ToolboxItem tool, Control? parent, int x, int y, int width, int height, bool hasLocation, bool hasSize, ToolboxSnapDragDropEventArgs? e)
System\Windows\Forms\Design\ParentControlDesigner.cs (8)
24private ToolboxItem _mouseDragTool; // the tool that's being dragged, if we're creating a component 284protected ToolboxItem MouseDragTool => _mouseDragTool; 761protected static void InvokeCreateTool(ParentControlDesigner toInvoke, ToolboxItem tool) 790protected void CreateTool(ToolboxItem tool) 800protected void CreateTool(ToolboxItem tool, Point location) 810protected void CreateTool(ToolboxItem tool, Rectangle bounds) 820protected virtual IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 1770ToolboxItem tool = _mouseDragTool;
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
160protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System\Windows\Forms\Design\TabControlDesigner.cs (1)
117protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1200protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
163protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (5)
21private static Dictionary<Type, ToolboxItem> t_cachedToolboxItems; 109private static ToolboxItem GetCachedToolboxItem(Type itemType) 112if (t_cachedToolboxItems.TryGetValue(itemType, out ToolboxItem tbxItem)) 156ToolboxItem tbxItem = GetCachedToolboxItem(itemType); 172ToolboxItem tbxItem = GetCachedToolboxItem(itemType);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
165protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System.Windows.Forms.Design.Tests (55)
System\Drawing\Design\ToolboxItemCollectionTests.cs (12)
13ToolboxItem item = new(); 14ToolboxItemCollection collection = new((ToolboxItem[])[item]); 24Assert.Throws<ArgumentNullException>("c", () => new ToolboxItemCollection((ToolboxItem[])null)); 30ToolboxItem item = new(); 31ToolboxItemCollection value = new((ToolboxItem[])[item]); 48ToolboxItem item = new(); 49ToolboxItemCollection collection = new((ToolboxItem[])[item]); 57ToolboxItem item = new(); 58ToolboxItemCollection collection = new((ToolboxItem[])[item]); 66ToolboxItem item = new(); 67ToolboxItemCollection collection = new((ToolboxItem[])[item]); 69var array = new ToolboxItem[3];
System\Drawing\Design\ToolboxItemTests.cs (38)
20ToolboxItem item = new(); 52ToolboxItem item = new() 96ToolboxItem item = new(); 110ToolboxItem item = new() 126ToolboxItem item = new(); 134ToolboxItem item = new() 150ToolboxItem item = new(); 166ToolboxItem item = new() 202ToolboxItem item = new(); 210ToolboxItem item = new() 226ToolboxItem item = new(); 234ToolboxItem item = new() 250ToolboxItem item = new(); 266ToolboxItem item = new() 282ToolboxItem item = new(); 290ToolboxItem item = new() 306ToolboxItem item = new(); 313ToolboxItem item = new(); 321ToolboxItem item = new() 337ToolboxItem item = new(); 345ToolboxItem item = new() 361ToolboxItem item = new(); 368ToolboxItem item = new() 424ToolboxItem item = new() 482ToolboxItem item = new() 548ToolboxItem item = new() 674ToolboxItem item = new() 983ToolboxItem item = new(); 1119public void ToolboxItem_Equals_Invoke_ReturnsExpected(ToolboxItem item, object other, bool expected) 1184public void ToolboxItem_GetHashCode_Invoke_ReturnsExpected(ToolboxItem item) 1200yield return new object[] { null, new AssemblyName(typeof(ToolboxItem).Assembly.FullName), "System.Int32", false, typeof(int) }; 1287ToolboxItem item = new() 1343ToolboxItem item = new() 1388ToolboxItem item = new() 1417ToolboxItem item = new() 1444ToolboxItem item = new(); 1452ToolboxItem item = new(); 1528public void ToolboxItem_ToString_Invoke_ReturnsExpected(ToolboxItem item, string expected)
System\Windows\Forms\Design\ItemTypeToolStripMenuItemTests.cs (1)
46ToolboxItem toolboxItem = new(typeof(string));
System\Windows\Forms\Design\OleDragDropHandlerTests.cs (1)
66ToolboxItem toolboxItem = new();
System\Windows\Forms\Design\ParentControlDesignerTests.cs (3)
214ToolboxItem mouseDragTool = _designer.TestAccessor().Dynamic.MouseDragTool; 221ToolboxItem toolboxItem = new(typeof(Button)); 223ToolboxItem mouseDragTool = _designer.TestAccessor().Dynamic.MouseDragTool;
System.Windows.Forms.UI.IntegrationTests (17)
DesignBehaviorsTests.cs (17)
47ToolboxItem toolboxItem = new() 111node.Tag is not ToolboxItem toolboxItem) 159public void AddLinkedToolboxItem(ToolboxItem toolboxItem, IDesignerHost host) 164public void AddLinkedToolboxItem(ToolboxItem toolboxItem, string category, IDesignerHost host) 169public void AddToolboxItem(ToolboxItem toolboxItem) 174public void AddToolboxItem(ToolboxItem toolboxItem, string category) 179public ToolboxItem DeserializeToolboxItem(object serializedObject) 184public ToolboxItem DeserializeToolboxItem(object serializedObject, IDesignerHost? host) 187ToolboxItem? item = ((DataObject)serializedObject)?.GetData(typeof(ToolboxItem)) as ToolboxItem; 192public ToolboxItem GetSelectedToolboxItem() 197public ToolboxItem GetSelectedToolboxItem(IDesignerHost host) 257public void RemoveToolboxItem(ToolboxItem toolboxItem) 262public void RemoveToolboxItem(ToolboxItem toolboxItem, string category) 272public object SerializeToolboxItem(ToolboxItem toolboxItem) 282public void SetSelectedToolboxItem(ToolboxItem toolboxItem)