83 types derived from Component
System.CodeDom (1)
System\CodeDom\Compiler\CodeDomProvider.cs (1)
14public abstract class CodeDomProvider : Component
System.ComponentModel.EventBasedAsync (1)
System\ComponentModel\BackgroundWorker.cs (1)
11public class BackgroundWorker : Component
System.ComponentModel.TypeConverter (1)
System\Timers\Timer.cs (1)
15public partial class Timer : Component, ISupportInitialize
System.Data.Common (4)
System\Data\Common\DataAdapter.cs (1)
13public class DataAdapter : Component, IDataAdapter
System\Data\Common\DbCommand.cs (1)
11public abstract class DbCommand : Component, IDbCommand, IAsyncDisposable
System\Data\Common\DBCommandBuilder.cs (1)
13public abstract class DbCommandBuilder : Component
System\Data\Common\DbConnection.cs (1)
11public abstract class DbConnection : Component, IDbConnection, IAsyncDisposable
System.Diagnostics.EventLog (2)
artifacts\obj\System.Diagnostics.EventLog\Debug\net10.0\System.Diagnostics.EventLog.notsupported.cs (2)
25public partial class EventLog : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize 101public sealed partial class EventLogEntry : System.ComponentModel.Component, System.Runtime.Serialization.ISerializable
System.Diagnostics.PerformanceCounter (1)
artifacts\obj\System.Diagnostics.PerformanceCounter\Debug\net10.0\System.Diagnostics.PerformanceCounter.notsupported.cs (1)
94public sealed partial class PerformanceCounter : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize
System.Diagnostics.Process (3)
System\Diagnostics\Process.cs (1)
25public partial class Process : Component
System\Diagnostics\ProcessModule.cs (1)
14public class ProcessModule : Component
System\Diagnostics\ProcessThread.cs (1)
17public partial class ProcessThread : Component
System.DirectoryServices (2)
artifacts\obj\System.DirectoryServices\Debug\net10.0\System.DirectoryServices.notsupported.cs (2)
144public partial class DirectoryEntry : System.ComponentModel.Component 201public partial class DirectorySearcher : System.ComponentModel.Component
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
20public partial class FileSystemWatcher : Component, ISupportInitialize
System.IO.Ports (2)
System\IO\Ports\SerialPort.cs (1)
11public partial class SerialPort : Component
System\IO\Ports\SerialPort.Unix.cs (1)
12public partial class SerialPort : Component
System.Management (3)
artifacts\obj\System.Management\Debug\net10.0\System.Management.notsupported.cs (3)
136public partial class ManagementBaseObject : System.ComponentModel.Component, System.ICloneable, System.Runtime.Serialization.ISerializable 223public partial class ManagementEventWatcher : System.ComponentModel.Component 356public partial class ManagementObjectSearcher : System.ComponentModel.Component
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
13public partial class Ping : Component
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
19public class WebClient : Component
System.ServiceProcess.ServiceController (4)
artifacts\obj\System.ServiceProcess.ServiceController\Debug\net10.0\System.ServiceProcess.ServiceController.netcoreapp.notsupported.cs (2)
9public partial class ServiceBase : System.ComponentModel.Component 13public partial class ServiceController : System.ComponentModel.Component
artifacts\obj\System.ServiceProcess.ServiceController\Debug\net10.0\System.ServiceProcess.ServiceController.notsupported.cs (2)
21public partial class ServiceBase : System.ComponentModel.Component 61public partial class ServiceController : System.ComponentModel.Component
System.Windows.Extensions (1)
artifacts\obj\System.Windows.Extensions\Debug\net10.0\System.Windows.Extensions.notsupported.cs (1)
10public partial class SoundPlayer : System.ComponentModel.Component, System.Runtime.Serialization.ISerializable
System.Windows.Forms (18)
System\Windows\Forms\Control.cs (1)
40Component,
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
24public sealed partial class ImageList : Component, IHandle<HIMAGELIST>
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
17public partial class ColumnHeader : Component, ICloneable
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
15public partial class ToolStripPanelRow : Component, IArrangedElement
System\Windows\Forms\Controls\Unsupported\ContextMenu\Menu.cs (1)
22public abstract partial class Menu : Component
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (1)
25public abstract partial class DataGridColumnStyle : Component, IDataGridColumnStyleEditingNotificationService
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTableStyle.cs (1)
24public class DataGridTableStyle : Component, IDataGridEditingService
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarPanel.cs (1)
24public class StatusBarPanel : Component, ISupportInitialize
System\Windows\Forms\Controls\Unsupported\ToolBar\ToolBarButton.cs (1)
26public class ToolBarButton : Component
System\Windows\Forms\DataBinding\BindableComponent.cs (1)
12public abstract class BindableComponent : Component, IBindableComponent
System\Windows\Forms\DataBinding\BindingSource.cs (1)
17public partial class BindingSource : Component,
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
14public abstract class CommonDialog : Component
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
23public partial class ErrorProvider : Component, IExtenderProvider, ISupportInitialize
System\Windows\Forms\Help\HelpProvider.cs (1)
18public class HelpProvider : Component, IExtenderProvider
System\Windows\Forms\Layout\ArrangedElement.cs (1)
11internal abstract class ArrangedElement : Component, IArrangedElement
System\Windows\Forms\NotifyIcon.cs (1)
17public sealed partial class NotifyIcon : Component
System\Windows\Forms\Timer.cs (1)
17public class Timer : Component
System\Windows\Forms\ToolTip\ToolTip.cs (1)
17public partial class ToolTip : Component, IExtenderProvider, IHandle<HWND>
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\FolderNameEditor.FolderBrowser.cs (1)
10protected sealed class FolderBrowser : Component
System.Windows.Forms.Design.Tests (34)
System\ComponentModel\Design\ComponentDesignerTests.cs (5)
3000private class IPersistComponentSettingsComponent : Component, IPersistComponentSettings 3013private class CustomComponent : Component 3026private class StringDefaultPropertyComponent : Component 3032private class IntDefaultPropertyComponent : Component 3038private class DefaultEventComponent : Component
System\ComponentModel\Design\DesignerHostTests.cs (11)
3189private class DesignerComponent : Component 3201private class RootDesignerComponent : Component 3211private class RootExtenderProviderDesignerComponent : Component, IExtenderProvider 3224private class NonInitializingDesignerComponent : Component 3237private class ThrowingInitializingDesignerComponent : Component 3250private class CheckoutExceptionThrowingInitializingDesignerComponent : Component 3263private class ThrowingDesignerDisposeComponent : Component 3268private class ThrowingDisposeDesignerComponent : Component 3288private class ThrowingRootDesignerDisposeComponent : Component 3293private class ThrowingDisposeRootDesignerComponent : Component 3305private class CustomTypeDescriptionProviderComponent : Component
System\ComponentModel\Design\DesignSurfaceTests.cs (9)
1759private class DesignerComponent : Component 1776private class RootDesignerComponent : Component 1787private class NullSupportedTechnologiesRootDesignerComponent : Component 1798private class EmptySupportedTechnologiesRootDesignerComponent : Component 1814private class ComponentWithPublicConstructor : Component 1841private class ComponentWithPrivateDefaultConstructor : Component 1853private class ComponentWithIContainerConstructor : Component 1880private class ComponentWithNoMatchingConstructor : Component 1894private class ComponentWithPrivateIContainerConstructor : Component
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
1686private class DataClass : Component
System\ComponentModel\Design\SiteNestedContainerTests.cs (8)
1061private class DesignerComponent : Component 1073private class RootDesignerComponent : Component 1078private class RootExtenderProviderDesignerComponent : Component, IExtenderProvider 1091private class NonInitializingDesignerComponent : Component 1104private class ThrowingInitializingDesignerComponent : Component 1117private class CheckoutExceptionThrowingInitializingDesignerComponent : Component 1132private class DisposingDesignerComponent : Component 1137private class CustomTypeDescriptionProviderComponent : Component
System.Windows.Forms.Tests (2)
System\Windows\Forms\Design\EventsTabTests.cs (2)
141private class CustomDesignerEventService : Component, IDesignerEventService 178private class ClassWithDefaultEvent : Component
198 instantiations of Component
System.Windows.Forms.Design.Tests (181)
System\ComponentModel\Design\ArrayEditorTests.cs (2)
58yield return new object[] { new Component() }; 82using Component component = new();
System\ComponentModel\Design\CollectionEditorTests.cs (4)
60yield return new object[] { new Component() }; 84using Component component = new(); 186using Component result = new(); 284using Component result = new();
System\ComponentModel\Design\CollectionFormTests.cs (4)
453yield return new object[] { new Component() }; 478using Component component = new(); 557using Component result = new(); 657using Component result = new();
System\ComponentModel\Design\ComponentDesignerTests.cs (49)
51using Component component = new(); 120using Component component = new() 158using Component component = new() 176foreach (ICollection associatedComponents in new object[] { null, Array.Empty<object>(), new object[] { new Component() } }) 190using Component component = new() 238using Component component = new(); 268using Component component = new() 302yield return new object[] { new Component() }; 316using Component component = new() 339using Component component = new(); 373using Component component = new() 405using Component component = new() 432using Component component = new(); 461using Component component = new() 486.Returns(new Component()); 523using Component component = new() 603using Component component = new() 686using Component component = new() 833using Component rootComponent = new() 1058using Component rootComponent = new() 1166using Component rootComponent = new() 1259using Component rootComponent = new() 1350using Component rootComponent = new() 1444using Component rootComponent = new() 1551using Component rootComponent = new() 1649using Component rootComponent = new() 1728using Component rootComponent = new() 1786using Component component = new() 1845using Component component = new() 1921using Component rootComponent = new() 1974using Component component = new() 1989using Component component = new(); 2006using Component component = new(); 2022using Component component = new(); 2081.Returns(new Component()); 2116using Component component = new() 2131using Component component = new(); 2173using Component component = new() 2231using Component component = new() 2247using Component component = new(); 2366using Component component = new(); 2494using Component component = new(); 2523using Component component = new(); 2552using Component component = new(); 2581using Component component = new(); 2650yield return new object[] { new Component() }; 2673yield return new object[] { new Component { Site = mockSite.Object } }; 2690using Component component = new(); 2799using Component component = new();
System\ComponentModel\Design\DesignerActionListTests.cs (4)
16yield return new object[] { new Component() }; 32DesignerActionList list = new(new Component()) 46yield return new object[] { new Component(), null }; 56yield return new object[] { new Component { Site = mockSite.Object }, o };
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (1)
171yield return new object[] { new Component() };
System\ComponentModel\Design\DesignerActionPropertyItemTests.cs (1)
74yield return new object[] { new Component() };
System\ComponentModel\Design\DesignerActionServiceTests.cs (48)
58using Component component = new(); 79Component component = new(); 114using Component component = new(); 135using Component component = new(); 161Assert.Throws<ArgumentNullException>("designerActionListCollection", () => service.Add(new Component(), (DesignerActionListCollection)null)); 168Component component = new(); 197using Component component1 = new(); 198using Component component2 = new(); 233Assert.False(service.Contains(new Component())); 240service.Add(new Component(), new DesignerActionListCollection()); 241Assert.False(service.Contains(new Component())); 357using Component component = new(); 360Assert.Empty(service.GetComponentActions(new Component(), type)); 361Assert.Empty(service.GetComponentActions(new Component(), type)); 370Assert.Empty(service.GetComponentActions(new Component(), type)); 378using Component component = new(); 466Component component = new() 494Component component = new() 538Component component = new() 594Component component = new() 621Assert.Throws<ArgumentNullException>("actionLists", () => service.GetComponentDesignerActions(new Component(), null)); 628Component component = new(); 632service.GetComponentServiceActions(new Component(), actionListBuffer); 641service.GetComponentServiceActions(new Component(), actionListBuffer); 656Assert.Throws<ArgumentNullException>("actionLists", () => service.GetComponentServiceActions(new Component(), null)); 663using Component component = new(); 682using Component component1 = new(); 683using Component component2 = new(); 719service.Add(new Component(), new DesignerActionListCollection()); 720service.Remove(new Component()); 727service.Remove(new Component()); 734using Component component1 = new(); 735using Component component2 = new(); 736using Component component3 = new(); 737using Component component4 = new(); 846Component component = new(); 863using Component component1 = new(); 864using Component component2 = new(); 901using Component component1 = new(); 902using Component component2 = new(); 903using Component component3 = new(); 904using Component component4 = new(); 975using Component component = new(); 977service.Remove(new Component(), new CustomDesignerActionList(null)); 986service.Remove(new Component(), new CustomDesignerActionList(null)); 993using Component component1 = new(); 994using Component component2 = new(); 1040Assert.Throws<ArgumentNullException>("actionList", () => service.Remove(new Component(), null));
System\ComponentModel\Design\DesignerHostTests.cs (9)
279using Component component4 = new(); 334using Component component4 = new(); 1553using Component nestedComponent = new(); 1647yield return new object[] { new Component() }; 2236ComponentCollection collection = new(new Component[] { new() }); 2257Assert.Null(host.GetDesigner(new Component())); 2266Assert.Null(host.GetDesigner(new Component())); 2759host2.Container.Remove(new Component()); 2775host2.Container.Remove(new Component());
System\ComponentModel\Design\DesignSurfaceTests.cs (5)
982using Component component = new(); 1019Assert.Throws<ObjectDisposedException>(() => surface.CreateDesigner(new Component(), true)); 1020Assert.Throws<ObjectDisposedException>(() => surface.CreateDesigner(new Component(), false)); 1134using Component ownerComponent = new(); 1145using Component ownerComponent = new();
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (10)
226Assert.False(property.CanResetValue(new Component())); 227Assert.Equal(0, property.GetValue(new Component())); 228property.SetValue(new Component(), 1); 229Assert.Equal(1, property.GetValue(new Component())); 230property.ResetValue(new Component()); 231Assert.Equal(1, property.GetValue(new Component())); 232Assert.True(property.ShouldSerializeValue(new Component())); 719Component component = new(); 808Component component = new(); 876yield return new object[] { new Component(), null };
System\ComponentModel\Design\SiteNestedContainerTests.cs (31)
69using Component ownerComponent = new() 176using Component owningComponent = new(); 181using Component component4 = new(); 233using Component owningComponent = new(); 238using Component component4 = new(); 336using Component owningComponent = new(); 407using Component owningComponent = new(); 486using Component owningComponent = new(); 500using Component owningComponent = new(); 514using Component owningComponent = new(); 560yield return new object[] { new Component() }; 569using Component owningComponent = new(); 582using Component owningComponent = new(); 595using Component owningComponent = new(); 606using Component owningComponent = new(); 622using Component owningComponent = new(); 651using Component owningComponent = new(); 670using Component owningComponent = new(); 749using Component owningComponent = new(); 813using Component owningComponent = new(); 843using Component owningComponent = new(); 861using Component owningComponent = new(); 878using Component component1 = new(); 880using Component component2 = new(); 888container2.Remove(new Component()); 897using Component component1 = new(); 899using Component component2 = new(); 905container2.Remove(new Component()); 915using Component owningComponent = new(); 983using Component owningComponent = new(); 1006using Component owningComponent = new();
System\Drawing\Design\ToolboxItemTests.cs (7)
413yield return new object[] { new Component(), null }; 414yield return new object[] { new Component(), mockDesigner.Object }; 481using Component component = new(); 547using Component component = new(); 627.Returns(new Component()); 800using Component component = new(); 866using Component component = new();
System\Windows\Forms\Design\DataGridViewAddColumnDialogTests.cs (1)
109_container.Add(new Component(), name);
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSiteTests.cs (4)
14using Component component = new(); 24using Component component = new(); 35using Component component = new(); 49using Component component = new();
System\Windows\Forms\Design\OleDragDropHandlerTests.cs (1)
24_component = new Component();
System.Windows.Forms.Tests (17)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
168using Component component = new();
System\Windows\Forms\Design\ComponentEditorFormTests.cs (9)
18using Component component = new(); 173using Component component = new(); 194using Component component = new(); 210using Component component = new(); 238using Component component = new(); 249using Component component = new(); 287using Component component = new(); 315using Component component = new(); 342using Component component = new();
System\Windows\Forms\Design\EventsTabTests.cs (2)
74yield return new object[] { new Component { Site = mockSite.Object }, provider, null }; 120yield return new object[] { new Component(), e, null };
System\Windows\Forms\ErrorProviderTests.cs (2)
717yield return new object[] { new Component(), null }; 856yield return new object[] { new Component(), false };
System\Windows\Forms\Layout\LayoutEngineTests.cs (3)
37Assert.False(engine.Layout(new ScrollableControl(), new LayoutEventArgs(new Component(), "affectedProperty"))); 44Assert.Throws<NotSupportedException>(() => engine.Layout("container", new LayoutEventArgs(new Component(), "affectedProperty"))); 51Assert.Throws<ArgumentNullException>("container", () => engine.Layout(null, new LayoutEventArgs(new Component(), "affectedProperty")));
256 references to Component
DesignSurface (2)
MainForm.cs (2)
354Component component = surface.CreateComponent<Component>();
DesignSurfaceExt (2)
DesignSurfaceExt.cs (1)
135else if (hostType == typeof(Component))
NameCreationServiceImp.cs (1)
27if (cc[i] is Component comp && comp.GetType() == type)
netstandard (1)
netstandard.cs (1)
201[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
187[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))]
System.ComponentModel.Primitives (11)
System\ComponentModel\Component.cs (6)
58/// Gets or sets the site of the <see cref='System.ComponentModel.Component'/>. 69/// Disposes of the <see cref='System.ComponentModel.Component'/>. 97/// that contains the <see cref='System.ComponentModel.Component'/>. 105/// the <see cref='System.ComponentModel.Component'/>. 110/// Gets a value indicating whether the <see cref='System.ComponentModel.Component'/> 119/// <see cref='System.ComponentModel.Component'/>, if any.
System\ComponentModel\ComponentCollection.cs (2)
13/// Gets a specific <see cref='System.ComponentModel.Component'/> in the 36/// Gets a specific <see cref='System.ComponentModel.Component'/> in the
System\ComponentModel\EventHandlerList.cs (2)
12private readonly Component? _parent; 18internal EventHandlerList(Component parent)
System\ComponentModel\ISite.cs (1)
15/// Sites bind a <see cref='System.ComponentModel.Component'/> to a
System.ComponentModel.TypeConverter (2)
artifacts\obj\System.ComponentModel.TypeConverter\Debug\net10.0\System.ComponentModel.TypeConverter.Forwards.cs (1)
3[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))]
System\ComponentModel\MarshalByValueComponent.cs (1)
156/// Returns a <see cref='string'/> containing the name of the <see cref='System.ComponentModel.Component'/> , if any. This method should not be
System.Windows.Forms (4)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1914if (DataSource is Component oldDataSource) 1919if (value is Component newDataSource)
System\Windows\Forms\DataBinding\BindableComponent.cs (2)
20/// Gets or sets the <see cref="BindingContext"/> for this bindable <see cref="Component"/>. 71/// Gets the <see cref="ControlBindingsCollection"/> for this bindable <see cref="Component"/>.
System.Windows.Forms.Design (50)
System\ComponentModel\Design\SelectionService.cs (1)
469_statusCommandUI.SetStatusInformation(_selection[0] as Component);
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
32private static object? GetProperty(Component component, string propertyName) 41private void ChangeProperty(Component component, string propertyName, object value)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (4)
79List<Component> parentControls = []; 134foreach (Component parent in parentControls) 258private readonly Component? _comp; 265public SelectToolStripMenuItem(Component c, IServiceProvider provider)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
796foreach (Component comp in host.Container.Components)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (2)
583_statusCommandUITarget?.SetStatusInformation(selSvc is null ? _dragComponents[_primaryComponentIndex].dragComponent as Component : 584selSvc.PrimarySelection as Component);
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
39/// We also hook to <see cref="Component" /> Added/Removed/Changed notifications so we can keep in sync when the designers'
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
102Component? currentSelection = selectionService.PrimarySelection as Component;
System\Windows\Forms\Design\CommandSet.cs (5)
936_statusCommandUI?.SetStatusInformation(component as Component); 1990foreach (Component comp in associatedCompsOfFailedControl) 1992if (comp == obj as Component) 2017Component? parentComp = parentCompDesigner?.Component as Component;
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (2)
53if (!manager.TryGetSerializer(typeof(Component), out CodeDomSerializer? serializer)) 152if (!manager.TryGetSerializer(typeof(Component), out CodeDomSerializer? serializer))
System\Windows\Forms\Design\DocumentDesigner.cs (2)
986Component selComp = selSvc.PrimarySelection as Component;
System\Windows\Forms\Design\ImageCollectionCodeDomSerializer.cs (1)
27if (!manager.TryGetSerializer(typeof(Component), out CodeDomSerializer? serializer))
System\Windows\Forms\Design\SplitContainerDesigner.OrientationActionList.cs (2)
18private readonly Component? _ownerComponent; 24_ownerComponent = owner.Component as Component;
System\Windows\Forms\Design\StatusCommandUI.cs (2)
38public void SetStatusInformation(Component? selectedComponent, Point location) 67public void SetStatusInformation(Component? selectedComponent)
System\Windows\Forms\Design\StyleEditorForm.cs (1)
1074host.DestroyComponent(obj as Component);
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
21public TemplateNodeCustomMenuItemCollection(IServiceProvider provider, Component currentItem) : base()
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (3)
443if (Context.Instance is not Component component) 666if (listBox.Items[e.Index] is not Component item) 884Component selectedItem = null;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (4)
271private static Control? GetAssociatedControl(Component component) 310private bool CheckAssociatedControl(Component component, Glyph childGlyph, GlyphCollection glyphs) 467Component component = (Component)selectedComponent;
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1772Component selComp = SelectionService.PrimarySelection as Component;
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
163return GetKnownToolboxBitmap(typeof(Component)); 444foreach (Component comp in originalSelComps)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (1)
48public ToolStripItemCustomMenuItemCollection(IServiceProvider provider, Component currentItem) : base()
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
244internal List<Component> AddParentTree() 246List<Component> parentControls = []; 253Component startComp = ToolStripItem; 507protected virtual Component GetOwnerForActionList() => (ToolStripItem.Placement == ToolStripItemPlacement.Main) ? ToolStripItem.GetCurrentParent() : ToolStripItem.Owner;
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (3)
500if (SelectionService.PrimarySelection is not Component 1092if (SelectionService.PrimarySelection is not Component primarySelection) 1120if (SelectionService.PrimarySelection is not Component primarySelection)
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializer.cs (1)
28=> manager.GetSerializer<CodeDomSerializer>(typeof(Component))!;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1403protected override Component GetOwnerForActionList()
System.Windows.Forms.Design.Tests (173)
System\ComponentModel\Design\ArrayEditorTests.cs (1)
82using Component component = new();
System\ComponentModel\Design\CollectionEditorTests.cs (12)
84using Component component = new(); 159Assert.IsType<Component>(editor.CreateInstance(typeof(Component))); 186using Component result = new(); 195.Setup(h => h.CreateComponent(typeof(Component))) 217Assert.Same(result, editor.CreateInstance(typeof(Component))); 242.Setup(h => h.CreateComponent(typeof(Component))) 268Assert.IsType<Component>(editor.CreateInstance(typeof(Component))); 284using Component result = new(); 299.Setup(h => h.CreateComponent(typeof(Component))) 321Assert.Same(result, editor.CreateInstance(typeof(Component)));
System\ComponentModel\Design\CollectionFormTests.cs (12)
478using Component component = new(); 530Assert.IsType<Component>(form.CreateInstance(typeof(Component))); 557using Component result = new(); 566.Setup(h => h.CreateComponent(typeof(Component))) 589Assert.Same(result, form.CreateInstance(typeof(Component))); 614.Setup(h => h.CreateComponent(typeof(Component))) 641Assert.IsType<Component>(form.CreateInstance(typeof(Component))); 657using Component result = new(); 672.Setup(h => h.CreateComponent(typeof(Component))) 695Assert.Same(result, form.CreateInstance(typeof(Component)));
System\ComponentModel\Design\ComponentDesignerTests.cs (46)
51using Component component = new(); 120using Component component = new() 158using Component component = new() 190using Component component = new() 238using Component component = new(); 268using Component component = new() 307public void ComponentDesigner_ParentComponent_GetWithValidService_ReturnsExpected(Component rootComponent) 316using Component component = new() 339using Component component = new(); 373using Component component = new() 391public void ComponentDesigner_ITreeDesignerParent_GetWithValidService_ReturnsExpected(Component rootComponent) 405using Component component = new() 432using Component component = new(); 461using Component component = new() 523using Component component = new() 603using Component component = new() 686using Component component = new() 833using Component rootComponent = new() 1058using Component rootComponent = new() 1166using Component rootComponent = new() 1259using Component rootComponent = new() 1350using Component rootComponent = new() 1444using Component rootComponent = new() 1551using Component rootComponent = new() 1649using Component rootComponent = new() 1728using Component rootComponent = new() 1786using Component component = new() 1845using Component component = new() 1921using Component rootComponent = new() 1974using Component component = new() 1989using Component component = new(); 2006using Component component = new(); 2022using Component component = new(); 2116using Component component = new() 2131using Component component = new(); 2173using Component component = new() 2231using Component component = new() 2247using Component component = new(); 2366using Component component = new(); 2494using Component component = new(); 2523using Component component = new(); 2552using Component component = new(); 2581using Component component = new(); 2679public void ComponentDesigner_OnSetComponentDefaults_InvokeWithInvalidComponent_Nop(Component component) 2690using Component component = new(); 2799using Component component = new();
System\ComponentModel\Design\DesignerActionListTests.cs (1)
61public void DesignerActionList_GetService_Invoke_ReturnsExpected(Component component, object expected)
System\ComponentModel\Design\DesignerActionServiceTests.cs (31)
58using Component component = new(); 79Component component = new(); 114using Component component = new(); 135using Component component = new(); 168Component component = new(); 197using Component component1 = new(); 198using Component component2 = new(); 357using Component component = new(); 378using Component component = new(); 466Component component = new() 494Component component = new() 538Component component = new() 594Component component = new() 628Component component = new(); 663using Component component = new(); 682using Component component1 = new(); 683using Component component2 = new(); 734using Component component1 = new(); 735using Component component2 = new(); 736using Component component3 = new(); 737using Component component4 = new(); 846Component component = new(); 863using Component component1 = new(); 864using Component component2 = new(); 901using Component component1 = new(); 902using Component component2 = new(); 903using Component component3 = new(); 904using Component component4 = new(); 975using Component component = new(); 993using Component component1 = new(); 994using Component component2 = new();
System\ComponentModel\Design\DesignerHostTests.cs (8)
279using Component component4 = new(); 334using Component component4 = new(); 400public void DesignerHost_Add_IExtenderProviderServiceWithoutDefault_Success(Component component, int expectedCallCount) 471public void DesignerHost_Add_IExtenderProviderServiceWithDefault_DoesNotCallGetService(Component component) 1553using Component nestedComponent = new(); 2236ComponentCollection collection = new(new Component[] { new() }); 2591public void DesignerHost_Remove_IExtenderProviderServiceWithoutDefault_Success(Component component, int expectedAddCallCount, int expectedRemoveCallCount) 2661public void DesignerHost_Remove_IExtenderProviderServiceWithDefault_Success(Component component)
System\ComponentModel\Design\DesignSurfaceTests.cs (3)
982using Component component = new(); 1134using Component ownerComponent = new(); 1145using Component ownerComponent = new();
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (2)
719Component component = new(); 808Component component = new();
System\ComponentModel\Design\SiteNestedContainerTests.cs (32)
69using Component ownerComponent = new() 176using Component owningComponent = new(); 181using Component component4 = new(); 233using Component owningComponent = new(); 238using Component component4 = new(); 304public void SiteNestedContainer_Add_IExtenderProviderServiceWithoutDefault_Success(Component component, int expectedCallCount) 336using Component owningComponent = new(); 380public void SiteNestedContainer_Add_IExtenderProviderServiceWithDefault_DoesNotCallGetService(Component component, bool throws) 407using Component owningComponent = new(); 486using Component owningComponent = new(); 500using Component owningComponent = new(); 514using Component owningComponent = new(); 569using Component owningComponent = new(); 582using Component owningComponent = new(); 595using Component owningComponent = new(); 606using Component owningComponent = new(); 622using Component owningComponent = new(); 651using Component owningComponent = new(); 670using Component owningComponent = new(); 727public void SiteNestedContainer_Remove_IExtenderProviderServiceWithoutDefault_Success(Component component, int expectedAddCallCount, int expectedRemoveCallCount) 749using Component owningComponent = new(); 792public void SiteNestedContainer_Remove_IExtenderProviderServiceWithDefault_Success(Component component) 813using Component owningComponent = new(); 843using Component owningComponent = new(); 861using Component owningComponent = new(); 878using Component component1 = new(); 880using Component component2 = new(); 897using Component component1 = new(); 899using Component component2 = new(); 915using Component owningComponent = new(); 983using Component owningComponent = new(); 1006using Component owningComponent = new();
System\Drawing\Design\ToolboxItemTests.cs (15)
370AssemblyName = typeof(Component).Assembly.GetName(true), 384Assert.IsType<Component>(Assert.Single(e.Components)); 391Assert.IsType<Component>(Assert.Single(item.CreateComponents())); 395Assert.IsType<Component>(Assert.Single(item.CreateComponents(null))); 403Assert.IsType<Component>(Assert.Single(item.CreateComponents(null))); 422public void ToolboxItem_CreateComponents_InvokeWithHostWithNonIComponentInitializerDesigner_ReturnsExpected(Component component, IDesigner designer) 481using Component component = new(); 547using Component component = new(); 705AssemblyName = typeof(Component).Assembly.GetName(true), 719Assert.IsType<Component>(Assert.Single(e.Components)); 726Assert.IsType<Component>(Assert.Single(item.CreateComponentsCore(null))); 734Assert.IsType<Component>(Assert.Single(item.CreateComponentsCore(null))); 741public void ToolboxItem_CreateComponentsCore_InvokeWithHostWithNonIComponentInitializerDesigner_ReturnsExpected(Component component, IDesigner designer) 800using Component component = new(); 866using Component component = new();
System\Windows\Forms\Design\ControlCodeDomSerializerTests.cs (1)
31_managerMock.Setup(m => m.GetSerializer(typeof(Component), typeof(CodeDomSerializer))).Returns(_serializerMock.Object);
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSiteTests.cs (4)
14using Component component = new(); 24using Component component = new(); 35using Component component = new(); 49using Component component = new();
System\Windows\Forms\Design\ImageCollectionCodeDomSerializerTests.cs (3)
49.Setup(m => m.GetSerializer(typeof(Component), typeof(CodeDomSerializer))) 71.Setup(m => m.GetSerializer(typeof(Component), typeof(CodeDomSerializer))) 94.Setup(m => m.GetSerializer(typeof(Component), typeof(CodeDomSerializer)))
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializerTests.cs (1)
21_mockManager.Setup(m => m.GetSerializer(typeof(Component), typeof(CodeDomSerializer)))
ToolStripMenuItemDesignerTest.cs (1)
156internal Component GetOwnerForActionListMethod()
System.Windows.Forms.Tests (10)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
168using Component component = new();
System\Windows\Forms\Design\ComponentEditorFormTests.cs (9)
18using Component component = new(); 173using Component component = new(); 194using Component component = new(); 210using Component component = new(); 238using Component component = new(); 249using Component component = new(); 287using Component component = new(); 315using Component component = new(); 342using Component component = new();