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