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)
1637private class SubToolboxItem : ToolboxItem 1726private class NoValidationToolboxItem : ToolboxItem 1741private class NullComponentsToolboxItem : ToolboxItem
78 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 (74)
System\Drawing\Design\ToolboxItemCollectionTests.cs (7)
11ToolboxItem item = new(); 28ToolboxItem item = new(); 46ToolboxItem item = new(); 48Assert.False(collection.Contains(new ToolboxItem { DisplayName = "Other" })); 55ToolboxItem item = new(); 57Assert.Equal(-1, collection.IndexOf(new ToolboxItem { DisplayName = "Other" })); 64ToolboxItem item = new();
System\Drawing\Design\ToolboxItemTests.cs (66)
18ToolboxItem item = new(); 50ToolboxItem item = new() 94ToolboxItem item = new(); 108ToolboxItem item = new() 124ToolboxItem item = new(); 132ToolboxItem item = new() 148ToolboxItem item = new(); 164ToolboxItem item = new() 200ToolboxItem item = new(); 208ToolboxItem item = new() 224ToolboxItem item = new(); 232ToolboxItem item = new() 248ToolboxItem item = new(); 264ToolboxItem item = new() 280ToolboxItem item = new(); 288ToolboxItem item = new() 304ToolboxItem item = new(); 311ToolboxItem item = new(); 319ToolboxItem item = new() 335ToolboxItem item = new(); 343ToolboxItem item = new() 359ToolboxItem item = new(); 366ToolboxItem item = new() 422ToolboxItem item = new() 480ToolboxItem item = new() 546ToolboxItem item = new() 672ToolboxItem item = new() 981ToolboxItem item = new(); 983yield return new object[] { item, new ToolboxItem(), true }; 989new ToolboxItem 1002new ToolboxItem { TypeName = "TypeName" }, 1003new ToolboxItem { TypeName = "TypeName" }, 1008new ToolboxItem { TypeName = "TypeName" }, 1009new ToolboxItem { TypeName = "typename" }, 1014new ToolboxItem { TypeName = "TypeName" }, 1015new ToolboxItem(), 1020new ToolboxItem(), 1021new ToolboxItem { TypeName = "TypeName" }, 1045new ToolboxItem { DisplayName = "DisplayName" }, 1046new ToolboxItem { DisplayName = "DisplayName" }, 1051new ToolboxItem { DisplayName = "DisplayName" }, 1052new ToolboxItem { DisplayName = "displayname" }, 1057new ToolboxItem { DisplayName = "DisplayName" }, 1058new ToolboxItem(), 1063new ToolboxItem(), 1064new ToolboxItem { DisplayName = "DisplayName" }, 1088new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1089new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1094new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1095new ToolboxItem { AssemblyName = new AssemblyName("name") }, 1100new ToolboxItem(), 1101new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1106new ToolboxItem { AssemblyName = new AssemblyName("Name") }, 1107new ToolboxItem(), 1111yield return new object[] { new ToolboxItem(), new(), false }; 1112yield return new object[] { new ToolboxItem(), null, false }; 1175yield return new object[] { new ToolboxItem() }; 1176yield return new object[] { new ToolboxItem { TypeName = "TypeName", DisplayName = "DisplayName" } }; 1285ToolboxItem item = new() 1341ToolboxItem item = new() 1386ToolboxItem item = new() 1415ToolboxItem item = new() 1442ToolboxItem item = new(); 1450ToolboxItem item = new(); 1519yield return new object[] { new ToolboxItem(), string.Empty }; 1520yield return new object[] { new ToolboxItem { DisplayName = "DisplayName" }, "DisplayName" };
System\Windows\Forms\Design\ItemTypeToolStripMenuItemTests.cs (1)
48ToolboxItem toolboxItem = new(typeof(string));
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
47ToolboxItem toolboxItem = new()
146 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/// <see cref="ToolboxItemCollection"/> 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\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\CompositionDesigner.cs (3)
90bool IToolboxUser.GetToolSupported(ToolboxItem tool) 95void IToolboxUser.ToolPicked(ToolboxItem tool) 129protected virtual bool GetToolSupported(ToolboxItem tool)
System\Windows\Forms\Design\DocumentDesigner.cs (7)
317private static ToolboxItem CreateCfCodeToolboxItem(IDataObject dataObject) 322return (ToolboxItem)serializationData; 657protected virtual bool GetToolSupported(ToolboxItem tool) 1043private ToolboxItem OnCreateToolboxItem(object serializedData, string format) 1362protected virtual void ToolPicked(ToolboxItem tool) 1433bool IToolboxUser.GetToolSupported(ToolboxItem tool) 1442void 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)
45/// <para>Saves the state of this <see cref="ToolboxItem"/> to 58/// <para>Loads the state of this <see cref="ToolboxItem"/>
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)
122protected 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 (51)
System\Drawing\Design\ToolboxItemCollectionTests.cs (12)
11ToolboxItem item = new(); 12ToolboxItemCollection collection = new((ToolboxItem[])[item]); 22Assert.Throws<ArgumentNullException>("c", () => new ToolboxItemCollection((ToolboxItem[])null)); 28ToolboxItem item = new(); 29ToolboxItemCollection value = new((ToolboxItem[])[item]); 46ToolboxItem item = new(); 47ToolboxItemCollection collection = new((ToolboxItem[])[item]); 55ToolboxItem item = new(); 56ToolboxItemCollection collection = new((ToolboxItem[])[item]); 64ToolboxItem item = new(); 65ToolboxItemCollection collection = new((ToolboxItem[])[item]); 67var array = new ToolboxItem[3];
System\Drawing\Design\ToolboxItemTests.cs (38)
18ToolboxItem item = new(); 50ToolboxItem item = new() 94ToolboxItem item = new(); 108ToolboxItem item = new() 124ToolboxItem item = new(); 132ToolboxItem item = new() 148ToolboxItem item = new(); 164ToolboxItem item = new() 200ToolboxItem item = new(); 208ToolboxItem item = new() 224ToolboxItem item = new(); 232ToolboxItem item = new() 248ToolboxItem item = new(); 264ToolboxItem item = new() 280ToolboxItem item = new(); 288ToolboxItem item = new() 304ToolboxItem item = new(); 311ToolboxItem item = new(); 319ToolboxItem item = new() 335ToolboxItem item = new(); 343ToolboxItem item = new() 359ToolboxItem item = new(); 366ToolboxItem item = new() 422ToolboxItem item = new() 480ToolboxItem item = new() 546ToolboxItem item = new() 672ToolboxItem item = new() 981ToolboxItem item = new(); 1117public void ToolboxItem_Equals_Invoke_ReturnsExpected(ToolboxItem item, object other, bool expected) 1182public void ToolboxItem_GetHashCode_Invoke_ReturnsExpected(ToolboxItem item) 1198yield return new object[] { null, new AssemblyName(typeof(ToolboxItem).Assembly.FullName), "System.Int32", false, typeof(int) }; 1285ToolboxItem item = new() 1341ToolboxItem item = new() 1386ToolboxItem item = new() 1415ToolboxItem item = new() 1442ToolboxItem item = new(); 1450ToolboxItem item = new(); 1526public void ToolboxItem_ToString_Invoke_ReturnsExpected(ToolboxItem item, string expected)
System\Windows\Forms\Design\ItemTypeToolStripMenuItemTests.cs (1)
48ToolboxItem toolboxItem = new(typeof(string));
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)