2 interfaces inheriting from IComponent
System.Windows.Forms (2)
System\Windows\Forms\DataBinding\IBindableComponent.cs (1)
8public interface IBindableComponent : IComponent
System\Windows\Forms\Layout\IArrangedElement.cs (1)
9internal interface IArrangedElement : IComponent
7 implementations of IComponent
System.ComponentModel.Primitives (1)
System\ComponentModel\Component.cs (1)
11public class Component : MarshalByRefObject, IComponent
System.ComponentModel.TypeConverter (1)
System\ComponentModel\MarshalByValueComponent.cs (1)
17public class MarshalByValueComponent : IComponent, IServiceProvider
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
17public class DataGridViewColumn : DataGridViewBand, IComponent
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1201internal class ListBoxItem : ICustomTypeDescriptor, IComponent
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
16internal class DesignerToolStripControlHost : ToolStripControlHost, IComponent
System.Windows.Forms.Tests (2)
System\Windows\Forms\LayoutEventArgsTests.cs (1)
89private class SubComponent : IComponent
System\Windows\Forms\ListControlTests.cs (1)
2870private class ComponentList : List<int>, IComponent
985 references to IComponent
DesignSurface (1)
CustomControls\CustomButtonDesignerActionList.cs (1)
16public CustomButtonDesignerActionList(IComponent component)
DesignSurfaceExt (6)
DesignSurfaceExt.cs (5)
89where TControl : Control, IComponent 167IComponent newComp = CreateComponent<TControl>(out IDesignerHost host); 198where TComponent : IComponent 204where TComponent : IComponent 213|| host.CreateComponent(typeof(TComponent)) is not IComponent newComp
IDesignSurfaceExt.cs (1)
27where TControl : Control, IComponent;
netstandard (1)
netstandard.cs (1)
328[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.IComponent))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
314[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.IComponent))]
System.ComponentModel.Primitives (14)
System\ComponentModel\Component.cs (1)
7/// Provides the default implementation for the <see cref='System.ComponentModel.IComponent'/>
System\ComponentModel\ComponentCollection.cs (6)
10public ComponentCollection(IComponent[] components) => InnerList.AddRange(components); 16public virtual IComponent? this[string? name] 23foreach (IComponent? comp in list) 39public virtual IComponent? this[int index] => (IComponent?)InnerList[index]; 41public void CopyTo(IComponent[] array, int index) => InnerList.CopyTo(array, index);
System\ComponentModel\IComponent.cs (1)
31/// associated with the <see cref='System.ComponentModel.IComponent'/>.
System\ComponentModel\IContainer.cs (5)
19/// Adds the specified <see cref='System.ComponentModel.IComponent'/> to the 22void Add(IComponent? component); 26/// Adds the specified <see cref='System.ComponentModel.IComponent'/> to the 31void Add(IComponent? component, string? name); 41void Remove(IComponent? component);
System\ComponentModel\ISite.cs (1)
25IComponent Component { get; }
System.ComponentModel.TypeConverter (58)
System\ComponentModel\ComponentResourceManager.cs (2)
130if (value is IComponent) 132ISite? site = ((IComponent)value).Site;
System\ComponentModel\Container.cs (12)
28public virtual void Add(IComponent? component) => Add(component, null); 36public virtual void Add(IComponent? component, string? name) 78/// Creates a Site <see cref='System.ComponentModel.ISite'/> for the given <see cref='System.ComponentModel.IComponent'/> 81protected virtual ISite CreateSite(IComponent component, string? name) 143IComponent[] result = new IComponent[_siteCount]; 181public virtual void Remove(IComponent? component) => Remove(component, false); 183private void Remove(IComponent? component, bool preserveSite) 212protected void RemoveWithoutUnsiting(IComponent? component) => Remove(component, true); 220protected virtual void ValidateName(IComponent component, string? name) 249internal Site(IComponent component, Container container, string? name) 259public IComponent Component { get; }
System\ComponentModel\Design\ComponentEventArgs.cs (2)
15public virtual IComponent? Component { get; } 20public ComponentEventArgs(IComponent? component)
System\ComponentModel\Design\IDesigner.cs (2)
16IComponent Component { get; } 31void Initialize(IComponent component);
System\ComponentModel\Design\IDesignerHost.cs (5)
39IComponent RootComponent { get; } 94IComponent CreateComponent(Type componentClass); 99IComponent CreateComponent(Type componentClass, string name); 124void DestroyComponent(IComponent component); 129IDesigner? GetDesigner(IComponent component);
System\ComponentModel\Design\IEventPropertyService.cs (2)
18string CreateUniqueMethodName(IComponent component, EventDescriptor e); 58bool ShowCode(IComponent component, EventDescriptor e);
System\ComponentModel\Design\IInheritanceService.cs (2)
14void AddInheritedComponents(IComponent component, IContainer container); 22InheritanceAttribute GetInheritanceAttribute(IComponent component);
System\ComponentModel\Design\IReferenceService.cs (1)
15IComponent? GetComponent(object reference);
System\ComponentModel\Design\ITypeDescriptorFilterService.cs (3)
16bool FilterAttributes(IComponent component, IDictionary attributes); 21bool FilterEvents(IComponent component, IDictionary events); 26bool FilterProperties(IComponent component, IDictionary properties);
System\ComponentModel\INestedContainer.cs (1)
19IComponent Owner { get; }
System\ComponentModel\MarshalByValueComponent.cs (1)
10/// Provides the base implementation for <see cref='System.ComponentModel.IComponent'/>,
System\ComponentModel\MemberDescriptor.cs (1)
444protected static ISite? GetSite(object? component) => (component as IComponent)?.Site;
System\ComponentModel\NestedContainer.cs (6)
21public NestedContainer(IComponent owner) 32public IComponent Owner { get; } 64protected override ISite CreateSite(IComponent component, string? name) 108internal Site(IComponent component, NestedContainer container, string? name) 116public IComponent Component { get; } 131IComponent owner = ((NestedContainer)Container).Owner;
System\ComponentModel\ReferenceConverter.cs (2)
101if (!Marshal.IsComObject(value) && value is IComponent comp) 154foreach (IComponent obj in objs)
System\ComponentModel\ReflectPropertyDescriptor.cs (2)
924IComponent? comp = component as IComponent;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (6)
321IComponent? comp = instance as IComponent; 653IComponent? component = instance as IComponent; 847IComponent? comp = component as IComponent;
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (2)
162IComponent? comp = instance as IComponent;
System\ComponentModel\TypeDescriptor.cs (6)
645IComponent? component = primary as IComponent; 1280if (prov is IComponent component && component.Site != null) 1951IComponent? component = instance as IComponent; 2542public static IDesigner? CreateDesigner(IComponent component, Type designerBaseType)
System.Configuration.ConfigurationManager (3)
System\Configuration\ApplicationSettingsBase.cs (3)
18private readonly IComponent _owner; 42protected ApplicationSettingsBase(IComponent owner) : this(owner, string.Empty) 57protected ApplicationSettingsBase(IComponent owner, string settingsKey) : this(settingsKey)
System.Windows.Forms (55)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
322foreach (IComponent component in components)
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (2)
18internal AxSourcingSite(IComponent component, AgileComPointer<IOleClientSite> clientSite, string? name) 28public IComponent Component { get; }
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
100internal static TypeConverter GetIComponentConverter() => TypeDescriptor.GetConverter(typeof(IComponent));
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
2445if (DataSource is IComponent component) 2464if (dataSource is IComponent component)
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
774if (_dataSource is IComponent componentDataSource) 793if (_dataSource is IComponent componentDataSource)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (7)
1067&& currentObject is IComponent component 1484if (@object is IComponent component && component.Site is ISite site) 1740IComponent? component = null; 1749if (GetUnwrappedObject(i) is IComponent iComponent) 2995if (SelectedObject is IComponent currentSelection && currentSelection.Site is null) 3154if (baseObject is IComponent component 3451foreach (IComponent component in components)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SelectedObjectConverter.cs (1)
12public SelectedObjectConverter() : base(typeof(IComponent))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
18/// <see cref="DesignerVerb"/> commands are found by looking for services on <see cref="IComponent.Site"/>.
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (5)
166public virtual IComponent? Component 167=> GetValueOwner() is IComponent component ? component : _parent?.Component; 1174/// <see cref="IComponent"/>. 1176public virtual IComponent[]? GetComponents() 1178IComponent? component = Component;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (4)
38if (o is not IComponent component) 157public override IComponent[] GetComponents() 159var copy = new IComponent[_objects.Length]; 279bool needChangeNotify = objects[0] is not IComponent component || component.Site is null;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (5)
33private static IComponent? s_targetComponent; 576bool needChangeNotify = owner is not IComponent component || component.Site is null; 800var component = owner as IComponent; 807component = array.GetValue(0) as IComponent;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
166if (Target is IComponent component)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (5)
22private readonly IComponent _comp; 23private readonly IComponent _owner; 25public StubSite(IComponent control, IComponent host) 34IComponent ISite.Component => _comp;
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
215foreach (IComponent comp in comps)
System\Windows\Forms\DataBinding\Binding.cs (1)
571if (BindableComponent is not IComponent comp)
System\Windows\Forms\Design\ComponentEditorForm.ComponentEditorPageSite.cs (2)
17internal IComponent _component; 27internal ComponentEditorPageSite(Control parent, Type pageClass, IComponent component, ComponentEditorForm form)
System\Windows\Forms\Design\ComponentEditorForm.cs (3)
16private readonly IComponent _component; 45if (component is not IComponent) 50_component = (IComponent)component;
System\Windows\Forms\Design\ComponentEditorPage.cs (3)
52protected IComponent? Component { get; set; } 159protected IComponent? GetSelectedComponent() => Component; 216public virtual void SetComponent(IComponent? component)
System\Windows\Forms\Design\EventsTab.cs (1)
73if (@object is IComponent component)
System\Windows\Forms\Design\WindowsFormsComponentEditor.cs (1)
10/// <see cref="IComponent"/> objects.
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
318public static string GetComponentName(IComponent component, string? defaultNameValue)
System\Windows\Forms\Layout\LayoutEventArgs.cs (5)
10private readonly WeakReference<IComponent>? _affectedComponent; 12public LayoutEventArgs(IComponent? affectedComponent, string? affectedProperty) 19: this((IComponent?)affectedControl, affectedProperty) 23public IComponent? AffectedComponent 27IComponent? target = null;
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
35.Any(i => i.Name == nameof(IComponent)))
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
38Function(i) i.Name = NameOf(IComponent)) Then
System.Windows.Forms.Design (718)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
249if (_createdItems is [IComponent { Site: not null }, ..])
System\ComponentModel\Design\CollectionEditor.cs (5)
58if (value is IComponent component) 95if (Context.TryGetService(out IDesignerHost? host) && typeof(IComponent).IsAssignableFrom(itemType)) 97IComponent instance = host.CreateComponent(itemType); 199if (instance is IComponent component) 307if (item is not IComponent { Site: null } component)
System\ComponentModel\Design\CollectionEditor.PropertyGridSite.cs (2)
13public PropertyGridSite(IServiceProvider? serviceProvider, IComponent component) 19public IComponent Component { get; }
System\ComponentModel\Design\ComponentDesigner.cs (13)
21private IComponent? _component; 34public virtual ICollection AssociatedComponents => Array.Empty<IComponent>(); 78protected virtual IComponent? ParentComponent 82IComponent? root = GetService<IDesignerHost>()?.RootComponent; 172public IComponent Component => _component ?? throw new InvalidOperationException("Designer is not initialized"); 200foreach (IComponent comp in comps.OfType<IComponent>()) 224IComponent? parent = ParentComponent; 269foreach (IComponent comp in components.OfType<IComponent>()) 375public virtual void Initialize(IComponent component) 473IComponent? rootComponent = GetService<IDesignerHost>()?.RootComponent; 497IComponent? rootComponent = GetService<IDesignerHost>()?.RootComponent;
System\ComponentModel\Design\DesignerActionList.cs (2)
16public DesignerActionList(IComponent? component) => Component = component; 20public IComponent? Component { get; }
System\ComponentModel\Design\DesignerActionMethodItem.cs (1)
45public IComponent RelatedComponent { get; set; }
System\ComponentModel\Design\DesignerActionPanel.cs (2)
578IComponent? relatedComponent = null; 605private List<StandardLineInfo> ProcessRelatedTaskItems(IComponent relatedComponent)
System\ComponentModel\Design\DesignerActionPropertyItem.cs (1)
26public IComponent? RelatedComponent { get; set; }
System\ComponentModel\Design\DesignerActionService.cs (15)
17private readonly Dictionary<IComponent, DesignerActionListCollection> _designerActionLists; // this is how we store 'em. Syntax: key = object, value = DesignerActionListCollection 22private readonly HashSet<IComponent> _componentToVerbsEventHookedUp; 63public void Add(IComponent comp, DesignerActionListCollection designerActionListCollection) 84public void Add(IComponent comp, DesignerActionList actionList) 100IComponent[] compsRemoved = [.. _designerActionLists.Keys]; 106foreach (IComponent comp in compsRemoved) 115public bool Contains(IComponent comp) 143public DesignerActionListCollection GetComponentActions(IComponent component) 148public virtual DesignerActionListCollection GetComponentActions(IComponent component, ComponentActionsType type) 170protected virtual void GetComponentDesignerActions(IComponent component, DesignerActionListCollection actionLists) 244if (_selectionService?.PrimarySelection is IComponent { Site: IServiceContainer container } comp) 264protected virtual void GetComponentServiceActions(IComponent component, DesignerActionListCollection actionLists) 306public void Remove(IComponent comp) 325foreach (IComponent comp in _designerActionLists.Keys) 339public void Remove(IComponent comp, DesignerActionList actionList)
System\ComponentModel\Design\DesignerActionUI.cs (17)
33private IComponent? _lastPanelComponent; 40private IComponent? _relatedComponentTransaction; 163public DesignerActionGlyph? GetDesignerActionGlyph(IComponent comp) 168internal DesignerActionGlyph? GetDesignerActionGlyph(IComponent comp, DesignerActionListCollection? dalColl) 257RecreatePanel(ce.Component as IComponent); // because 99% of the time the action is name "dock in parent container" and get replaced by "undock" 265UpdateDAPLocation(ce.Component as IComponent, glyph); 270private void RecreatePanel(IComponent? comp) 309private void RecreateInternal(IComponent comp) 385if (e.RelatedObject is IComponent component) 429if (e.RelatedObject is not IComponent relatedComponent) 435IComponent? primSel = _selectionService.PrimarySelection as IComponent; 458RecreatePanel(e.RelatedObject as IComponent); 574internal IComponent? LastPanelComponent 633internal Point UpdateDAPLocation(IComponent? component, DesignerActionGlyph? glyph) 663private Point GetGlyphLocationScreenCoord(IComponent relatedComponent, Glyph glyph) 693internal void ShowDesignerActionPanel(IComponent relatedComponent, DesignerActionPanel panel, DesignerActionGlyph glyph)
System\ComponentModel\Design\DesignerActionUIService.cs (4)
48public void HideUI(IComponent? component) => 52public void ShowUI(IComponent? component) => 60public void Refresh(IComponent? component) => 70public bool ShouldAutoShow(IComponent component)
System\ComponentModel\Design\DesignerEventService.cs (1)
101if (ce.Component is not IComponent comp)
System\ComponentModel\Design\DesignerHost.cs (24)
53private IComponent? _rootComponent; // the root of our design 55private readonly Dictionary<IComponent, IDesigner> _designers; // designer -> component mapping 116public override void Add(IComponent? component, string? name) 148private void PerformAdd(IComponent component, string? name) 180internal bool AddToContainerPreProcess(IComponent component, string? name, IContainer containerToAddTo) 229internal void AddToContainerPostProcess(IComponent component, IContainer containerToAddTo) 374protected override ISite CreateSite(IComponent component, string? name) 558private void OnComponentRename(IComponent component, string? oldName, string newName) 613public override void Remove(IComponent? component) 627internal bool RemoveFromContainerPreProcess([NotNullWhen(true)] IComponent? component, IContainer container) 674internal void RemoveFromContainerPostProcess(IComponent component) 720IComponent[] components = new IComponent[Components.Count]; 723foreach (IComponent comp in components) 873IComponent IDesignerHost.RootComponent => _rootComponent!; 928IComponent IDesignerHost.CreateComponent(Type componentType) => 931IComponent IDesignerHost.CreateComponent(Type componentType, string name) 935IComponent? component; 958component = _surface.CreateInstance(componentType) as IComponent; 997void IDesignerHost.DestroyComponent(IComponent component) 1032IDesigner? IDesignerHost.GetDesigner(IComponent component) 1139List<IComponent> selectedComponents = new(_savedSelection.Count); 1142IComponent? component = Components[name]; 1176if (item is IComponent component && component.Site?.Name is string name)
System\ComponentModel\Design\DesignerHost.Site.cs (4)
15private readonly IComponent _component; 23internal Site(IComponent component, DesignerHost host, string? name, Container container) 187IComponent ISite.Component => _component; 235IComponent? namedComponent = _container.Components[value];
System\ComponentModel\Design\DesignSurface.cs (8)
130IComponent? rootComponent = ((IDesignerHost)_host).RootComponent; 249protected internal virtual IComponent? CreateComponent(Type componentType) 251return CreateInstance(componentType) as IComponent; 257protected internal virtual IDesigner? CreateDesigner(IComponent component, bool rootDesigner) 284if (typeof(IComponent).IsAssignableFrom(type)) 306public INestedContainer CreateNestedContainer(IComponent owningComponent) 317public INestedContainer CreateNestedContainer(IComponent owningComponent, string? containerName) 443IComponent? rootComponent = ((IDesignerHost)_host).RootComponent;
System\ComponentModel\Design\EventBindingService.cs (7)
17private IComponent? _showCodeComponent; 36protected abstract string CreateUniqueMethodName(IComponent component, EventDescriptor e); 45protected virtual void FreeMethod(IComponent component, EventDescriptor e, string methodName) 82protected abstract bool ShowCode(IComponent component, EventDescriptor e, string methodName); 91protected virtual void UseMethod(IComponent component, EventDescriptor e, string methodName) 108string IEventBindingService.CreateUniqueMethodName(IComponent component, EventDescriptor e) 228bool IEventBindingService.ShowCode(IComponent component, EventDescriptor e)
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (6)
83ISite? site = (component as IComponent)?.Site; 88IComponent? baseComponent = rs?.GetComponent(component); 159ISite? site = (component as IComponent)?.Site; 163IComponent? baseComponent = referenceService.GetComponent(component!); 241_eventService.UseMethod((IComponent)component!, Event, name); 246_eventService.FreeMethod((IComponent)component!, Event, oldName);
System\ComponentModel\Design\InheritanceService.cs (10)
16private Dictionary<IComponent, InheritanceAttribute> _inheritedComponents; 22private IComponent? _addingComponent; 53public void AddInheritedComponents(IComponent component, IContainer container) 61protected virtual void AddInheritedComponents(Type? type, IComponent component, IContainer container) 64if (type is null || !typeof(IComponent).IsAssignableFrom(type)) 95if (!GetReflectionTypeFromTypeHelper(typeof(IComponent)).IsAssignableFrom(reflectionType)) 153Debug.Assert(value is IComponent, "Value of inherited field is not IComponent. How did this value get into the datatype?"); 186if (value is IComponent compValue) 236protected virtual bool IgnoreInheritedMember(MemberInfo member, IComponent? component) 255public InheritanceAttribute GetInheritanceAttribute(IComponent component)
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (1)
64if (!typeof(IComponent).IsAssignableFrom(collectionType))
System\ComponentModel\Design\MenuCommandService.cs (1)
199if (_selectionService.PrimarySelection is IComponent selectedComponent &&
System\ComponentModel\Design\ReferenceService.cs (13)
14private List<IComponent>? _addedComponents; // list of newly added components 15private List<IComponent>? _removedComponents; // list of newly removed components 30private static void CreateReferences(IComponent component, List<ReferenceHolder> references) 38private static void CreateReferences(string trailingName, object? reference, IComponent sitedComponent, List<ReferenceHolder> references) 85foreach (IComponent component in container.Components) 98foreach (IComponent ic in _addedComponents) 109foreach (IComponent ic in _removedComponents) 131IComponent compAdded = cevent.Component!; 146IComponent compRemoved = cevent.Component!; 172private void RemoveReferences(IComponent component) 209IComponent? IReferenceService.GetComponent(object reference) 311internal ReferenceHolder(string trailingName, object reference, IComponent sitedComponent) 369internal IComponent SitedComponent { get; }
System\ComponentModel\Design\SelectionService.cs (13)
15/// A selection consists of an list of <see cref="IComponent"/>. 35private List<IComponent>? _selection; // list of selected objects 55internal void AddSelection(IComponent selection) 168internal IComponent? PrimarySelection => _selection?.Count > 0 ? _selection[0] : null; 173internal void RemoveSelection(IComponent selection) => _selection?.Remove(selection); 367components ??= Array.Empty<IComponent>(); 385IComponent? requestedPrimary = null; 390foreach (IComponent component in components) 416IComponent[] selections = new IComponent[_selection.Count]; 419foreach (IComponent item in selections) 422foreach (IComponent comp in components) 443foreach (IComponent comp in components)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (5)
202private static IComponent? ResolveNestedName(IDesignerSerializationManager? manager, string name, [NotNullIfNotNull(nameof(manager))] out string? outerComponent) 215IComponent? curComp = manager.GetInstance(outerComponent) as IComponent; 252IComponent? nestedComp = ResolveNestedName(manager, name, out string? parentName); 462foreach (IComponent c in container.Components)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
289if (value is IComponent comp)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.cs (3)
133/// objects that are created that implement <see cref="IComponent"/> will be added to the container. 149/// objects that are created that implement <see cref="IComponent"/> will be added to the container. 168/// a new object will be created. If that object also implements <see cref="IComponent"/>, it will be added to the given
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (10)
14[ProvideProperty("Modifiers", typeof(IComponent))] 15[ProvideProperty("GenerateMember", typeof(IComponent))] 26if (o is not IComponent component) 32IComponent? baseComponent = GetBaseComponent(component); 49private IComponent? GetBaseComponent(IComponent component) 67public static bool GetGenerateMember(IComponent comp) 93public static MemberAttributes GetModifiers(IComponent comp) 120public static void SetGenerateMember(IComponent comp, bool generate) 166public static void SetModifiers(IComponent comp, MemberAttributes modifiers)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (7)
16[ProvideProperty("Modifiers", typeof(IComponent))] 27if (o is not IComponent component) 33IComponent? baseComponent = GetBaseComponent(component); 51private IComponent? GetBaseComponent(IComponent? component) 75public MemberAttributes GetModifiers(IComponent comp) 77IComponent? baseComponent = GetBaseComponent(comp);
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (15)
15[ProvideProperty("Language", typeof(IComponent))] 16[ProvideProperty("LoadLanguage", typeof(IComponent))] 17[ProvideProperty("Localizable", typeof(IComponent))] 22private IComponent? _lastRoot; 48private static void BroadcastGlobalChange(IComponent component) 55foreach (IComponent c in container.Components) 89public CultureInfo GetLanguage(IComponent o) 101public CultureInfo GetLoadLanguage(IComponent o) 117public bool GetLocalizable(IComponent? o) 126public void SetLanguage(IComponent o, CultureInfo? language) 178public void SetLocalizable(IComponent o, bool localizable) 201private bool ShouldSerializeLanguage(IComponent o) => _language != CultureInfo.InvariantCulture; 206private bool ShouldSerializeLocalizable(IComponent o) => _localizable; 211private void ResetLocalizable(IComponent o) => SetLocalizable(o, false); 216private void ResetLanguage(IComponent o) => SetLanguage(o, CultureInfo.InvariantCulture);
System\ComponentModel\Design\Serialization\CodeDomSerializationProvider.cs (2)
60if (typeof(IComponent).IsAssignableFrom(objectType)) 124if (typeof(IComponent).IsAssignableFrom(objectType))
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (2)
151if (value is not IComponent) 302if (value is not IComponent)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
1912if (GetReflectionTypeHelper(manager, value).IsSerializable && (value as IComponent)?.Site is null) 2170if (value is IComponent comp) 2501if (value is IComponent)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (3)
411if (o is IComponent && TypeDescriptor.GetAttributes(o).Contains(InheritanceAttribute.InheritedReadOnly)) 488bool genCode = o is not IComponent; 570bool genCode = o is not IComponent;
System\ComponentModel\Design\Serialization\ComponentCache.cs (5)
66if (_cache is not null && component is IComponent) 130if (ce.Component is not IComponent) 134IComponent? owningComp = rs.GetComponent(ce.Component); 163if (ce.Component is not IComponent) 167IComponent? owningComp = rs.GetComponent(ce.Component);
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (3)
56if (value is IComponent comp) 67if (typeof(IComponent).IsAssignableFrom(property.PropertyType) && 161if (value is IComponent { Site: null })
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (4)
259if (instance is null && addToContainer && typeof(IComponent).IsAssignableFrom(type) && (argArray is null || argArray.Length == 0 || (argArray.Length == 1 && argArray[0] == Container))) 361if (addToContainer && instance is IComponent component && Container is not null) 778&& (!(instance is IComponent) // And it's not an IComponent 834if (value is not IComponent component)
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (1)
262IComponent? comp = container.Components[name];
System\ComponentModel\Design\SiteNestedContainer.cs (5)
17internal SiteNestedContainer(IComponent owner, string? containerName, DesignerHost host) : base(owner) 44public override void Add(IComponent? component, string? name) 71protected override ISite CreateSite(IComponent component, string? name) 81public override void Remove(IComponent? component) 133internal NestedSite(IComponent component, DesignerHost host, string? name, SiteNestedContainer container) : base(component, host, name, container)
System\ComponentModel\Design\ToolStripContainerActionList.cs (1)
215selectionService?.SetSelectedComponents(new IComponent[] { newParent });
System\ComponentModel\Design\TypeDescriptorFilterService.cs (4)
24private static IDesigner? GetDesigner(IComponent component) 38bool ITypeDescriptorFilterService.FilterAttributes(IComponent component, IDictionary attributes) 57bool ITypeDescriptorFilterService.FilterEvents(IComponent component, IDictionary events) 76bool ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
System\ComponentModel\Design\UndoEngine.cs (5)
27private Dictionary<IComponent, List<ReferencingComponent>>? _refToRemovedComponent; 261if (obj is IComponent comp) 445foreach (IComponent comp in _host.Container.Components) 556public readonly IComponent component; 559public ReferencingComponent(IComponent component, MemberDescriptor member)
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (3)
26public AddRemoveUndoEvent(UndoEngine engine, IComponent component, bool add) 49internal IComponent OpenComponent { get; } 86IComponent? component = host.Container.Components[_componentName];
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (7)
21private List<IComponent>? _ignoreAddingList; // the list of objects that are currently being added. We ignore change events between adding and added. 22private List<IComponent>? _ignoreAddedList; // the list of objects that are added. We do not serialize before state for change events that happen in the same transaction 38if (sel is IComponent { Site: ISite site }) 248if (e.Component is IComponent { Site: not null }) 256IComponent? owningComp = rs.GetComponent(e.Component); 472List<IComponent> list = new(_lastSelection.Count); 475IComponent? comp = container.Components[name];
System\ComponentModel\Design\UndoEngine.UndoUnit.RenameUndoEvent.cs (1)
29IComponent? comp = engine._host.Container.Components[_after];
System\Drawing\Design\ToolboxComponentsCreatedEventArgs.cs (4)
14private readonly IComponent[]? _components; 19public ToolboxComponentsCreatedEventArgs(IComponent[]? components) 27public IComponent[]? Components => (IComponent[]?)_components?.Clone();
System\Drawing\Design\ToolboxItem.cs (11)
216public IComponent[]? CreateComponents() => CreateComponents(null); 222public IComponent[]? CreateComponents(IDesignerHost? host) 225IComponent[]? comps = CreateComponentsCore(host, new Hashtable()); 239public IComponent[]? CreateComponents(IDesignerHost? host, IDictionary? defaultValues) 242IComponent[]? comps = CreateComponentsCore(host, defaultValues); 255protected virtual IComponent[]? CreateComponentsCore(IDesignerHost? host) 257List<IComponent> comps = []; 265else if (typeof(IComponent).IsAssignableFrom(createType)) 267comps.Add((IComponent)TypeDescriptor.CreateInstance(provider: null, createType, argTypes: null, args: null)!); 278protected virtual IComponent[]? CreateComponentsCore(IDesignerHost? host, IDictionary? defaultValues) 280IComponent[]? components = CreateComponentsCore(host);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (1)
85IComponent root = host.RootComponent;
System\Windows\Forms\Design\Behavior\ComponentGlyph.cs (4)
17private readonly IComponent? _relatedComponent; 22public ComponentGlyph(IComponent? relatedComponent, Behavior? behavior) 28public ComponentGlyph(IComponent? relatedComponent) 37public IComponent? RelatedComponent => _relatedComponent;
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (2)
216List<IComponent> dragControls = []; 219foreach (IComponent comp in selComps)
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (3)
18private readonly IComponent? _component; 26IComponent? relatedComponent, 35public ControlBodyGlyph(Rectangle bounds, Cursor? cursor, IComponent? relatedComponent, Behavior? behavior)
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (4)
26internal DesignerActionBehavior(IServiceProvider serviceProvider, IComponent relatedComponent, DesignerActionListCollection actionLists, DesignerActionUI parentUI) 48internal IComponent RelatedComponent { get; } 58internal DesignerActionPanel CreateDesignerActionPanel(IComponent relatedComponent) 125List<IComponent> componentList = [RelatedComponent];
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (3)
131IComponent relatedComponent = ((DesignerActionBehavior)Behavior).RelatedComponent; 196IComponent? panelComponent = behavior.ParentUI.LastPanelComponent; 197IComponent relatedComponent = behavior.RelatedComponent;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (8)
91internal DragAssistanceManager(IServiceProvider serviceProvider, List<IComponent> dragComponents) 106internal DragAssistanceManager(IServiceProvider serviceProvider, List<IComponent> dragComponents, bool resizing) 123List<IComponent>? dragComponents, 142List<IComponent>? dragComponents, 472private bool AddChildCompSnaplines(IComponent comp, List<IComponent>? dragComponents, Rectangle clipBounds, Control? targetControl) 522private void Initialize(List<IComponent>? dragComponents, IDesignerHost host) 586foreach (IComponent comp in host.Container.Components)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.BehaviorDataObject.cs (4)
18public BehaviorDataObject(List<IComponent> dragComponents, Control source, DropSourceBehavior sourceBehavior) : base() 28public List<IComponent> DragComponents { get; } 30public IComponent? Target { get; set; } 36internal List<IComponent> GetSortedDragControls(out int primaryControlIndex) => _sourceBehavior.GetSortedDragControls(out primaryControlIndex);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (9)
23public IComponent dragComponent; // the dragComponent 32private List<IComponent> _dragObjects; // used to initialize the DragAssistanceManager 38private IComponent _lastDropTarget; // indicates the drop target on the last 'give feedback' event 78internal DropSourceBehavior(List<IComponent> dragComponents, Control source, Point initialMouseLocation) 336List<IComponent> originalControls = null; 405List<IComponent> temp = []; 931private void InitiateDrag(Point initialMouseLocation, ICollection<IComponent> dragComps) 1051internal List<IComponent> GetSortedDragControls(out int primaryControlIndex) 1054List<IComponent> dragControls = [];
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
206List<IComponent> components = [];
System\Windows\Forms\Design\Behavior\SelectionManager.cs (7)
22private readonly Dictionary<IComponent, ControlDesigner> _componentToDesigner; 114private void AddAllControlGlyphs(Control parent, List<IComponent> selComps, object? primarySelection) 247IComponent component = ce.Component!; 260List<IComponent> dragComps = [..e.DragComponents.Cast<IComponent>()]; 415List<IComponent> selComps = [.._selectionService.GetSelectedComponents().Cast<IComponent>()];
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (6)
33foreach (var component in data.DragComponents) 128private void ReParentControls(List<IComponent> controls, bool copy) 139List<IComponent>? temp = copy ? [] : null; 193var control = controls[0]; 222List<IComponent>? components = null; 228foreach (IComponent dragComponent in components)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
25internal ToolStripPanelSelectionGlyph(Rectangle bounds, Cursor cursor, IComponent relatedComponent, IServiceProvider? _provider, ToolStripPanelSelectionBehavior behavior) : base(bounds, cursor, relatedComponent, behavior)
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
24public override void Initialize(IComponent component)
System\Windows\Forms\Design\BindingSourceDesigner.cs (1)
18public override void Initialize(IComponent component)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (2)
58IComponent[] newComp = oleDragDropHandler.CreateTool(toolboxItem, root, 0, 0, 0, 0, false, false); 91selSvc.SetSelectedComponents(new IComponent[] { tsc });
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
63public override void Initialize(IComponent component)
System\Windows\Forms\Design\CommandSet.cs (84)
36protected IComponent? primarySelection; // the primary selection, or null 277if (obj is IComponent) 446private IComponent[] FilterSelection(IComponent[]? components, SelectionRules selectionRules) 458List<IComponent> list = new(components.Length); 459foreach (IComponent comp in components) 482IComponent[] comps = new IComponent[selectedComponents.Count]; 485foreach (IComponent comp in comps) 502List<IComponent> copySelection = []; 503foreach (IComponent comp in comps) 515private static void GetAssociatedComponents(IComponent component, IDesignerHost host, List<IComponent> list) 522foreach (IComponent childComp in designer.AssociatedComponents) 535private static Point GetLocation(IComponent comp) 590private static Size GetSize(IComponent comp) 599protected virtual void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty) 603IComponent currentSnapComponent = host.RootComponent; 631protected bool CanCheckout(IComponent comp) 715if (SelectionService?.PrimarySelection is IComponent pri) 734if (SelectionService?.PrimarySelection is IComponent comp && TryGetService(out IDesignerHost? host) && 807List<IComponent> selComps = [..SelectionService.GetSelectedComponents().Cast<IComponent>()]; 845GetSnapInformation(host, comp, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty); 915foreach (IComponent component in SelectionService.GetSelectedComponents()) 994foreach (IComponent comp in comps) 1159foreach (IComponent comp in selectedComponents) 1512if (obj == host.RootComponent || obj is not IComponent component) 1536List<IComponent> al = []; 1538foreach (IComponent comp in al) 1599IComponent? commonParent = null; 1609if (obj is not IComponent comp || comp.Site is null) 1636if (obj is not IComponent c || c.Site is null) 1657if (host.GetDesigner((IComponent)obj) is ITreeDesigner designer) 1747List<IComponent> al = []; 1749foreach (IComponent comp in al) 1755host.DestroyComponent((IComponent)obj); 1775IComponent component = designer.Component; 1903List<IComponent> selectComps = []; 1913IComponent baseComponent = host.RootComponent; 1914IComponent? selectedComponent = (IComponent?)SelectionService?.PrimarySelection; 1944if (obj is IComponent curComp) 2019List<IComponent> associatedComps = []; 2023foreach (IComponent childComp in parentCompDesigner!.AssociatedComponents) 2207IComponent[] selComps; 2215selComps = new IComponent[components.Count - 1]; 2216IComponent baseComp = host.RootComponent; 2219foreach (IComponent comp in components) 2252IComponent baseComponent = host.RootComponent; 2289IComponent[] selectedObjects = new IComponent[sel.Count]; 2297if (selPrimary is IComponent component) 2322foreach (IComponent obj in selectedObjects) 2390IComponent[] selectedObjects = new IComponent[sel.Count]; 2401IComponent baseComponent = host.RootComponent; 2414foreach (IComponent comp in selectedObjects) 2485IComponent baseComponent = host.RootComponent; 2531IComponent[] selectedObjects = new IComponent[sel.Count]; 2538IComponent baseComponent = host.RootComponent; 2560IComponent? lastComp = null; 2600IComponent component = selectedObjects[n]; 2625foreach (IComponent curComp in selectedObjects) 2665IComponent curComp = selectedObjects[n]; 2725IComponent curComp = selectedObjects[n]; 2913primarySelection = SelectionService.PrimarySelection as IComponent; 3007if (obj is IComponent { Site: { } objSite } && objSite.Container == host.Container) 3056if (obj is IComponent comp && (comp.Site is null || comp.Site.Container != host.Container)) 3162if (o is IComponent comp) 3179private static void SortSelection(IComponent[] selectedObjects, int nSortBy) 3181IComparer<IComponent> comp; 3343IComponent? baseComponent = host?.RootComponent; 3463private class ComponentLeftCompare : IComparer<IComponent> 3465public int Compare(IComponent? p, IComponent? q) 3481private class ComponentTopCompare : IComparer<IComponent> 3483public int Compare(IComponent? p, IComponent? q) 3496private class ControlZOrderCompare : IComparer<IComponent> 3498public int Compare(IComponent? p, IComponent? q)
System\Windows\Forms\Design\ComponentDocumentDesigner.cs (6)
45bool IOleDragClient.AddComponent(IComponent component, string name, bool firstAdd) 50bool IOleDragClient.IsDropOk(IComponent component) 70public override void Initialize(IComponent component) 98bool ITypeDescriptorFilterService.FilterAttributes(IComponent component, IDictionary attributes) 103bool ITypeDescriptorFilterService.FilterEvents(IComponent component, IDictionary events) 108bool ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
System\Windows\Forms\Design\ComponentTray.cs (40)
23[ProvideProperty("Location", typeof(IComponent))] 24[ProvideProperty("TrayLocation", typeof(IComponent))] 190if (e.ComponentChanged is IComponent component) 248if (selObj is IComponent component) 262if (primary is IComponent comp) 281if (selObj is IComponent selectedComponent && !(host.GetDesigner(selectedComponent) is ControlDesigner)) 483return (extendee is IComponent comp) && (TrayControl.FromComponent(comp) is not null); 486IComponent IOleDragClient.Component 496bool IOleDragClient.AddComponent(IComponent component, string name, bool firstAdd) 538bool IOleDragClient.IsDropOk(IComponent component) => true; 544if (component is IComponent comp) 599foreach (IComponent comp in components) 627void ISelectionUIHandler.OnSelectionDoubleClick(IComponent component) 641void ISelectionUIHandler.ShowContextMenu(IComponent component) => OnContextMenu(MousePosition); 680public virtual void AddComponent(IComponent component) 811protected virtual bool CanDisplayComponent(IComponent component) 918public IComponent GetNextComponent(IComponent component, bool forward) 956public Point GetLocation(IComponent receiver) 983public Point GetTrayLocation(IComponent receiver) 1015public bool IsTrayComponent(IComponent comp) 1332IComponent[] comps; 1374private IComponent[] GetComponentsInRect(Rectangle rect) 1376List<IComponent> list = []; 1503public virtual void RemoveComponent(IComponent component) 1529public void SetLocation(IComponent receiver, Point location) 1563public void SetTrayLocation(IComponent receiver, Point location) 1650internal static TrayControl GetTrayControlFromComponent(IComponent comp) 1838IComponent comp = c.Component; 1873IComponent comp = c.Component; 1898private readonly IComponent _component; // the component this control is representing 1918public TrayControl(ComponentTray tray, IComponent component) 1956public IComponent Component 2047public static TrayControl FromComponent(IComponent component) 2468public virtual void ViewDefaultEvent(IComponent component) 2576private IComponent Component 2644public GlyphCollection GetGlyphsForComponent(IComponent comp) 2836protected override IComponent GetComponent() 2852protected override Control GetControl(IComponent component) 2949if (comp is Control or not IComponent)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (3)
36foreach (IComponent component in container.Components) 234foreach (IComponent component in host.Container.Components) 267Debug.Assert(value is not IComponent { Site: not null }, "Unnamed, sited control in hierarchy");
System\Windows\Forms\Design\ControlCommandSet.cs (15)
367protected override void GetSnapInformation(IDesignerHost host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor snapProperty) 369IComponent currentSnapComponent = null; 519IComponent comp = selSvc.PrimarySelection as IComponent; 626List<IComponent> selComps = (List<IComponent>)selSvc.GetSelectedComponents(); 685GetSnapInformation(host, comp, out snapSize, out IComponent snapComponent, out PropertyDescriptor snapProperty); 753foreach (IComponent component in selSvc.GetSelectedComponents()) 868foreach (IComponent comp in components) 1019IComponent selComp = selectedComponents[i] as IComponent; 1475targetSelection = tray.GetNextComponent((IComponent)currentSelection, !backwards); 1478IComponent selection = targetSelection as IComponent;
System\Windows\Forms\Design\ControlDesigner.cs (6)
114List<IComponent>? sitedChildren = null; 177protected override IComponent? ParentComponent => 910public override void Initialize(IComponent component) 1148if (defaultValues is not null && defaultValues["Parent"] is IComponent parent 1409List<IComponent> dragControls = []; 1414foreach (IComponent comp in selComps)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionCodeDomSerializer.cs (2)
24List<IComponent> subset = []; 29if (val is IComponent { Site: not null and not INestedSite } comp)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
32public DataGridViewCellStyleBuilder(IServiceProvider serviceProvider, IComponent component)
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (2)
24IComponent? component = context?.Instance as IComponent;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
1175private static bool ValidateName(IContainer container, string siteName, IComponent component) 1306ISite? IComponent.Site 1312event EventHandler? IComponent.Disposed
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (1)
136public override void Initialize(IComponent component)
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSite.cs (2)
13public DataGridViewComponentPropertyGridSite(IServiceProvider? serviceProvider, IComponent component) 22public IComponent Component { get; }
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
115public override void Initialize(IComponent component)
System\Windows\Forms\Design\DesignBindingPicker.cs (7)
610foreach (IComponent comp in components) 642private void AddDataSource(TreeNodeCollection? nodes, IComponent dataSource, string? dataMember) 1372IComponent? component = (dataSource as IComponent); 1430foreach (IComponent comp in container.Components) 1462private static bool FindComponent(ComponentCollection components, IComponent? targetComponent) 1464foreach (IComponent component in components)
System\Windows\Forms\Design\DesignBindingValueUIHandler.LocalUIItem.cs (1)
26if (binding.DataSource is IComponent comp && comp.Site is { } site)
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (7)
15[ProvideProperty("Name", typeof(IComponent))] 18private IComponent? _baseComponent; 27protected IComponent? GetBaseComponent(object o) 31ISite? site = ((IComponent)o).Site; 52IComponent? baseComp = GetBaseComponent(o); 76public virtual string? GetName(IComponent comp) 91public static void SetName(IComponent comp, string newName)
System\Windows\Forms\Design\DesignerExtenders.NameInheritedExtenderProvider.cs (2)
31IComponent? baseComp = GetBaseComponent(o); 48public override string? GetName(IComponent comp)
System\Windows\Forms\Design\DesignerUtils.cs (12)
731public static List<IComponent>? CopyDragObjects(IReadOnlyList<IComponent> objects, IServiceProvider svcProvider) 754foreach (IComponent comp in copyObjects) 765List<IComponent> newObjects = new(objects.Count); 766foreach (IComponent comp in copyObjects) 790private static List<IComponent> GetCopySelection(IReadOnlyList<IComponent> objects, IDesignerHost host) 792List<IComponent> copySelection = []; 793foreach (IComponent comp in objects) 802internal static void GetAssociatedComponents(IComponent component, IDesignerHost? host, List<IComponent> list) 809foreach (IComponent childComp in designer.AssociatedComponents)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (2)
61protected override IComponent[] CreateComponentsCore(IDesignerHost? host) 130var comps = new IComponent[1];
System\Windows\Forms\Design\DocumentDesigner.cs (4)
269if (host is null || dragComps[i] is null || dragComps[i] is not IComponent comp) 666public override void Initialize(IComponent component) 847foreach (IComponent comp in container.Components) 884IComponent component = ce.Component;
System\Windows\Forms\Design\DocumentDesigner.DocumentInheritanceService.cs (1)
29protected override bool IgnoreInheritedMember(MemberInfo member, IComponent? component)
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (4)
71public override void Initialize(IComponent component) 629List<IComponent> tempList = DesignerUtils.CopyDragObjects(_dragControls, Component.Site); 666SelectionService.SetSelectedComponents(new IComponent[] { _primaryDragControl }, SelectionTypes.Primary | SelectionTypes.Replace); 681SelectionService.SetSelectedComponents(new IComponent[] { _dragControls[i] }, SelectionTypes.Add);
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
319public override void Initialize(IComponent component)
System\Windows\Forms\Design\IMouseHandler.cs (6)
15void OnMouseDoubleClick(IComponent component); 22void OnMouseDown(IComponent component, MouseButtons button, int x, int y); 27void OnMouseHover(IComponent component); 32void OnMouseMove(IComponent component, int x, int y); 37void OnMouseUp(IComponent component, MouseButtons button); 43void OnSetCursor(IComponent component);
System\Windows\Forms\Design\IOleDragClient.cs (3)
10IComponent Component { get; } 22bool AddComponent(IComponent component, string name, bool firstAdd); 27bool IsDropOk(IComponent component);
System\Windows\Forms\Design\ISelectionUIHandler.cs (2)
62void OnSelectionDoubleClick(IComponent component); 74void ShowContextMenu(IComponent component);
System\Windows\Forms\Design\ListBoxDesigner.cs (1)
99public override void Initialize(IComponent component)
System\Windows\Forms\Design\ListViewDesigner.cs (1)
98public override void Initialize(IComponent component)
System\Windows\Forms\Design\NewItemsContextMenuStrip.cs (2)
10private readonly IComponent _component; 17IComponent component,
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (7)
75protected override IComponent[]? CreateComponentsCore(IDesignerHost? host, IDictionary? defaultValues) 84List<IComponent> components = []; 87if (item is IComponent component) 100foreach (IComponent component in components) 109foreach (IComponent component in components) 127foreach (IComponent component in components) 147protected override IComponent[]? CreateComponentsCore(IDesignerHost? host) => CreateComponentsCore(host, null);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (10)
44IComponent[] components = new IComponent[_components.Length]; 47Debug.Assert(_components[i] is IComponent, $"Item {_components[i].GetType().Name} is not an IComponent"); 48components[i] = (IComponent)_components[i]; 102List<IComponent> copySelection = []; 103foreach (IComponent comp in selectedComponents) 117private static void GetAssociatedComponents(IComponent component, IDesignerHost host, List<IComponent> list) 124foreach (IComponent childComp in designer.AssociatedComponents) 227foreach (IComponent removeComp in _components)
System\Windows\Forms\Design\OleDragDropHandler.cs (16)
35private static Dictionary<IDataObject, IComponent>? s_currentDrags; 54private static IComponent? GetDragOwnerComponent(IDataObject data) 56return s_currentDrags is null || !s_currentDrags.TryGetValue(data, out IComponent? value) ? null : value; 60private static void AddCurrentDrag(IDataObject data, IComponent component) 83dropOk = dropOk && (dragObjects[i] is IComponent component) && Destination.IsDropOk(component); 108if (o is IComponent component && !Destination.IsDropOk(component)) 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) 145IComponent[]? comps = []; 260List<IComponent> selectComps = [..comps]; 279private static bool CurrentlyLocalizing(IComponent? rootComponent) 681IComponent? dragOwner = GetDragOwnerComponent(wrapper); 710components = Array.Empty<IComponent>(); 738List<IComponent> selectComps = []; 742if (components[i] is not IComponent comp) 1082protected virtual void OnInitializeComponent(IComponent comp, int x, int y, int width, int height, bool hasLocation, bool hasSize)
System\Windows\Forms\Design\ParentControlDesigner.cs (17)
97protected internal virtual bool CanAddComponent(IComponent component) => true; 293protected virtual Control GetParentForComponent(IComponent component) => Control; 598private void AddChildComponents(IComponent component, IContainer container, IDesignerHost host) 616childSite = ((IComponent)children[i]).Site; 820protected virtual IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 822IComponent[] comp = null; 893IComponent comp = component as IComponent; 935private static Size GetDefaultSize(IComponent component) 1195public override void Initialize(IComponent component) 1241if (defaultValues["Parent"] is not IComponent parent) 1412IComponent comp = dragComps[i] as IComponent; 1516if (host is null || dragComps[i] is not IComponent comp) 2294IComponent IOleDragClient.Component 2307bool IOleDragClient.AddComponent(IComponent component, string name, bool firstAdd) 2471bool IOleDragClient.IsDropOk(IComponent component)
System\Windows\Forms\Design\SelectionRules.cs (1)
28/// that the component implements <see cref="System.ComponentModel.IComponent"/> and
System\Windows\Forms\Design\SelectionUIHandler.cs (6)
46Debug.Assert(components[i] is IComponent, "Selection UI handler only deals with IComponents"); 47_dragControls[i] = GetControl((IComponent)components[i]); 57IComponent container = GetComponent(); 160protected abstract IComponent GetComponent(); 170protected abstract Control GetControl(IComponent component); 272Debug.Assert(controls[i] == GetControl((IComponent)components[i]), "Control->Component mapping is out of sync");
System\Windows\Forms\Design\SelectionUIService.cs (5)
267if (objects[0] is IComponent { Site: { } site }) 291if (objects[0] is IComponent { Site: { } site }) 503handler?.OnSelectionDoubleClick((IComponent)selComp); 1123IComponent? comp = components[0] as IComponent;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
81if (component is IComponent comp)
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
68protected override Control? GetParentForComponent(IComponent component) => _splitterPanel1; 160protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 225public override void Initialize(IComponent component)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
105public override void Initialize(IComponent component)
System\Windows\Forms\Design\StyleEditorForm.cs (3)
1067List<IComponent> componentList = []; 1068DesignerUtils.GetAssociatedComponents((IComponent)obj, host, componentList); 1069foreach (IComponent component in componentList)
System\Windows\Forms\Design\TabControlDesigner.cs (4)
122protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 209public override void Initialize(IComponent component) 345t = host.CreateTransaction(string.Format(SR.TabControlRemoveTab, ((IComponent)tp).Site.Name, Component.Site.Name)); 506List<IComponent> dragControls = data.GetSortedDragControls(out _);
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (2)
32if (manager.TryGetContext(out ExpressionContext? ctx) && ctx.Expression == targetExpression && ctx.Owner is IComponent comp) 39bool genCode = o is not IComponent;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (9)
28private List<IComponent> _dragComponents; // the components we are dragging 563List<IComponent> temp = [control]; 720protected internal override bool CanAddComponent(IComponent component) 1155public override void Initialize(IComponent component) 1200protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 1901List<IComponent> al = []; 1903foreach (IComponent comp in al) 2226List<IComponent> subset = []; 2232if (val is IComponent { Site: not null and not INestedSite } comp)
System\Windows\Forms\Design\TabOrder.cs (6)
550public virtual void OnMouseDoubleClick(IComponent component) 559public virtual void OnMouseDown(IComponent component, MouseButtons button, int x, int y) 585public virtual void OnMouseHover(IComponent component) 592public virtual void OnMouseMove(IComponent component, int x, int y) 634public virtual void OnMouseUp(IComponent component, MouseButtons button) 645public virtual void OnSetCursor(IComponent component)
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
75IComponent component = designerHost.CreateComponent(t);
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (3)
163protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 341protected override Control? GetParentForComponent(IComponent component) 359public override void Initialize(IComponent component)
System\Windows\Forms\Design\ToolStripDesigner.cs (14)
511IComponent component = null; 574IComponent component = _host.CreateComponent(t, NameFromText(text, t, Component.Site)); 652SelectionService.SetSelectedComponents(new IComponent[] { item }, SelectionTypes.Replace); 750comp ??= (IComponent)KeyboardHandlingService.SelectedDesignerControl; 1083IComponent targetSelection = (itemIndex == -1) ? ToolStrip : ToolStrip.Items[itemIndex]; 1098SelectionService.SetSelectedComponents(new IComponent[] { targetSelection }, SelectionTypes.Replace); 1229IComponent selectedItem = SelectionService.PrimarySelection as IComponent; 1234selectedItem = (IComponent)KeyboardHandlingService.SelectedDesignerControl; 1410public override void Initialize(IComponent component) 1861IReadOnlyList<IComponent> components; 1918SelectionService.SetSelectedComponents(new IComponent[] { primaryItem }, SelectionTypes.Primary | SelectionTypes.Replace); 2008SelectionService.SetSelectedComponents(new IComponent[] { nextItem }, SelectionTypes.Replace); 2038SelectionService.SetSelectedComponents(new IComponent[] { nextItem }, SelectionTypes.Replace);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (8)
87private static ToolStrip GetToolStripFromComponent(IComponent component) 191public static Type[] GetStandardItemTypes(IComponent component) 235public static Type[] GetCustomItemTypes(IComponent component, IServiceProvider serviceProvider) 246public static Type[] GetCustomItemTypes(IComponent component, ITypeDiscoveryService discoveryService) 319public static ToolStripItem[] GetStandardItemMenuItems(IComponent component, EventHandler onClick, bool convertTo) 343public static ToolStripItem[] GetCustomItemMenuItems(IComponent component, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider) 367public static NewItemsContextMenuStrip GetNewItemDropDown(IComponent component, ToolStripItem currentItem, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider, bool populateCustom) 404public static void GetCustomNewItemDropDown(NewItemsContextMenuStrip contextMenu, IComponent component, ToolStripItem currentItem, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (7)
168IComponent rootComponent = _host.RootComponent; 347public override void Initialize(IComponent component) 372_selectionService.SetSelectedComponents(new IComponent[] { _host.RootComponent }, SelectionTypes.Replace); 427IComponent comp = (IComponent)selectionService.PrimarySelection; 432comp = (IComponent)keyboardHandlingService.SelectedDesignerControl; 518selectionService.SetSelectedComponents(new IComponent[] { Component }, SelectionTypes.Replace);
System\Windows\Forms\Design\ToolStripDropDownItemDesigner.cs (1)
16public override void Initialize(IComponent component)
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
37public ToolStripEditorManager(IComponent comp)
System\Windows\Forms\Design\ToolStripInSituService.cs (3)
88if (selectionService.PrimarySelection is not IComponent comp) 90comp = (IComponent)ToolStripKeyBoardService.SelectedDesignerControl; 233foreach (IComponent comp in comps)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (11)
355selSvc.SetSelectedComponents(new IComponent[] { selectedItem }, SelectionTypes.Remove); 412selSvc.SetSelectedComponents(new IComponent[] { glyphItem }); 423selSvc.SetSelectedComponents(new IComponent[] { parent }, SelectionTypes.Replace); 439selSvc.SetSelectedComponents(new IComponent[] { glyphItem }, SelectionTypes.Auto); 452selSvc.SetSelectedComponents(new IComponent[] { glyphItem }, SelectionTypes.Remove); 461selSvc.SetSelectedComponents(new IComponent[] { glyphItem }); 589foreach (IComponent comp in selComps) 616selSvc.SetSelectedComponents(new IComponent[] { ownerItem }, SelectionTypes.Replace); 692IReadOnlyList<IComponent> components; 756selSvc.SetSelectedComponents(new IComponent[] { selectedItem }, SelectionTypes.Primary | SelectionTypes.Replace); 956selSvc?.SetSelectedComponents(new IComponent[] { item }, SelectionTypes.Auto);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (5)
390IComponent component = designerHost.CreateComponent(t); 441IComponent component = designerHost.CreateComponent(t); 480IComponent component = designerHost.CreateComponent(t); 520IComponent component = designerHost.CreateComponent(t); 603protected void ChangeProperty(IComponent target, string propertyName, object value)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (5)
153protected IComponent ImmediateParent 200protected override IComponent ParentComponent 252IComponent root = designerHost.RootComponent; 641public override void Initialize(IComponent component) 683IComponent component = Component;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (15)
457foreach (IComponent comp in comps) 600if (selSvc.PrimarySelection is not IComponent comp) 602comp = (IComponent)SelectedDesignerControl; 842if (selSvc.PrimarySelection is not IComponent pri) 917if (selSvc.PrimarySelection is not IComponent comp) 919comp = (IComponent)SelectedDesignerControl; 1798targetSelection = tray.GetNextComponent((IComponent)currentSelection, !backwards); 1801ControlDesigner controlDesigner = host.GetDesigner((IComponent)targetSelection) as ControlDesigner; 1809targetSelection = tray.GetNextComponent((IComponent)targetSelection, !backwards); 1810controlDesigner = targetSelection is not null ? host.GetDesigner((IComponent)targetSelection) as ControlDesigner : null; 1895targetSelection = tray.GetNextComponent((IComponent)currentSelection, !backwards); 1898ControlDesigner controlDesigner = host.GetDesigner((IComponent)targetSelection) as ControlDesigner; 1906targetSelection = tray.GetNextComponent((IComponent)targetSelection, !backwards); 1907controlDesigner = targetSelection is not null ? host.GetDesigner((IComponent)targetSelection) as ControlDesigner : null; 2000targetSelection = tray.GetNextComponent((IComponent)currentSelection, !backwards);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (7)
322protected override IComponent ParentComponent 1503public override void Initialize(IComponent component) 1771_selectionService?.SetSelectedComponents(new IComponent[] { newItem }, SelectionTypes.Replace); 1931IComponent targetSelection = (itemIndex == -1) ? ownerItem : ownerItem.DropDownItems[itemIndex]; 1941_selectionService.SetSelectedComponents(new IComponent[] { targetSelection }, SelectionTypes.Replace); 2719IReadOnlyList<IComponent> components; 2771_menuItemDesigner._selectionService.SetSelectedComponents(new IComponent[] { primaryItem }, SelectionTypes.Primary | SelectionTypes.Replace);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
165protected override IComponent[]? CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) 303protected override Control? GetParentForComponent(IComponent component) 319public override void Initialize(IComponent component)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
46private readonly IComponent _component; 116public ToolStripTemplateNode(IComponent component, string text) 1364private void SetUpMenuTemplateNode(string text, IComponent currentItem) 1397private void SetUpToolTemplateNode(IComponent component) 1466private void SetupNewEditNode(ToolStripTemplateNode owner, string text, IComponent currentItem) 1631private readonly IComponent _currentItem;
System\Windows\Forms\Design\TreeViewDesigner.cs (1)
58public override void Initialize(IComponent component)
System.Windows.Forms.Design.Tests (115)
ControlDesignerTests.cs (3)
40IComponent component = controlDesigner.Component; 336_designer._mockDesignerHost.Setup(h => h.GetDesigner(It.IsAny<IComponent>())).Returns(mockParentDesigner.Object); 357_designer._mockDesignerHost.Setup(h => h.GetDesigner(It.IsAny<IComponent>())).Returns(mockParentDesigner.Object);
System\ComponentModel\Design\CollectionEditorTests.cs (4)
261.Returns((IComponent)null); 433Mock<IComponent> mockComponent = new(MockBehavior.Strict); 454Mock<IComponent> mockComponent = new(MockBehavior.Strict); 494Mock<IComponent> mockComponent = new(MockBehavior.Strict);
System\ComponentModel\Design\CollectionFormTests.cs (1)
613.Returns((IComponent)null);
System\ComponentModel\Design\ComponentDesignerTests.cs (20)
98Mock<IComponent> mockComponent1 = new(MockBehavior.Strict); 99Mock<IComponent> mockComponent2 = new(MockBehavior.Strict); 108.Returns<IComponent>(null); 137Mock<IComponent> mockComponent1 = new(MockBehavior.Strict); 138Mock<IComponent> mockComponent2 = new(MockBehavior.Strict); 146.Returns<IComponent>(null); 541Mock<IComponent> mockComponent = new(MockBehavior.Strict); 633Mock<IComponent> mockComponent = new(MockBehavior.Strict); 796.Returns<IComponent>(null); 911.Returns<IComponent>(null); 1020.Returns<IComponent>(null); 1128.Returns<IComponent>(null); 1221.Returns<IComponent>(null); 1312.Returns<IComponent>(null); 1406.Returns<IComponent>(null); 1513.Returns<IComponent>(null); 1611.Returns<IComponent>(null); 1694.Returns<IComponent>(null); 2073.Returns((IComponent)null); 2934public new IComponent ParentComponent => base.ParentComponent;
System\ComponentModel\Design\DesignerActionListTests.cs (1)
19public void DesignerActionList_Ctor_IComponent(IComponent component)
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (1)
175public void DesignerActionMethodItem_RelatedComponent_Set_GetReturnsExpected(IComponent value)
System\ComponentModel\Design\DesignerActionPropertyItemTests.cs (1)
78public void DesignerActionPropertyItem_RelatedComponent_Set_GetReturnsExpected(IComponent value)
System\ComponentModel\Design\DesignerActionServiceTests.cs (5)
1029Assert.Throws<ArgumentNullException>("comp", () => service.Remove((IComponent)null)); 1049public new void GetComponentDesignerActions(IComponent component, DesignerActionListCollection actionLists) 1054public new void GetComponentServiceActions(IComponent component, DesignerActionListCollection actionLists) 1062public CustomDesignerActionList(IComponent component) : base(component) 1073public NullCustomDesignerActionList(IComponent component) : base(component)
System\ComponentModel\Design\DesignerHostTests.cs (21)
291Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 302Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 313Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>()); 346Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 357Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 368Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>()); 1651public void DesignerHost_Add_NoRootDesigner_ThrowsException(IComponent component) 2237.Setup(f => f.FilterComponents(new ComponentCollection(Array.Empty<IComponent>()))) 3162protected IComponent _initializedComponent; 3164public IComponent Component => _initializedComponent; 3178public abstract void Initialize(IComponent component); 3183public override void Initialize(IComponent component) => _initializedComponent = component; 3216public override void Initialize(IComponent component) 3228public override void Initialize(IComponent component) 3241public override void Initialize(IComponent component)
System\ComponentModel\Design\DesignSurfaceTests.cs (2)
1736public new IComponent CreateComponent(Type componentType) => base.CreateComponent(componentType); 1739public new IDesigner CreateDesigner(IComponent component, bool rootDesigner) => base.CreateDesigner(component, rootDesigner);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (12)
747Mock<IComponent> mockComponent = new(MockBehavior.Strict); 794Mock<IComponent> mockComponent = new(MockBehavior.Strict); 853Mock<IComponent> mockComponent = new(MockBehavior.Strict); 955Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1002Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1061Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1178Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1240Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1315Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1457Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1519Mock<IComponent> mockComponent = new(MockBehavior.Strict); 1594Mock<IComponent> mockComponent = new(MockBehavior.Strict);
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (4)
876Mock<IComponent> mockNoSiteComponent = new(MockBehavior.Strict); 890Mock<IComponent> mockSiteComponent = new(MockBehavior.Strict); 902Mock<IComponent> mockNestedSiteComponent = new(MockBehavior.Strict); 944Mock<IComponent> mockInstance = new(MockBehavior.Strict);
System\ComponentModel\Design\SiteNestedContainerTests.cs (24)
89Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 99Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 193Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 204Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 215Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>()); 250Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 261Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 272Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>()); 564public void SiteNestedContainer_Add_NoRootDesigner_ThrowsException(IComponent component) 1034protected IComponent _initializedComponent; 1036public IComponent Component => _initializedComponent; 1050public abstract void Initialize(IComponent component); 1055public override void Initialize(IComponent component) => _initializedComponent = component; 1083public override void Initialize(IComponent component) 1095public override void Initialize(IComponent component) 1108public override void Initialize(IComponent component)
System\Drawing\Design\ToolboxComponentsCreatedEventArgsTests.cs (3)
13yield return new object[] { Array.Empty<IComponent>() }; 14yield return new object[] { new IComponent[] { null } }; 19public void Ctor_IComponentArray(IComponent[] components)
System\Drawing\Design\ToolboxItemTests.cs (3)
1641public new IComponent[] CreateComponentsCore(IDesignerHost host) 1646public new IComponent[] CreateComponentsCore(IDesignerHost host, IDictionary defaultValues) 1743protected override IComponent[] CreateComponentsCore(IDesignerHost host)
System\Windows\Forms\Design\BindingSourceDesignerTests.cs (1)
34Mock<IComponent> componentMock = new();
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (2)
172public IComponent Component { get; } 177public MockSite(IComponent component, bool designMode)
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (2)
18Mock<IComponent> component = new(); 32Mock<IComponent> component = new();
System\Windows\Forms\Design\InheritanceUITests.cs (2)
52Mock<IComponent> mockComponent = new(); 75Mock<IComponent> mockComponent = new();
System\Windows\Forms\Design\ListControlUnboundActionListTests.cs (1)
15private readonly Mock<IComponent> _componentMock;
TestControlDesigner.cs (1)
29internal IComponent GetParentComponentProperty()
ToolStripMenuItemDesignerTest.cs (1)
144internal IComponent GetParentComponentProperty()
System.Windows.Forms.Primitives (1)
System\ComponentModel\PropertyDescriptorCollectionExtensions.cs (1)
11IComponent component,
System.Windows.Forms.Tests (10)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
210public IComponent Component { get; }
System\Windows\Forms\ControlTests.Methods.cs (1)
2522.Returns((IComponent)null);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (5)
238Mock<IComponent> mockComponent = new(MockBehavior.Strict); 246public void ComponentEditorPage_Component_Set_GetReturnsExpected(IComponent value) 746public void ComponentEditorPage_SetComponent_Invoke_SetsComponent(IComponent component) 883public new IComponent Component 983public new IComponent GetSelectedComponent() => base.GetSelectedComponent();
System\Windows\Forms\ErrorProviderTests.cs (1)
723public void ErrorProvider_Site_SetWithIDesignerHost_SetsContainerControl(IComponent rootComponent, ContainerControl expected)
System\Windows\Forms\LayoutEventArgsTests.cs (1)
20public void Ctor_IComponent_String(IComponent affectedComponent, string affectedProperty)
System\Windows\Forms\PropertyGridTests.cs (1)
4270public IComponent Component => null;