114 types derived from Control
ComDisabled.Tests (2)
Control.ActiveXImplTests.cs (2)
36private class MyControl : Control 41private class BinaryFormatterPropertiesControl : Control
PresentationUI (1)
MS\Internal\Documents\DialogDivider.cs (1)
15internal class DialogDivider : System.Windows.Forms.Control
System.Windows.Forms (33)
System\Windows\Forms\ActiveX\AxHost.cs (1)
27public abstract unsafe partial class AxHost : Control, ISupportInitialize, ICustomTypeDescriptor
System\Windows\Forms\Application.MarshallingControl.cs (1)
14private sealed class ContextMarshallingControl : Control
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
18public abstract partial class ButtonBase : Control, ICommandBindingTargetProvider
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
17public partial class DataGridView : Control, ISupportInitialize
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
23public partial class DateTimePicker : Control
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
19public partial class GroupBox : Control
System\Windows\Forms\Controls\Labels\Label.cs (1)
27public partial class Label : Control, IAutomationLiveRegion
System\Windows\Forms\Controls\ListControl\ListControl.cs (1)
12public abstract class ListControl : Control
System\Windows\Forms\Controls\ListView\ListView.cs (1)
31public partial class ListView : Control
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
60public partial class MonthCalendar : Control
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
22public partial class PictureBox : Control, ISupportInitialize
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
17public partial class ProgressBar : Control
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
10internal abstract class SnappableControl : Control
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
6internal class GridToolTip : Control
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
19Control,
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
20public partial class Splitter : Control
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
22public partial class TabControl : Control
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
24public abstract partial class TextBoxBase : Control
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
613private class RightToLeftLayoutGrip : Control
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
24public partial class TrackBar : Control, ISupportInitialize
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
27public partial class TreeView : Control
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (1)
29public partial class DataGrid : Control, ISupportInitialize, IDataGridEditingService
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBar.cs (1)
26public partial class StatusBar : Control
System\Windows\Forms\Controls\Unsupported\ToolBar\ToolBar.cs (1)
27public partial class ToolBar : Control
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
19internal partial class UpDownButtons : Control
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
32public unsafe partial class WebBrowserBase : Control
System\Windows\Forms\MDI\MDIClient.cs (1)
21public sealed partial class MdiClient : Control
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
18public partial class PrintPreviewControl : Control
System\Windows\Forms\Printing\PrintPreviewControl.HorizontalScrollBar.cs (1)
6public partial class PrintPreviewControl : Control
System\Windows\Forms\Printing\PrintPreviewControl.VerticalScrollBar.cs (1)
6public partial class PrintPreviewControl : Control
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
14public partial class ScrollableControl : Control, IArrangedElement
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
16public abstract partial class ScrollBar : Control
System\Windows\Forms\SendKeys\SendKeys.SKWindow.cs (1)
11private class SKWindow : Control
System.Windows.Forms.Design (15)
System\ComponentModel\Design\DateTimeEditor.DateTimeUI.cs (1)
14private class DateTimeUI : Control
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
13private partial class ColorPalette : Control
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
15private sealed partial class ColorUI : Control
System\Drawing\Design\SelectionPanelBase.cs (1)
9internal abstract partial class SelectionPanelBase : Control
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (4)
13private class AnchorUI : Control 180private class ContainerPlaceholder : Control 196private class ControlPlaceholder : Control 212private class SpringControl : Control
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (1)
14private partial class AdornerWindow : Control
System\Windows\Forms\Design\ComponentTray.cs (1)
1880internal class TrayControl : Control
System\Windows\Forms\Design\DesignerFrame.cs (1)
25internal class DesignerFrame : Control, IOverlayService, ISplitWindowService, IContainsThemedScrollbarWindows
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
291private class ContainerPlaceholder : Control
System\Windows\Forms\Design\SelectionUIService.cs (1)
23internal sealed partial class SelectionUIService : Control, ISelectionUIService
System\Windows\Forms\Design\TabOrder.cs (1)
18internal class TabOrder : Control, IMouseHandler, IMenuStatusHandler
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
158private class ToolStripAdornerWindow : Control
System.Windows.Forms.Design.Tests (4)
System\Windows\Forms\Design\ControlCodeDomSerializerTests.cs (1)
61public class TestControl : Control
System\Windows\Forms\Design\ControlDesigner.TransparentBehaviorTests.cs (1)
37private class TestControl : Control { }
System\Windows\Forms\Design\ControlDesignerAccessibleObjectTests.cs (1)
12private class TestControl : Control
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
136public class TestControl : Control
System.Windows.Forms.Tests (56)
ExceptionHandlingTests.cs (1)
24public class ThrowControl : Control
KeyboardTooltipStateMachineTests.cs (1)
112private class TestControl : Control
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
1755private class AutomationLiveRegionControl : Control, IAutomationLiveRegion 1760private class SubControl : Control
System\Windows\Forms\ButtonTests.cs (1)
390private class CustomLayoutEngineControl : Control
System\Windows\Forms\ContainerControlTests.cs (1)
1396private class SubControl : Control
System\Windows\Forms\Control.ActiveXImplTests.cs (2)
75private class MyControl : Control 80private class BinaryFormatterPropertiesControl : Control
System\Windows\Forms\ControlBindingsCollectionTests.cs (1)
420private class SubControl : Control
System\Windows\Forms\ControlTests.ControlCollection.cs (2)
3584private class CustomLayoutEngineControl : Control 3603private class SubControl : Control
System\Windows\Forms\ControlTests.cs (2)
1204private class OnCreateControlCounter : Control 1215private class SubControl : Control
System\Windows\Forms\ControlTests.Methods.cs (7)
2964private class CustomLayoutEngineControl : Control 5478private class CustomIsInputControl : Control 5489private class CustomProcessControl : Control 5958private class CustomProcessKeyEventArgsControl : Control 10143private class BorderedControl : Control 14158private class CustomContainerControl : Control, IContainerControl 14392private class NoCreateControl : Control
System\Windows\Forms\ControlTests.Properties.cs (13)
98private class CustomCreateAccessibilityInstanceControl : Control 3667private class CustomCreateControlsInstanceControl : Control 3801private class CustomDefaultCursorControl : Control 6649private class RightToLeftControl : Control 7689private class NonZeroDefaultMarginControl : Control 7694private class ZeroDefaultMarginControl : Control 7898private class NonZeroWidthDefaultMaximumSizeControl : Control 7903private class NonZeroHeightDefaultMaximumSizeControl : Control 7908private class NonZeroWidthNonZeroHeightDefaultMaximumSizeControl : Control 8507private class NonZeroWidthDefaultMinimumSizeControl : Control 8512private class NonZeroHeightDefaultMinimumSizeControl : Control 8517private class NonZeroWidthNonZeroHeightDefaultMinimumSizeControl : Control 9400private class NonZeroDefaultPaddingControl : Control
System\Windows\Forms\ControlTests_InvokeAsync.cs (1)
11private sealed class TestControl : Control
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
1824private class CustomProcessKeyEventArgsControl : Control 2077private class CustomProcessControl : Control
System\Windows\Forms\ErrorProviderTests.cs (1)
1390public class SubControl : Control
System\Windows\Forms\FontDialogTests.cs (1)
693private class CustomClass : Control
System\Windows\Forms\GroupBoxTests.cs (1)
360private class CustomLayoutEngineControl : Control
System\Windows\Forms\HelpProviderTests.cs (1)
573private class SubControl : Control
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
305private class ControlWithNullName : Control
System\Windows\Forms\MenuStripTests.cs (1)
825private class CustomProcessControl : Control
System\Windows\Forms\PanelTests.cs (1)
348private class CustomLayoutEngineControl : Control
System\Windows\Forms\PropertyManagerTests.cs (1)
419private class SubControl : Control, INotifyPropertyChanged
System\Windows\Forms\ScrollableControlTests.cs (2)
2550private class LargeControl : Control 2557private class SmallControl : Control
System\Windows\Forms\TableLayoutPanelTests.cs (1)
2141private class ControlWithNullName : Control
System\Windows\Forms\ToolStripControlHostTests.cs (2)
4372private class CustomProcessControl : Control 4560private class SubControl : Control
System\Windows\Forms\ToolStripTests.cs (1)
7446private class CustomProcessControl : Control
System\Windows\Forms\ToolTipTests.cs (1)
926private class SubControl : Control
System\Windows\Forms\UnsupportedTypesTests.cs (1)
198internal class ControlWithContextMenu : Control
System\Windows\Forms\UserControlTests.cs (2)
463private class CustomLayoutEngineControl : Control 1780private class SubControl : Control
TextBoxBaseTests.cs (1)
5927private class CustomProcessControl : Control
WebBrowserBaseTests.cs (1)
861private class CustomProcessControl : Control
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
316public class SampleControl : Control
WindowsFormsIntegration (2)
System\Windows\Integration\ElementHost.cs (1)
42public class ElementHost : Control
System\Windows\Integration\WindowsFormsHost.cs (1)
786private class FocusTargetControl : Control
2055 instantiations of Control
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
41control = new Control();
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
41control = new Control();
Microsoft.VisualBasic.Forms.Tests (4)
System\Windows\Forms\CompilerServices.TestVbHost.vb (1)
16Private ReadOnly _testControl As New Control()
System\Windows\Forms\ControlInvokeTests.vb (3)
22Using _control As New Control 53Using _control As New Control 83Using _control As New Control
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionUI.cs (1)
105_marshalingControl = new Control();
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
183private Control DropSource => _dropSource ??= new Control();
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
41_dropSource ??= new Control();
System.Windows.Forms.Design.Tests (76)
ControlDesignerTests.cs (4)
199using Control childControl = new(); 216using Control childControl = new(); 338{ "Parent", new Control() } 358{ nameof(mockParentDesigner.Object.Component), new Control() }
SplitContainerDesignerTests.cs (1)
45using Control control = new();
System\ComponentModel\Design\ByteViewerTests.cs (14)
312yield return new object[] { new LayoutEventArgs(new Control(), null) }; 313yield return new object[] { new LayoutEventArgs(new Control(), string.Empty) }; 314yield return new object[] { new LayoutEventArgs(new Control(), "ChildIndex") }; 315yield return new object[] { new LayoutEventArgs(new Control(), "Visible") }; 316yield return new object[] { new LayoutEventArgs(new Control(), "Items") }; 317yield return new object[] { new LayoutEventArgs(new Control(), "Rows") }; 318yield return new object[] { new LayoutEventArgs(new Control(), "Columns") }; 319yield return new object[] { new LayoutEventArgs(new Control(), "RowStyles") }; 320yield return new object[] { new LayoutEventArgs(new Control(), "ColumnStyles") }; 321yield return new object[] { new LayoutEventArgs(new Control(), "TableIndex") }; 322yield return new object[] { new LayoutEventArgs(new Control(), "GrowStyle") }; 323yield return new object[] { new LayoutEventArgs(new Control(), "CellBorderStyle") }; 324yield return new object[] { new LayoutEventArgs(new Control(), "LayoutSettings") }; 325yield return new object[] { new LayoutEventArgs(new Control(), "NoSuchProperty") };
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (1)
247using Control control = new();
System\Windows\Forms\Design\ControlCommandSetTests.cs (4)
30_baseControl = new(); 75using Control component = new(); 94using Control childComponent = new(); 95using Control parentComponent = new();
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (13)
16_control = new(); 60using Control control = new(); 68using Control control1 = new(); 69using Control control2 = new(); 78using Control control = new(); 105using Control control = new(); 113using Control control = new(); 114using Control anotherControl = new(); 124using Control control = new(); 133using Control control = new(); 142using Control control = new(); 150using Control control = new(); 159using Control control = new();
System\Windows\Forms\Design\ControlDesignerAccessibleObjectTests.cs (2)
90Control control = new() { Name = "TestControl" }; 101Control control = new();
System\Windows\Forms\Design\DesignerFrameTests.cs (2)
58Control control = new(); 119Control control = new();
System\Windows\Forms\Design\DesignerToolStripControlHostTests.cs (1)
11using Control control = new();
System\Windows\Forms\Design\EventHandlerServiceTests.cs (1)
16using Control focusWnd = new();
System\Windows\Forms\Design\FlowLayoutPanelDesignerTests.cs (5)
43using Control childControl = new() { Site = new Mock<ISite>().Object }; 55using Control childControl = new() { Site = new Mock<ISite>().Object }; 131using Control control = new() 191using Control control1 = new(); 192using Control control2 = new();
System\Windows\Forms\Design\InheritanceUITests.cs (3)
25_control = new Control { Parent = _form }; 26_childControl = new Control { Parent = _control }; 27_sitedChildControl = new Control { Parent = _control, Site = new Mock<ISite>().Object };
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (4)
16using Control control = new(); 30using Control control = new(); 48using Control control = new(); 62using Control control = new();
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
20_control = new();
System\Windows\Forms\Design\SelectionUIHandlerTests.cs (1)
23_control = new();
System\Windows\Forms\Design\StatusCommandUITests.cs (3)
45using Control control = new() { Bounds = new(10, 20, 30, 40) }; 81using Control control = new() { Bounds = new(10, 20, 30, 40) }; 106using Control control = new() { Bounds = new(10, 20, 30, 40) };
System\Windows\Forms\Design\TabOrderTests.cs (1)
163accessor._ctlHover = new Control();
System\Windows\Forms\Design\ToolStripAdornerWindowServiceTests.cs (3)
32_control = new(); 116Control parentControl = new() { Left = 10, Top = 20 }; 117Control control = new() { Parent = parentControl, Left = 30, Top = 40 };
System\Windows\Forms\Design\ToolStripContainerActionListTests.cs (8)
44using Control rootComponent = new(); 53using Control rootComponent = new(); 54using Control childControl1 = new(); 55using Control childControl2 = new(); 75using Control rootComponent = new(); 76using Control inheritedControl = new(); 192using Control rootComponent = new(); 193using Control childControl = new();
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (1)
66using Control control = new();
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (1)
45_editorControl = new();
SystemDesignMetadataReader.cs (1)
19IDesigner designer = designSurface.CreateDesigner(new Control(), true);
TestControlDesigner.Mocks.cs (1)
12internal readonly Control _control = new();
System.Windows.Forms.Tests (1969)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (8)
546using Control first = new(); 547using Control second = new(); 574using Control control = new(); 633using Control control = new(); 699using Control control = new(); 718using Control control = new(); 737using Control control = new(); 2163using Control control = new();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (54)
63using Control ownerControl = new(); 87using Control ownerControl = new(); 128using Control ownerControl = new(); 147using Control ownerControl = new(); 166using Control ownerControl = new(); 181using Control ownerControl = new(); 200using Control ownerControl = new() 212using Control ownerControl = new() 231using Control ownerControl = new() 258using Control control = new(); 266using Control ownerControl = new(); 285using Control ownerControl = new(); 355using Control parent = new(); 436using Control previousControl = new() 461using Control previousControl = new() 486using Control previousControl = new() 555using Control parent = new(); 676using Control previousControl = new() 702using Control previousControl = new() 728using Control previousControl = new() 747using Control ownerControl = new(); 836using Control ownerControl = new() 848using Control ownerControl = new(); 866using Control ownerControl = new(); 882using Control ownerControl = new(); 890using Control ownerControl = new(); 898using Control child = new(); 899using Control ownerControl = new(); 911using Control ownerControl = new(); 919using Control ownerControl = new(); 948using Control ownerControl = new(); 993using Control ownerControl = new(); 1004using Control ownerControl = new(); 1013using Control ownerControl = new(); 1022using Control ownerControl = new(); 1033using Control ownerControl = new(); 1044using Control ownerControl = new(); 1060using Control ownerControl = new(); 1070using Control ownerControl = new(); 1089using Control ownerControl = new(); 1107using Control ownerControl = new(); 1115using Control ownerControl = new(); 1130using Control ownerControl = new(); 1149using Control ownerControl = new(); 1166using Control ownerControl = new(); 1177using Control ownerControl = new(); 1186using Control ownerControl = new(); 1197using Control child = new(); 1198using Control ownerControl = new(); 1217using Control ownerControl = new(); 1226using Control control = new(); 1415using Control control = new(); 1619using Control ownerControl = new() { Name = "test name" }; 1637using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (11)
33using Control control = new(); 45using Control parentControl = new(); 46using Control control = new(); 65using Control control = new(); 80using Control control = new(); 119using Control control = new(); 146using Control control = new(); 186using Control control = new(); 213using Control control = new(); 228using Control control = new(); 261using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObjectTests.cs (6)
92using Control control = new(); 106using Control control = new(); 123using Control control = new(); 145using Control control = new(); 163using Control control = new(); 182using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (2)
29_control1 = new Control(); 33_control2 = new Control();
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (5)
22using Control control = new(); 34using Control control = new(); 46using Control control = new(); 59using Control control = new(); 72using Control control = new();
System\Windows\Forms\Application.ParkingWindowTests.cs (5)
77using Control control = new(); 112using Control control = new(); 145using Control control = new(); 178using Control control = new(); 189using Control systemControl = new();
System\Windows\Forms\ApplicationTests.cs (1)
249using Control control = new();
System\Windows\Forms\AxHostTests.cs (11)
351Control parent = new() 390Control parent = new(); 468Control child1 = new(); 469Control child2 = new(); 492Control child1 = new() 496Control child2 = new() 1306using Control parent = new(); 1323using Control parent = new(); 1352using Control parent = new(); 1823using Control parent = new(); 2120using Control parent = new();
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
271{ new Control(), new string[] { "DataContext: Object", "Tag: Object" } },
System\Windows\Forms\BindingContextTests.cs (1)
995Control control = new();
System\Windows\Forms\ButtonBaseTests.cs (22)
1139using Control parent = new(); 1310using Control parent = new(); 1550using Control parent = new(); 1717using Control parent = new(); 1887using Control parent = new(); 1991using Control parent = new(); 2803yield return new object[] { enabled, visible, image, new Control() }; 2867using Control oldParent = new(); 2891using Control parent = new(); 2992using Control parent = new(); 3077using Control parent = new(); 3172using Control parent = new(); 3317using Control parent = new(); 3433using Control parent = new(); 3551using Control parent = new(); 3660using Control parent = new(); 3761using Control parent = new(); 3858using Control parent = new(); 3971using Control parent = new(); 4087using Control parent = new(); 7190using Control parent = new(); 7292using Control parent = new();
System\Windows\Forms\ButtonTests.cs (10)
299using Control parent = new(); 447using Control parent = new(); 793using Control parent = new(); 888using Control parent = new(); 1937using Control parent = new() 2019using Control parent = new() 2924using Control parent = new(); 3026using Control parent = new(); 3121using Control parent = new() 3199using Control parent = new()
System\Windows\Forms\CommonDialogTests.cs (4)
155using Control owner = new(); 176using Control owner = new(); 190using Control owner = new(); 212using Control owner = new();
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (1)
159using Control control = new();
System\Windows\Forms\ContainerControlTests.cs (20)
152using Control child = new(); 153Control grandchild = new(); 178Assert.Throws<ArgumentException>("value", () => control.ActiveControl = new Control()); 202using Control child = new(); 564using Control child = new(); 615using Control child = new(); 796using Control child1 = new(); 797using Control grandchild1 = new(); 800using Control grandchild2 = new(); 1022using Control child1 = new(); 1023using Control grandchild1 = new(); 1026using Control grandchild2 = new(); 1256using Control child1 = new(); 1257using Control child2 = new(); 1286using Control child1 = new(); 1287using Control child2 = new(); 1317using Control control = new(); 1342using Control control = new(); 1367using Control control = new(); 1383using Control control = new();
System\Windows\Forms\Control.ActiveXImplTests.cs (1)
17using Control control = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (26)
19Control control = new(); 40using Control control = new(); 59using Control control = new(); 71using Control control = new(); 126using Control control = new(); 143using Control control = new(); 160using Control control = new(); 177using Control control = new(); 194using Control control = new(); 211using Control control = new(); 228using Control control = new(); 241using Control control = new(); 255using Control control = new(); 272using Control control = new(); 280using Control control = new(); 291using Control control1 = new(); 292using Control control2 = new(); 304using Control control = new(); 324using Control control = new(); 340using Control control = new(); 352using Control control = new(); 365using Control control1 = new(); 366using Control control2 = new(); 382using Control control = new(); 400using Control control = new(); 413using Control control = new();
System\Windows\Forms\ControlTests.ControlCollection.cs (202)
19using Control owner = new(); 36using Control owner = new(); 37using Control control1 = new(); 38using Control control2 = new(); 110using Control owner = new(); 111using Control control1 = new(); 112using Control control2 = new(); 187using Control owner1 = new(); 188using Control owner2 = new(); 189using Control control = new(); 226using Control owner = new(); 331using Control owner = new(); 332using Control control = new() 360using Control owner = new(); 361using Control control = new() 389using Control owner = new(); 390using Control control = new() 428using Control owner = new(); 429using Control control = new() 467using Control owner = new(); 468using Control child1 = new(); 469using Control child2 = new(); 545using Control owner = new(); 546using Control control = new(); 588using Control owner = new(); 589using Control control = new(); 643using Control owner = new(); 644using Control control = new(); 793using Control owner = new(); 794using Control control = new(); 946using Control owner = new(); 1019using Control owner = new(); 1113using Control owner = new(); 1128owner = new Control(); 1134using Control control = new(); 1152control = new Control(); 1158using Control owner = new(); 1171using Control owner = new(); 1179using Control parent = new(); 1180using Control owner = new() 1191using Control grandparent = new(); 1192using Control parent = new() 1196using Control owner = new() 1207using Control owner = new(); 1208using Control child1 = new(); 1209using Control child2 = new(); 1210using Control child3 = new(); 1279using Control owner = new(); 1287using Control owner = new(); 1288using Control child1 = new(); 1289using Control child2 = new(); 1290using Control child3 = new(); 1337using Control owner = new(); 1338using Control child1 = new(); 1339using Control child2 = new(); 1340using Control child3 = new(); 1380using Control owner = new(); 1382using Control child1 = new(); 1383using Control child2 = new(); 1389Assert.False(collection.Contains(new Control())); 1405using Control owner = new(); 1406using Control child1 = new() 1410using Control child2 = new() 1414using Control child3 = new() 1437using Control owner = new(); 1438using Control child1 = new() 1442using Control child2 = new() 1446using Control child3 = new() 1450using Control grandchild1 = new() 1454using Control grandchild2 = new() 1458using Control grandchild3 = new() 1490using Control owner = new(); 1491using Control child1 = new() 1495using Control child2 = new() 1499using Control child3 = new() 1516using Control owner = new(); 1525using Control owner = new(); 1527using Control child1 = new(); 1528using Control child2 = new(); 1539using Control owner = new(); 1541using Control child1 = new(); 1542using Control child2 = new(); 1553using Control owner = new(); 1555using Control child1 = new(); 1556using Control child2 = new(); 1562Assert.Equal(-1, collection.GetChildIndex(new Control(), throwException: false)); 1568yield return new object[] { new Control() }; 1576using Control owner = new(); 1578using Control child1 = new(); 1579using Control child2 = new(); 1590using Control owner = new(); 1611using Control owner = new(); 1612using Control child1 = new(); 1613using Control child2 = new(); 1614using Control child3 = new(); 1650using Control owner = new(); 1651using Control child = new(); 1673using Control owner = new(); 1674using Control child1 = new(); 1675using Control child2 = new(); 1676using Control child3 = new(); 1706using Control owner = new(); 1707using Control child1 = new(); 1708using Control child2 = new(); 1709using Control child3 = new(); 1746using Control owner = new(); 1748using Control child1 = new(); 1749using Control child2 = new(); 1755Assert.Equal(-1, collection.IndexOf(new Control())); 1771using Control owner = new(); 1772using Control child1 = new() 1776using Control child2 = new() 1780using Control child3 = new() 1804using Control owner = new(); 1805using Control child1 = new() 1809using Control child2 = new() 1813using Control child3 = new() 1840using Control owner = new(); 1841using Control child1 = new() 1845using Control child2 = new() 1849using Control child3 = new() 1870using Control owner = new(); 1871using Control child1 = new(); 1872using Control child2 = new(); 1873using Control child3 = new(); 1892using Control owner = new(); 1903using Control owner = new(); 1904using Control child = new(); 1915using Control owner = new(); 1916using Control child1 = new(); 1917using Control child2 = new(); 1978using Control child1 = new(); 1979using Control child2 = new(); 2044using Control owner = new(); 2045using Control child1 = new(); 2046using Control child2 = new(); 2120using Control owner = new(); 2121using Control child1 = new(); 2122using Control child2 = new(); 2211using Control owner1 = new(); 2212using Control owner2 = new(); 2213using Control control1 = new(); 2214using Control control2 = new(); 2215using Control control3 = new(); 2239using Control owner = new(); 2240using Control control = new(); 2285using Control owner = new(); 2286using Control control = new(); 2343using Control owner = new(); 2344using Control control = new(); 2487using Control owner = new(); 2488using Control control = new(); 2619using Control owner = new(); 2683using Control owner = new(); 2769using Control owner = new(); 2770using Control child1 = new(); 2771using Control child2 = new(); 2847using Control owner = new(); 2848using Control child1 = new(); 2849using Control child2 = new(); 2905using Control owner = new(); 2916using Control owner = new(); 2917using Control child = new(); 2930using Control owner = new(); 2931using Control child1 = new() 2935using Control child2 = new() 2939using Control child3 = new() 3006using Control owner = new(); 3007using Control child1 = new() 3011using Control child2 = new() 3015using Control child3 = new() 3037using Control owner = new(); 3038using Control child1 = new(); 3039using Control child2 = new(); 3040using Control child3 = new(); 3105using Control owner = new(); 3106using Control child1 = new(); 3107using Control child2 = new(); 3108using Control child3 = new(); 3160using Control owner = new(); 3161using Control child1 = new(); 3162using Control child2 = new(); 3163using Control child3 = new(); 3239using Control owner = new(); 3240using Control child1 = new(); 3241using Control child2 = new(); 3242using Control child3 = new(); 3333using Control owner = new(); 3335using Control child2 = new(); 3336using Control child3 = new(); 3413using Control owner = new(); 3421using Control owner = new(); 3422using Control child = new(); 3433using Control owner = new(); 3434using Control control1 = new(); 3435using Control control2 = new(); 3507using Control owner = new(); 3516using Control owner = new(); 3517using Control child1 = new(); 3518using Control child2 = new(); 3578using Control owner = new(); 3590_layoutEngine = new Control().LayoutEngine;
System\Windows\Forms\ControlTests.cs (6)
292yield return new object[] { new Control(), string.Empty, string.Empty }; 293yield return new object[] { new Control(), "text", "text" }; 388yield return new object[] { new Control(), string.Empty, 0, 0, 0, 0, string.Empty }; 389yield return new object[] { new Control(), "text", 1, 2, 3, 4, "text" }; 574using Control parent = new(); 599using Control parent = new();
System\Windows\Forms\ControlTests.Handlers.cs (53)
133using Control child1 = new(); 134using Control child2 = new(); 180using Control child1 = new() 184using Control child2 = new() 328using Control child1 = new(); 329using Control child2 = new(); 379using Control child1 = new() 383using Control child2 = new() 509using Control child1 = new(); 510using Control child2 = new(); 556using Control child1 = new() 560using Control child2 = new() 657using Control child1 = new(); 658using Control child2 = new(); 706using Control child1 = new() 710using Control child2 = new() 1015yield return new object[] { new ControlEventArgs(new Control()) }; 1107using Control child1 = new(); 1108using Control child2 = new(); 1156using Control child1 = new() 1160using Control child2 = new() 1504using Control child1 = new(); 1505using Control child2 = new(); 1551using Control child1 = new() 1555using Control child2 = new() 1739using Control child1 = new(); 1740using Control child2 = new(); 1788using Control child1 = new() 1792using Control child2 = new() 1960using Control child1 = new(); 1961using Control child2 = new(); 2007using Control child1 = new() 2011using Control child2 = new() 2619Control parent = new(); 2679Control parent = new(); 3137using Control parent = new(); 3891Control control = new() 3932Control control = new() 4109using Control parent = new() 5031using Control child1 = new(); 5032using Control child2 = new() 5081using Control child1 = new() 5085using Control child2 = new() 5362using Control child1 = new(); 5363using Control child2 = new(); 5580using Control parent = new(); 5667using Control parent = new(); 5721using Control grandchild1 = new(); 5722using Control child1 = new(); 5723using Control child2 = new(); 5797using Control grandchild1 = new(); 5798using Control child1 = new() 5802using Control child2 = new()
System\Windows\Forms\ControlTests.Internals.cs (39)
16using Control control = new(); 28using Control control = new() 40using Control control = new() 55using Control control = new() 74using Control control = new() 93using Control control = new(); 111using Control control = new() 152using Control control = new() 164using Control control = new() 176using Control control = new(); 188using Control control = new(); 200using Control control = new(); 208using Control control = new(); 209Control parent = new(); 220using Control control = new(); 222Control parent = new(); 232using Control control = new(); 241using Control control = new() 253using Control control = new() 265using Control control = new(); 266Control parent = new(); 277using Control control = new(); 287using Control control = new(); 288Control first = new() 292Control second = new() 296Control third = new() 322using Control control = new(); 323Control first = new() 327Control second = new() 331Control third = new() 351using Control control = new(); 352Control first = new() 356Control second = new() 360Control third = new() 379using Control control = new(); 380Control first = new() 384Control second = new() 388Control third = new() 407using Control control = new();
System\Windows\Forms\ControlTests.Methods.ClipboardTests.cs (2)
33using Control control = new(); 43using Control control = new();
System\Windows\Forms\ControlTests.Methods.cs (183)
136using Control parent = new(); 137using Control child1 = new(); 138using Control child2 = new(); 178using Control parent = new(); 179using Control child1 = new(); 180using Control child2 = new(); 233using Control parent = new(); 234using Control child1 = new(); 235using Control child2 = new(); 300using Control parent = new(); 302using Control child2 = new(); 518using Control parent = new(); 579using Control control = new() 705using Control parent = new(); 793using Control parent = new(); 794using Control control = new() 798using Control child1 = new() 802using Control child2 = new() 806using Control grandchild1 = new() 810using Control otherParent = new(); 811using Control otherControl = new() 815using Control emptyControl = new(); 858using Control parent = new(); 988using Control control = new(); 1033using Control parent = new(); 1036using Control control = new() 1086using Control control = new(); 1087using Control child1 = new(); 1088using Control child2 = new(); 1164using Control control = new(); 1211using Control control = new(); 1831using Control control = new(); 1839using Control control = new(); 1948using Control control = new(); 1957using Control control = new(); 2075using Control control = new(); 2095using Control control = new(); 2109using Control control = new(); 2116using Control grandparent = new(); 2117using Control parent = new() 2121using Control control = new() 2138using Control parent = new() 2142using Control control = new() 2159using Control control = new() 2177using Control parent = new() 2181using Control control = new() 2199using Control parent = new() 2203using Control control = new() 2220using Control cont = new(); 2221using Control first = new() 2225using Control second = new() 2229using Control third = new() 2248using Control cont = new(); 2249using Control first = new() 2253using Control second = new() 2257using Control third = new() 2276using Control cont = new(); 2277using Control first = new() 2281using Control second = new() 2285using Control third = new() 2304using Control cont = new(); 2305using Control first = new() 2309using Control second = new() 2313using Control third = new() 2342using Control control = new(); 2355using Control control = new() 2394using Control control = new() 2543.Returns(new Control()); 2879using Control control = new() 2894using Control control = new() 2970_layoutEngine = new Control().LayoutEngine; 3769using Control control = new(); 3794using Control control = new(); 3820using Control control = new(); 3849using Control control = new(); 3883using Control control = new(); 3919using Control control = new(); 3952using Control control = new(); 3985using Control control = new(); 4011using Control control = new(); 4038using Control control = new(); 4073using Control control = new(); 4103using Control control = new(); 4145using Control control = new(); 4154using Control control = new(); 4166using Control otherControl = new(); 4290using Control otherControlParent = new(); 4342using Control otherControl = new(); 4745using Control control = new(); 4799using Control parent = new(); 4800using Control control = new() 4834using Control parent = new(); 4928control.PerformLayout(new Control(), "OtherAffectedProperty"); 4932control.PerformLayout(new Control(), "OtherAffectedProperty"); 4951using Control control = new(); 4990yield return new object[] { new Control(), string.Empty }; 4991yield return new object[] { new Control(), "AffectedProperty" }; 4998using Control control = new(); 5054using Control parent = new(); 5055using Control control = new() 5087yield return new object[] { true, new Control(), string.Empty, 1 }; 5088yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5091yield return new object[] { false, new Control(), string.Empty, 0 }; 5092yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5099using Control parent = new(); 5150yield return new object[] { true, new Control(), string.Empty, 1 }; 5151yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5154yield return new object[] { false, new Control(), string.Empty, 0 }; 5155yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5202control.PerformLayout(new Control(), "OtherAffectedProperty"); 5206control.PerformLayout(new Control(), "OtherAffectedProperty"); 5225using Control control = new(); 5252control.PerformLayout(new Control(), "AffectedProperty"); 5267Assert.Throws<NullReferenceException>(() => control.PerformLayout(new Control(), "AffectedProperty")); 5345using Control parent = new(); 5522using Control parent = new(); 5575using Control parent = new(); 5623using Control parent = new(); 5723using Control parent = new(); 6014using Control parent = new(); 6222using Control parent = new(); 6308using Control control = new(); 6320using Control control = new(); 6361using Control control = new(); 6419using Control control = new(); 6439using Control control = new(); 6553yield return new object[] { new Control(), string.Empty, true, 1 }; 6554yield return new object[] { new Control(), "AffectedProperty", true, 1 }; 6557yield return new object[] { new Control(), string.Empty, false, 0 }; 6558yield return new object[] { new Control(), "AffectedProperty", false, 0 }; 6565using Control control = new(); 6593using Control control = new(); 6607control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6623using Control control = new(); 6643using Control control = new(); 6673using Control control = new(); 6688control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6704using Control control = new(); 6727using Control child = new(); 6756using Control control = new(); 6775using Control child = new(); 6802using Control control = new(); 7003using Control parent = new(); 7004using Control child1 = new(); 7005using Control child2 = new(); 7045using Control parent = new(); 7046using Control child1 = new(); 7047using Control child2 = new(); 7100using Control parent = new(); 7101using Control child1 = new(); 7102using Control child2 = new(); 7167using Control parent = new(); 7169using Control child2 = new(); 7288using Control parent = new(); 7661using Control parent = new(); 7918using Control parent = new(); 8518using Control parent = new(); 8775using Control parent = new(); 9315using Control parent = new(); 9613using Control parent = new(); 10099using Control parent = new(); 10202using Control control = new() 10220using Control control = new() 10251using Control control = new(); 10268using Control control = new(); 10298using Control control = new(); 10305using Control control = new(); 10317using Control control = new(); 11218using Control parent = new(); 11456using Control parent = new(); 11704using Control parent = new(); 11954using Control parent = new(); 12163using Control parent = new(); 12182using Control parent = new(); 12214using Control parent = new(); 12247using Control parent = new(); 12291using Control parent = new(); 12292using Control child1 = new(); 12338using Control parent = new(); 12527using Control control = new(); 12601using Control control = new(); 14222using Control grandparent = new(); 14310using Control grandparent = new();
System\Windows\Forms\ControlTests.Properties.cs (362)
23using Control control = new(); 39using Control control = new(); 83using Control control1 = new(); 111using Control control = new() 128using Control control = new() 145using Control control = new() 162using Control control = new() 179using Control control = new(); 187using Control control = new() 209using Control control = new(); 246using Control control = new(); 286using Control control = new(); 341using Control control = new(); 363using Control control = new() 414using Control parent = new(); 415using Control control = new() 459using Control grandparent = new(); 460using Control parent = new() 464using Control control = new() 560using Control parent = new(); 561using Control control = new() 679using Control grandparent = new(); 680using Control parent = new() 684using Control control = new() 771using Control control = new() 825using Control parent = new(); 826using Control control = new() 873using Control control = new(); 908using Control control = new() 923using Control control = new(); 950using Control parent = new(); 951using Control control = new() 1005using Control control = new() 1068using Control control = new(); 1111using Control parent = new(); 1112using Control control = new() 1194using Control control = new() 1233using Control control = new() 1250using Control control = new() 1293using Control child1 = new(); 1294using Control child2 = new(); 1295using Control control = new(); 1317using Control child1 = new() 1321using Control child2 = new() 1325using Control control = new(); 1353using Control control = new(); 1381using Control control = new(); 1416using Control control = new(); 1441using Control child1 = new(); 1442using Control child2 = new(); 1443using Control control = new(); 1521using Control child1 = new() 1525using Control child2 = new() 1529using Control control = new(); 1601using Control control = new(); 1609using Control control = new(); 1625using Control control = new(); 1641using Control control = new() 1664using Control control = new(); 1693using Control child1 = new(); 1694using Control child2 = new(); 1695using Control control = new(); 1717using Control child1 = new() 1721using Control child2 = new() 1725using Control control = new(); 1744using Control control = new(); 1786using Control control = new(); 1812using Control child1 = new(); 1813using Control child2 = new(); 1814using Control control = new(); 1899using Control child1 = new() 1903using Control child2 = new() 1907using Control control = new(); 2077using Control control = new(); 2112using Control control = new(); 2138using Control control = new(); 2146using Control parent = new() 2150using Control control = new() 2165using Control control = new() 2182using Control control = new() 2199using Control control = new() 2217using Control control = new(); 2259using Control child1 = new(); 2260using Control child2 = new(); 2261using Control control = new(); 2346using Control child1 = new() 2350using Control child2 = new() 2354using Control control = new(); 2697using Control parent = new(); 2908using Control parent = new(); 3051using Control control = new() 3067using Control control = new() 3082using Control parent = new() 3087using Control control = new() 3101using Control control = new() 3117using Control parent = new() 3122using Control control = new() 3134using Control control = new() 3156using Control control = new(); 3193using Control control = new() 3215using Control control = new(); 3251using Control control = new() 3288yield return new object[] { new Control(), Size.Empty }; 3330using Control control = new(); 3488using Control control = new(); 3542using Control control = new() 3560using Control control = new() 3578using Control control = new() 3593using Control control = new() 3609using Control control = new(); 3651yield return new object[] { new Control.ControlCollection(new Control()) }; 3678using Control control = new(); 3684using Control child = new(); 3698using Control control = new(); 3704using Control child = new(); 3718using Control control = new() 3734using Control parent = new() 3738using Control control = new() 3758using Control control = new() 3786using Control parent = new() 3812using Control control = new() 3829using Control control = new(); 3858using Control child1 = new(); 3859using Control child2 = new(); 3860using Control control = new(); 3882using Control child1 = new() 3886using Control child2 = new() 3890using Control control = new(); 3909using Control control = new(); 3951using Control child1 = new(); 3952using Control child2 = new(); 3953using Control control = new(); 4038using Control child1 = new() 4042using Control child2 = new() 4046using Control control = new(); 4130using Control control = new(); 4152using Control control = new() 4187using Control parent = new(); 4188using Control control = new() 4277using Control parent = new(); 4278using Control control = new() 4334using Control control = new() 4353using Control control = new(); 4387using Control control = new() 4426using Control control = new(); 4508using Control control = new() 4571using Control control = new() 4609using Control child1 = new(); 4610using Control child2 = new(); 4611using Control control = new() 4686using Control child1 = new() 4690using Control child2 = new() 4694using Control control = new() 4770using Control control = new(); 4786using Control control = new(); 4803using Control parent = new() 4807using Control control = new() 4827using Control control = new() 5026using Control control = new(); 5068using Control child1 = new(); 5069using Control child2 = new(); 5070using Control control = new(); 5155using Control child1 = new() 5159using Control child2 = new() 5163using Control control = new(); 5247using Control control = new(); 5272using Control control = new(); 5297using Control control = new() 5314using Control control = new() 5333using Control child1 = new(); 5334using Control child2 = new(); 5335using Control control = new(); 5357using Control child1 = new() 5361using Control child2 = new() 5365using Control control = new(); 5394using Control control = new(); 5422using Control control = new(); 5457using Control control = new(); 5482using Control child1 = new(); 5483using Control child2 = new(); 5484using Control control = new(); 5562using Control child1 = new() 5566using Control child2 = new() 5570using Control control = new(); 5643using Control control = new(); 5659using Control control = new(); 5674using Control cont = new(); 5974using Control parent = new(); 6209using Control parent = new(); 6367using Control control = new() 6384using Control control = new(); 6412using Control control = new(); 6448using Control control = new(); 6562using Control control = new(); 6575using Control control = new(); 6589using Control control = new() 6610using Control control = new(); 6641using Control control = new(); 6744using Control parent = new(); 6938using Control parent = new(); 7091using Control control = new(); 7149using Control control = new(); 7223using Control parent = new(); 7421using Control parent = new(); 7577using Control control = new(); 7601using Control control = new(); 7624using Control control = new(); 7677yield return new object[] { new Control(), new Padding(3) }; 7711using Control control = new(); 7731using Control parent = new(); 7732using Control control = new() 7761using Control control = new(); 7800using Control parent = new(); 7801using Control control = new() 7855using Control control = new(); 7871using Control control = new(); 7885yield return new object[] { new Control(), Size.Empty }; 7933using Control control = new(); 7955using Control control = new() 8001using Control control = new() 8032using Control control = new() 8057using Control control = new() 8104using Control parent = new(); 8105using Control control = new() 8159using Control parent = new(); 8160using Control control = new() 8202using Control control = new(); 8237using Control control = new() 8275using Control control = new() 8313using Control parent = new(); 8314using Control control = new() 8380using Control parent = new(); 8381using Control control = new() 8448using Control control = new(); 8472using Control control = new(); 8494yield return new object[] { new Control(), Size.Empty }; 8542using Control control = new(); 8586using Control control = new() 8639using Control control = new() 8670using Control control = new() 8701using Control control = new() 8748using Control parent = new(); 8749using Control control = new() 8809using Control parent = new(); 8810using Control control = new() 8874using Control control = new(); 8931using Control control = new() 8997using Control control = new() 9056using Control parent = new(); 9057using Control control = new() 9144using Control parent = new(); 9145using Control control = new() 9218using Control control = new(); 9242using Control control = new(); 9304using Control control = new() 9320using Control control = new() 9337using Control control = new() 9372using Control control = new() 9389yield return new object[] { new Control(), Padding.Empty }; 9417using Control control = new(); 9443using Control parent = new(); 9444using Control control = new() 9541using Control parent = new(); 9612using Control control = new(); 9650using Control control = new(); 9666using Control control = new(); 9681yield return new object[] { new Control() }; 9689using Control control = new() 9706using Control oldParent = new(); 9707using Control control = new() 9727using Control parent = new(); 9728using Control control = new() 9747using Control control = new(); 9775using Control parent = new(); 9776using Control control = new(); 9811using Control control = new(); 9819using Control child = new(); 9820using Control control = new(); 9830using Control parent = new(); 9841using Control control = new(); 9842using Control child = new() 9860using Control child = new() 9882using Control control = new() 9900using Control control = new() 9922using Control control = new(); 9952using Control control = new() 9986using Control control = new(); 10061using Control control = new() 10078using Control control = new() 10097using Control child1 = new(); 10098using Control child2 = new(); 10099using Control control = new(); 10121using Control child1 = new() 10125using Control child2 = new() 10129using Control control = new(); 10153using Control control = new(); 10184using Control control = new() 10215using Control control = new(); 10250using Control control = new(); 10275using Control child1 = new(); 10276using Control child2 = new() 10280using Control control = new(); 10358using Control child1 = new() 10362using Control child2 = new() 10366using Control control = new(); 10439using Control control = new(); 10447using Control control = new(); 10475using Control control = new(); 10653using Control control = new() 10670using Control control = new(); 10706using Control control = new() 10783using Control control = new(); 10959using Control control = new() 11373using Control parent = new(); 11618using Control parent = new(); 11758using Control control = new(); 11782using Control control = new(); 11808using Control control = new() 11824using Control control = new() 11862using Control control = new(); 11870using Control control = new() 11892using Control control = new(); 11928using Control control = new() 11967using Control control = new() 11984using Control control = new(); 12012using Control control = new(); 12048using Control control = new(); 12075using Control control = new(); 12178using Control parent = new(); 12370using Control parent = new(); 12523using Control control = new(); 12571using Control grandparent = new(); 12572using Control parent = new() 12576using Control control = new() 12590using Control parent = new() 12594using Control control = new() 12607using Control control = new() 12629using Control control = new(); 12630using Control child1 = new(); 12631using Control child2 = new(); 12660using Control control = new(); 12700using Control parent = new() 12704using Control item = new() 12719using Control control = new() 12741using Control parent = new(); 12742using Control control = new() 12815using Control parent = new(); 12816using Control control = new() 12873using Control control = new() 12911using Control child1 = new(); 12912using Control child2 = new(); 12913using Control control = new() 12988using Control child1 = new() 12992using Control child2 = new() 12996using Control control = new() 13072using Control control = new(); 13088using Control control = new(); 13393using Control parent = new(); 13628using Control parent = new(); 13767using Control cont = new(); 13779using Control control = new() 13794using Control control = new();
System\Windows\Forms\DataGridViewTests.cs (8)
115using Control parent = new(); 257using Control parent = new(); 819yield return new object[] { new Control() }; 844using Control oldParent = new(); 865using Control parent = new(); 911using Control parent = new(); 1032using Control parent = new(); 1181using Control parent = new();
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
1589using Control parent = new(); 1880using Control parent = new();
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
805using Control result = new();
System\Windows\Forms\ErrorProviderTests.cs (21)
858yield return new object[] { new Control(), true }; 873using Control control = new(); 896using Control control = new(); 926using Control control = new(); 955using Control control = new(); 973using Control control = new(); 991using Control control = new(); 1047using Control control = new(); 1074using Control control = new(); 1098using Control control = new(); 1107using Control control = new(); 1132yield return new object[] { blinkStyle, new SubControl { Parent = new() }, error, error ?? string.Empty }; 1142using Control originalParent = new(); 1143using Control newParent = new(); 1229using Control control1 = new(); 1240using Control control1 = new(); 1253using Control control1 = new(); 1266using Control control1 = new(); 1279using Control control1 = new(); 1295using Control control1 = new(); 1308using Control control1 = new();
System\Windows\Forms\FlowLayoutPanelTests.cs (8)
217using Control extendee = new() 229yield return new object[] { new Control() }; 230yield return new object[] { new Control { Parent = new() } }; 252using Control child = new(); 320using Control child = new(); 356using Control parent = new(); 357using Control child = new()
System\Windows\Forms\FlowLayoutSettingsTests.cs (4)
102Assert.False(settings.GetFlowBreak(new Control())); 136using Control child = new(); 176using Control parent = new(); 177using Control child = new()
System\Windows\Forms\FormTests.cs (7)
928yield return new object[] { new Control() }; 956using Control oldParent = new(); 1107yield return new object[] { new Control() }; 1139using Control parent = new(); 1193using Control parent = new(); 1244using Control parent = new(); 2641using Control control = new();
System\Windows\Forms\GroupBoxTests.cs (8)
269using Control parent = new(); 417using Control parent = new(); 927using Control child = new() 1220using Control parent = new(); 1317using Control parent = new(); 1984using Control parent = new(); 2029using Control parent = new() 2045using Control parent = new()
System\Windows\Forms\HelpProviderTests.cs (21)
52using Control control = new(); 77yield return new object[] { new Control(), true }; 92Assert.Null(provider.GetHelpKeyword(new Control())); 106Assert.Equal(HelpNavigator.AssociateIndex, provider.GetHelpNavigator(new Control())); 120Assert.Null(provider.GetHelpString(new Control())); 134Assert.False(provider.GetShowHelp(new Control())); 149using Control control = new(); 160using Control control = new(); 189using Control control = new(); 223using Control control = new(); 255using Control control = new(); 290using Control control = new(); 307using Control control = new(); 325using Control control = new(); 352Assert.Throws<InvalidEnumArgumentException>("navigator", () => provider.SetHelpNavigator(new Control(), navigator)); 360using Control control = new(); 379using Control control = new(); 399using Control control = new(); 426using Control control = new(); 452using Control control = new(); 492Assert.False(provider.ShouldSerializeShowHelp(new Control()));
System\Windows\Forms\HtmlDocumentTests.cs (96)
20using Control parent = new(); 52using Control parent = new(); 84using Control parent = new(); 108using Control parent = new(); 138using Control parent = new(); 158using Control parent = new(); 178using Control parent = new(); 195using Control parent = new(); 212using Control parent = new(); 237using Control parent = new(); 269using Control parent = new(); 301using Control parent = new(); 331using Control parent = new(); 361using Control parent = new(); 378using Control parent = new(); 395using Control parent = new(); 420using Control parent = new(); 437using Control parent = new(); 472using Control parent = new(); 487using Control parent = new(); 502using Control parent = new(); 524using Control parent = new(); 539using Control parent = new(); 555using Control parent = new(); 577using Control parent = new(); 592using Control parent = new(); 606using Control parent = new(); 630using Control parent = new(); 664using Control parent = new(); 678using Control parent = new(); 693using Control parent = new(); 717using Control parent = new(); 749using Control parent = new(); 781using Control parent = new(); 803using Control parent = new(); 834using Control parent = new(); 854using Control parent = new(); 870using Control parent = new(); 890using Control parent = new(); 906using Control parent = new(); 938using Control parent = new(); 970using Control parent = new(); 992using Control parent = new(); 1022using Control parent = new(); 1042using Control parent = new(); 1058using Control parent = new(); 1083using Control parent = new(); 1106using Control parent = new(); 1130using Control parent = new(); 1167using Control parent = new(); 1181using Control parent = new(); 1196using Control parent = new(); 1218using Control parent = new(); 1248using Control parent = new(); 1269using Control parent = new(); 1301using Control parent = new(); 1333using Control parent = new(); 1355using Control parent = new(); 1385using Control parent = new(); 1404using Control parent = new(); 1466using Control parent = new(); 1504using Control parent = new(); 1522using Control parent = new(); 1542using Control parent = new(); 1559using Control parent = new(); 1575using Control parent = new(); 1603using Control parent = new(); 1620using Control parent = new(); 1637using Control parent = new(); 1660using Control parent = new(); 1678using Control parent = new(); 1693using Control parent = new(); 1712using Control parent = new(); 1730using Control parent = new(); 1744using Control parent = new(); 1761using Control parent = new(); 1786using Control parent = new(); 1806using Control parent = new(); 1820using Control parent = new(); 1838using Control parent = new(); 1877using Control parent = new(); 1904using Control parent = new(); 1921using Control parent = new(); 1938using Control parent = new(); 1956using Control parent = new(); 1976using Control parent = new(); 1997using Control parent = new(); 2035using Control parent = new(); 2073using Control parent = new(); 2111using Control parent = new(); 2149using Control parent = new(); 2187using Control parent = new(); 2225using Control parent = new(); 2263using Control parent = new(); 2301using Control parent = new(); 2339using Control parent = new();
System\Windows\Forms\HtmlElementTests.cs (127)
20using Control parent = new(); 40using Control parent = new(); 57using Control parent = new(); 76using Control parent = new(); 91using Control parent = new(); 106using Control parent = new(); 122using Control parent = new(); 141using Control parent = new(); 158using Control parent = new(); 180using Control parent = new(); 198using Control parent = new(); 214using Control parent = new(); 236using Control parent = new(); 275using Control parent = new(); 290using Control parent = new(); 308using Control parent = new(); 323using Control parent = new(); 341using Control parent = new(); 366using Control parent = new(); 397using Control parent = new(); 412using Control parent = new(); 431using Control parent = new(); 457using Control parent = new(); 488using Control parent = new(); 503using Control parent = new(); 518using Control parent = new(); 533using Control parent = new(); 552using Control parent = new(); 578using Control parent = new(); 609using Control parent = new(); 624using Control parent = new(); 639using Control parent = new(); 654using Control parent = new(); 670using Control parent = new(); 696using Control parent = new(); 729using Control parent = new(); 744using Control parent = new(); 762using Control parent = new(); 780using Control parent = new(); 798using Control parent = new(); 814using Control parent = new(); 829using Control parent = new(); 853using Control parent = new(); 884using Control parent = new(); 915using Control parent = new(); 930using Control parent = new(); 945using Control parent = new(); 964using Control parent = new(); 990using Control parent = new(); 1021using Control parent = new(); 1036using Control parent = new(); 1057using Control parent = new(); 1075using Control parent = new(); 1093using Control parent = new(); 1117using Control parent = new(); 1147using Control parent = new(); 1165using Control parent = new(); 1183using Control parent = new(); 1207using Control parent = new(); 1237using Control parent = new(); 1256using Control parent = new(); 1275using Control parent = new(); 1304using Control parent = new(); 1337using Control parent = new(); 1355using Control parent = new(); 1379using Control parent = new(); 1409using Control parent = new(); 1424using Control parent = new(); 1456using Control parent = new(); 1494using Control parent = new(); 1511using Control parent = new(); 1576using Control parent = new(); 1617using Control parent = new(); 1659using Control parent = new(); 1698using Control parent = new(); 1717using Control parent = new(); 1737using Control parent = new(); 1766using Control parent = new(); 1784using Control parent = new(); 1802using Control parent = new(); 1824using Control parent = new(); 1842using Control parent = new(); 1858using Control parent = new(); 1890using Control parent = new(); 1910using Control parent = new(); 1925using Control parent = new(); 1950using Control parent = new(); 1965using Control parent = new(); 1988using Control parent = new(); 2026using Control parent = new(); 2070using Control parent = new(); 2108using Control parent = new(); 2152using Control parent = new(); 2188using Control parent = new(); 2232using Control parent = new(); 2267using Control parent = new(); 2311using Control parent = new(); 2327using Control parent = new(); 2343using Control parent = new(); 2363using Control parent = new(); 2382using Control parent = new(); 2400using Control parent = new(); 2421using Control parent = new(); 2440using Control parent = new(); 2465using Control parent = new(); 2480using Control parent = new(); 2497using Control parent = new(); 2520using Control parent = new(); 2544using Control parent = new(); 2585using Control parent = new(); 2626using Control parent = new(); 2667using Control parent = new(); 2708using Control parent = new(); 2749using Control parent = new(); 2790using Control parent = new(); 2831using Control parent = new(); 2872using Control parent = new(); 2913using Control parent = new(); 2954using Control parent = new(); 2995using Control parent = new(); 3036using Control parent = new(); 3077using Control parent = new(); 3118using Control parent = new(); 3159using Control parent = new(); 3200using Control parent = new(); 3241using Control parent = new(); 3282using Control parent = new();
System\Windows\Forms\HtmlWindowTests.cs (4)
17using Control parent = new(); 33using Control parent = new(); 49using Control parent = new(); 70using Control parent = new();
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
42using Control child1 = new() 47using Control child2 = new() 52using Control largeChild = new() 57using Control emptyChild = new() 61using Control emptyChildWithMargin = new() 66using Control child3 = new() 71using Control child4 = new() 103using Control child1 = new() 108using Control child2 = new() 113using Control largeChild = new() 118using Control emptyChild = new() 122using Control emptyChildWithMargin = new() 127using Control child3 = new() 132using Control child4 = new() 164using Control child1 = new() 169using Control child2 = new() 174using Control largeChild = new() 179using Control emptyChild = new() 183using Control emptyChildWithMargin = new() 188using Control child3 = new() 193using Control child4 = new() 225using Control child1 = new() 230using Control child2 = new() 235using Control largeChild = new() 240using Control emptyChild = new() 244using Control emptyChildWithMargin = new() 249using Control child3 = new() 254using Control child4 = new()
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (58)
161using Control child = new(); 170using Control child = new(); 211using Control child = new(); 221using Control child = new(); 231using Control child = new(); 241using Control child = new(); 253using Control child = new(); 260using Control child = new(); 301using Control child = new(); 310using Control child = new(); 319using Control child = new(); 354using Control child = new(); 361using Control child = new(); 402using Control child = new(); 411using Control child = new(); 462using Control child = new(); 499using Control parent = new(); 500using Control child = new() 552using Control child = new(); 574using Control parent = new(); 575using Control child = new() 623using Control child = new(); 637using Control child = new(); 686using Control child = new(); 718using Control parent = new(); 719using Control child = new() 775using Control child = new(); 801using Control parent = new(); 802using Control child = new() 843using Control child = new(); 857using Control child = new(); 924using Control child = new(); 953using Control parent = new(); 954using Control child = new() 1008using Control child = new(); 1032using Control parent = new(); 1033using Control child = new() 1074using Control child = new(); 1088using Control child = new(); 1162using Control child = new(); 1194using Control parent = new(); 1195using Control child = new() 1251using Control child = new(); 1277using Control parent = new(); 1278using Control child = new() 1319using Control child = new(); 1333using Control child = new(); 1400using Control child = new(); 1429using Control parent = new(); 1430using Control child = new() 1484using Control child = new(); 1508using Control parent = new(); 1509using Control child = new() 1550using Control child = new(); 1564using Control child = new(); 1662using Control controlWithName = new() 1666using Control controlWithDefaultName = new(); 1779using Control controlWithName = new() { Name = "name" };
System\Windows\Forms\LayoutEventArgsTests.cs (3)
16yield return new object[] { new Control(), "" }; 33yield return new object[] { new Control(), "" }; 34yield return new object[] { new Control(), "affectedProperty" };
System\Windows\Forms\ListBoxTests.cs (1)
930using Control parent = new();
System\Windows\Forms\MdiClientTests.cs (7)
181using Control parent = new() 260using Control parent = new() 376using Control parent = new() 420using Control parent = new() 698using Control parent = new(); 847using Control parent = new() 1009using Control parent = new()
System\Windows\Forms\MenuStripTests.cs (1)
699using Control parent = new();
System\Windows\Forms\MixedDpiHostingTests.cs (1)
29using Control control = new();
System\Windows\Forms\NativeWindowTests.cs (12)
22using Control control = new(); 51using Control control = new(); 88using Control control = new(); 145using Control control = new(); 174using Control control = new(); 238using Control control = new(); 295using Control control = new(); 340using Control control = new(); 406using Control control = new(); 416using Control control = new(); 428using Control control = new(); 474using Control control = new();
System\Windows\Forms\PanelTests.cs (5)
257using Control parent = new(); 354_layoutEngine = new Control().LayoutEngine; 405using Control parent = new(); 614using Control child = new() 629using Control child = new()
System\Windows\Forms\PictureBoxTests.cs (7)
240using Control control = new() 259using Control control = new(); 277using Control control = new() 1119yield return new object[] { new Control() }; 1142using Control oldParent = new(); 1161using Control parent = new(); 1178using Control parent = new();
System\Windows\Forms\ReadOnlyControlCollectionTests.cs (1)
13using Control owner = new();
System\Windows\Forms\RichTextBoxTests.cs (8)
462using Control parent = new(); 679using Control control = new(); 2133using Control parent = new(); 2189using Control parent = new(); 2964using Control parent = new(); 3087using Control parent = new(); 7102using Control parent = new(); 7330using Control parent = new();
System\Windows\Forms\ScreenTests.cs (3)
68yield return new object[] { new Control() }; 70Control createdControl = new(); 101using Control control = new();
System\Windows\Forms\ScrollableControlTests.cs (6)
1394yield return new object[] { true, new LayoutEventArgs(affectedControl = new Control(), "affectedProperty"), 2, affectedControl }; 1398yield return new object[] { false, new LayoutEventArgs(affectedControl = new Control(), "affectedProperty"), 1, affectedControl }; 1570Func<Control> controlFactory = () => new Control 1665static Control CreateControl() => new() 1823using Control parent = new() 2486yield return new object[] { true, true, true, new Size(70, 80), new Control(), new Rectangle(0, 0, 70, 80) };
System\Windows\Forms\SplitterPanelTests.cs (4)
216using Control parent = new(); 277using Control parent = new(); 715yield return new object[] { new Control() }; 739using Control parent = new();
System\Windows\Forms\SplitterTests.cs (12)
1142using Control parent = new() 1197using Control parent = new() 1202using Control child = new() 1242using Control parent = new() 1247using Control child = new() 1314using Control parent = new() 1361using Control parent = new() 1366using Control child = new() 2009using Control parent = new() 2014using Control child = new() 2110using Control parent = new() 2115using Control child = new()
System\Windows\Forms\StatusStripTests.cs (1)
1134yield return new object[] { layoutStyle, dock, new LayoutEventArgs(new Control(), "AffectedProperty") };
System\Windows\Forms\TabControl.ControlCollectionTests.cs (3)
877using Control value = new(); 1457using Control value1 = new(); 1458using Control value2 = new();
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (8)
1086yield return new object[] { new Control() }; 1590Assert.False(iList.Contains(new Control())); 1602Assert.False(iList.Contains(new Control())); 1895Assert.Equal(-1, iList.IndexOf(new Control())); 1907Assert.Equal(-1, iList.IndexOf(new Control())); 3135yield return new object[] { new Control() }; 3932yield return new object[] { new Control() }; 4797yield return new object[] { new Control() };
System\Windows\Forms\TableLayoutControlCollectionTests.cs (3)
34using Control child = new(); 46using Control child = new(); 58using Control child = new();
System\Windows\Forms\TableLayoutPanelTests.cs (62)
345using Control child = new(); 365using Control child = new(); 499using Control controlWithName = new() { Name = "name" }; 500using Control controlWithDefaultName = new(); 648using Control child = new(); 663using Control child = new(); 672using Control child = new(); 681using Control child = new(); 696using Control child = new(); 737using Control child = new(); 777using Control child = new(); 797using Control child = new() 820using Control child = new() 842using Control otherChild = new(); 843using Control child = new() 890using Control child = new(); 904using Control child = new(); 916using Control child = new(); 934using Control child = new(); 1142using Control child = new(); 1322yield return new object[] { new LayoutEventArgs(new Control(), null) }; 1323yield return new object[] { new LayoutEventArgs(new Control(), string.Empty) }; 1324yield return new object[] { new LayoutEventArgs(new Control(), "ChildIndex") }; 1325yield return new object[] { new LayoutEventArgs(new Control(), "Visible") }; 1326yield return new object[] { new LayoutEventArgs(new Control(), "Items") }; 1327yield return new object[] { new LayoutEventArgs(new Control(), "Rows") }; 1328yield return new object[] { new LayoutEventArgs(new Control(), "Columns") }; 1329yield return new object[] { new LayoutEventArgs(new Control(), "RowStyles") }; 1330yield return new object[] { new LayoutEventArgs(new Control(), "ColumnStyles") }; 1331yield return new object[] { new LayoutEventArgs(new Control(), "TableIndex") }; 1332yield return new object[] { new LayoutEventArgs(new Control(), "GrowStyle") }; 1333yield return new object[] { new LayoutEventArgs(new Control(), "CellBorderStyle") }; 1334yield return new object[] { new LayoutEventArgs(new Control(), "LayoutSettings") }; 1335yield return new object[] { new LayoutEventArgs(new Control(), "NoSuchProperty") }; 1507using Control child1 = new(); 1512using Control child2 = new(); 1557using Control child = new(); 1593using Control parent = new(); 1594using Control child = new() 1644using Control child = new(); 1668using Control child = new(); 1699using Control parent = new(); 1700using Control child = new() 1750using Control child = new(); 1770Assert.Throws<ArgumentOutOfRangeException>("column", () => control.SetColumn(new Control(), -2)); 1779using Control child = new(); 1808using Control parent = new(); 1809using Control child = new() 1859using Control child = new(); 1884Assert.Throws<ArgumentOutOfRangeException>("value", () => control.SetColumnSpan(new Control(), value)); 1895using Control child = new(); 1926using Control parent = new(); 1927using Control child = new() 1977using Control child = new(); 1997Assert.Throws<ArgumentOutOfRangeException>("row", () => control.SetRow(new Control(), -2)); 2006using Control child = new(); 2035using Control parent = new(); 2036using Control child = new() 2086using Control child = new(); 2110Assert.Throws<ArgumentOutOfRangeException>("value", () => control.SetRowSpan(new Control(), value)); 2116using Control extendee = new(); 2128yield return new object[] { new Control() };
System\Windows\Forms\TabPageTests.cs (6)
2615using Control parent = new(); 3816using Control parent = new() 3820using Control control = new() 3832using Control grandparent = new(); 3833using Control parent = new() 3837using Control control = new()
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (2)
30using Control control1 = new(); 31using Control control2 = new();
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
98using Control control = new();
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
496using Control parent = new(); 557using Control parent = new(); 636using Control parent = new()
System\Windows\Forms\ToolStripControlHostTests.cs (167)
20yield return new object[] { new Control() }; 23new Control 41yield return new object[] { new Control { Enabled = false } }; 42yield return new object[] { new Control { Visible = false } }; 139using Control c = new(); 158using Control c = new(); 169using Control c = new(); 188using Control c = new(); 199using Control c = new(); 218using Control c = new(); 229using Control c = new(); 249using Control c = new(); 257using Control c = new(); 268using Control c = new(); 287using Control c = new(); 323using Control c = new(); 334using Control c = new(); 351using Control c = new(); 365using Control c = new(); 382using Control c = new(); 391using Control c = new(); 410using Control c = new(); 429using Control c = new(); 440using Control c = new(); 451using Control c = new(); 470using Control c = new(); 494using Control c = new() 508using Control c = new(); 518using Control c = new(); 543using Control c = new(); 557using Control c = new(); 569using Control c = new(); 580using Control c = new(); 595using Control c = new(); 614using Control c = new(); 626using Control c = new(); 640using Control c = new(); 654using Control c = new(); 664using Control c = new(); 678using Control c = new(); 700using Control c = new() 725using Control c = new(); 745using Control c = new(); 753using Control c = new(); 764using Control c = new(); 781using Control c = new(); 817using Control c = new(); 826using Control c = new(); 843using Control c = new(); 866using Control c = new(); 893using Control c = new(); 928using Control c = new(); 938using Control c = new(); 948using Control c = new(); 968using Control c = new(); 989using Control c = new(); 1001using Control c = new(); 1027using Control c = new(); 1041using Control c = new(); 1067using Control c = new(); 1076using Control c = new(); 1087using Control c = new(); 1106using Control c = new(); 1142using Control c = new(); 1153using Control c = new(); 1170using Control c = new(); 1184using Control c = new(); 1201using Control c = new(); 1222using Control c = new(); 1244using Control c = new(); 1264using Control c = new(); 1275using Control c = new(); 1297using Control c = new(); 1319using Control c = new(); 1348using Control c = new(); 1389using Control c = new(); 1457using Control c = new(); 1532using Control c = new(); 1548using Control c = new(); 1559using Control c = new(); 1579using Control c = new(); 1598using Control c = new(); 1635using Control c = new(); 1644using Control c = new(); 1673using Control c = new(); 1687using Control c = new(); 1716using Control c = new(); 1727using Control c = new(); 1749using Control c = new(); 1772using Control c = new(); 1818using Control c = new(); 1839using Control c = new(); 1860using Control c = new(); 1882using Control c = new(); 1918using Control c = new(); 1947using Control c = new(); 1970using Control c = new(); 1988using Control c = new(); 2009using Control c = new(); 2028using Control c = new(); 2048using Control c = new(); 2070using Control c = new(); 2089using Control c = new(); 2109using Control c = new(); 2129using Control c = new(); 2161using Control c = new(); 2180using Control c = new(); 2206using Control c = new() 2230using Control c = new(); 2251using Control c = new(); 2270using Control c = new(); 2307using Control c = new(); 2325using Control c = new(); 2342using Control c = new(); 2358using Control c = new(); 2367using Control c = new(); 2387using Control c = new(); 2408using Control c = new(); 2438using Control c = new(); 2474using Control c = new(); 2512using Control c = new(); 2532using Control c = new(); 2550using Control c = new(); 2565using Control c = new(); 2577using Control c = new(); 2619using Control c = new(); 2661using Control c = new(); 2693using Control c = new(); 2703using Control c = new(); 2723using Control c = new() 2738using Control c = new() 2756using Control c = new(); 2770using Control c = new() 2794using Control c = new(); 2808using Control c = new(); 2833using Control c = new(); 2858using Control c = new() 2876using Control c = new(); 2901using Control c = new(); 2926using Control c = new(); 2951using Control c = new(); 2964using Control c = new(); 2989using Control c = new(); 3014using Control c = new(); 3059using Control c = new(); 3078using Control c = new(); 3102using Control c = new(); 3171using Control controlParent = new(); 3172using Control c = new() 3246using Control c = new(); 3267using Control c = new(); 4138using Control c = new(); 4147using Control c = new(); 4172using Control c = new(); 4201using Control c = new(); 4242using Control c = new(); 4258using Control c = new(); 4302using Control c = new(); 4317using Control c = new(); 4358using Control c = new(); 4390using Control c = new(); 4413using Control c = new(); 4423using Control c = new(); 4446using Control c = new(); 4457using Control c = new(); 4491using Control c = new(); 4527using Control c = new();
System\Windows\Forms\ToolStripDropDownTests.cs (19)
703using Control parent = new(); 1325using Control parent = new() 1357using Control parent = new() 1487using Control parent = new() 2329using Control sourceControl = new() 2361using Control sourceControl = new() 2912using Control parent = new(); 3092using Control sourceControl = new() 3373using Control sourceControl = new() 3432using Control sourceControl = new() 4138yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2 }; 4142yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1 }; 4188yield return new object[] { autoSize, new LayoutEventArgs(new Control(), "affectedProperty") }; 4331yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2, 3 }; 4335yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1, 1 }; 4496yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2, 3 }; 4500yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1, 1 }; 4991using Control control = new(); 5023using Control control = new();
System\Windows\Forms\ToolStripPanel.ToolStripPanelControlCollection.XYComparerTests.cs (2)
11private readonly Control _control1 = new() { Bounds = new Rectangle(10, 20, 100, 100) }; 12private readonly Control _control2 = new() { Bounds = new Rectangle(10, 10, 100, 100) };
System\Windows\Forms\ToolStripTests.cs (12)
914using Control parent = new(); 1086using Control parent = new() 1403using Control parent = new() 1876using Control parent = new() 1907using Control parent = new() 2457using Control parent = new(); 2921using Control parent = new(); 5033yield return new object[] { new ControlEventArgs(new Control()) }; 5912Control control = new() 5960Control control = new() 6162using Control parent = new() 6921using Control parent = new();
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
36Control control = new();
System\Windows\Forms\ToolTipTests.cs (8)
624yield return new object[] { new Control(), true }; 638yield return new object[] { new Control() }; 652using Control control = new(); 675using Control control = new(); 696using Control control = new(); 723using Control control = new(); 751using Control control = new(); 809using Control topLevelControl = new();
System\Windows\Forms\UnsupportedTypesTests.cs (2)
81using Control control = new(); 94using Control control = new();
System\Windows\Forms\UpDownBaseTests.cs (1)
1966yield return new object[] { borderStyle, rightToLeft, upDownAlign, new LayoutEventArgs(new Control(), "affectedProperty") };
System\Windows\Forms\UserControlTests.cs (14)
314using Control parent = new(); 362using Control parent = new(); 469_layoutEngine = new Control().LayoutEngine; 520using Control parent = new(); 1262using Control child1 = new(); 1263using Control grandchild1 = new(); 1266using Control grandchild2 = new(); 1488using Control child1 = new(); 1489using Control grandchild1 = new(); 1492using Control grandchild2 = new(); 1722using Control child1 = new(); 1723using Control child2 = new(); 1752using Control child1 = new(); 1753using Control child2 = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (3)
356using Control childControl = new(); 383using Control childControl = new(); 394using Control childControl = new();
System\Windows\Forms\WebBrowserContainerTests.cs (3)
16using Control control = new() 33using Control control = new() 98using Control control = new()
System\Windows\Forms\WebBrowserTests.cs (136)
161using Control parent = new(); 189using Control parent = new(); 228using Control parent = new(); 242using Control parent = new(); 254using Control parent = new(); 292using Control parent = new(); 328using Control parent = new(); 341using Control parent = new(); 353using Control parent = new(); 373using Control parent = new(); 398using Control parent = new(); 412using Control parent = new(); 440using Control parent = new(); 456using Control parent = new(); 478using Control parent = new(); 490using Control parent = new(); 511using Control parent = new(); 525using Control parent = new(); 546using Control parent = new(); 558using Control parent = new(); 570using Control parent = new(); 595using Control parent = new(); 607using Control parent = new(); 628using Control parent = new(); 642using Control parent = new(); 663using Control parent = new(); 675using Control parent = new(); 709using Control parent = new(); 732using Control parent = new(); 831using Control parent = new(); 843using Control parent = new(); 864using Control parent = new(); 881using Control parent = new(); 900using Control parent = new(); 912using Control parent = new(); 933using Control parent = new(); 947using Control parent = new(); 967using Control parent = new(); 979using Control parent = new(); 1000using Control parent = new(); 1014using Control parent = new(); 1033using Control parent = new(); 1045using Control parent = new(); 1066using Control parent = new(); 1109using Control parent = new(); 1123using Control parent = new(); 1142using Control parent = new(); 1154using Control parent = new(); 1175using Control parent = new(); 1189using Control parent = new(); 1201using Control parent = new(); 1239using Control parent = new(); 1292using Control parent = new(); 1419using Control parent = new(); 1438using Control parent = new() 1460using Control parent = new(); 1480using Control parent = new(); 1499using Control parent = new() 1521using Control parent = new(); 1596using Control parent = new(); 1610using Control parent = new(); 1629using Control parent = new(); 1641using Control parent = new(); 1662using Control parent = new(); 1676using Control parent = new(); 1688using Control parent = new(); 1726using Control parent = new(); 1760using Control parent = new(); 1773using Control parent = new(); 1811using Control parent = new(); 1847using Control parent = new(); 1861using Control parent = new(); 1880using Control parent = new(); 1892using Control parent = new(); 1913using Control parent = new(); 1927using Control parent = new(); 1946using Control parent = new(); 1958using Control parent = new(); 1970using Control parent = new(); 2065using Control parent = new(); 2096using Control parent = new(); 2108using Control parent = new(); 2120using Control parent = new(); 2278using Control parent = new(); 2358using Control parent = new(); 2385using Control parent = new(); 2443using Control parent = new(); 2463using Control parent = new(); 2487using Control parent = new(); 2574using Control parent = new(); 2677using Control parent = new(); 2721using Control parent = new(); 2866using Control parent = new(); 2887using Control parent = new(); 2967using Control parent = new(); 2989using Control parent = new(); 3004using Control parent = new(); 3082using Control parent = new(); 3104using Control parent = new(); 3119using Control parent = new(); 3131using Control parent = new(); 3153using Control parent = new(); 3168using Control parent = new(); 3180using Control parent = new(); 3192using Control parent = new(); 3281using Control parent = new(); 3304using Control parent = new(); 3399using Control parent = new(); 3422using Control parent = new(); 3470using Control parent = new(); 3486using Control parent = new(); 3604Control parent = new(); 3644using Control parent = new(); 3656using Control parent = new(); 3921using Control parent = new(); 3943using Control parent = new(); 3958using Control parent = new(); 4016using Control parent = new(); 4088using Control parent = new(); 4105using Control parent = new(); 4165using Control parent = new(); 4223using Control parent = new(); 4246using Control parent = new(); 4261using Control parent = new(); 4283using Control parent = new(); 4298using Control parent = new(); 4320using Control parent = new(); 4335using Control parent = new(); 4357using Control parent = new(); 4372using Control parent = new(); 4394using Control parent = new(); 4409using Control parent = new(); 4431using Control parent = new(); 4446using Control parent = new(); 4525using Control control = new(); 4599using Control control = new();
TextBoxBaseTests.cs (10)
287using Control parent = new(); 581using Control parent = new(); 2008using Control parent = new(); 2067using Control parent = new(); 3727using Control parent = new(); 3777using Control parent = new(); 5863using Control parent = new(); 6042using Control parent = new(); 6974using Control control = new(); 7055using Control control = new();
WebBrowserBaseTests.cs (2)
239using Control parent = new(); 814using Control parent = new()
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
145new LayoutEventArgs(new Control(), "affectedProperty")
5420 references to Control
ComDisabled.Tests (3)
DataObjectComTests.cs (3)
18dynamic controlAccessor = typeof(Control).TestAccessor.Dynamic; 40dynamic accessor = typeof(Control).TestAccessor.Dynamic; 58dynamic accessor = typeof(Control).TestAccessor.Dynamic;
DemoConsole (16)
DesignSurfaceExtended.cs (11)
82where TControl : Control, IComponent 113Control ctrl = null; 117ctrl = View as Control; 127ctrl = View as Control; 137ctrl = View as Control; 155where TControl : Control 180((Control)newComp).Parent = host.RootComponent as Control; 229public Control GetView() 231Control ctrl = View as Control;
IDesignSurfaceExtended.cs (3)
22where TControl : Control, IComponent; 25where TControl : Control; 37Control GetView();
MainForm.cs (2)
47((Control)(designSurfaceExtended as DesignSurface).View).KeyUp += (s, e) => 444Control view = surface.GetView();
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
36Control? control = null;
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
36Control? control = null;
Microsoft.AspNetCore.Components.WebView.WindowsForms (9)
BlazorWebView.cs (7)
61 /// <inheritdoc cref="Control.OnCreateControl" /> 268 /// <inheritdoc cref="Control.Dispose(bool)" /> 289 /// <inheritdoc cref="Control.CreateControlsInstance" /> 326 internal void AddInternal(Control value) => base.Add(value); 331 public override void Add(Control? value) => throw new NotSupportedException(); 333 public override void Remove(Control? value) => throw new NotSupportedException(); 334 public override void SetChildIndex(Control child, int newIndex) => throw new NotSupportedException();
WindowsFormsDispatcher.cs (2)
20 private readonly Control _dispatchThreadControl; 28 public WindowsFormsDispatcher(Control dispatchThreadControl)
Microsoft.VisualBasic.Forms.Tests (1)
System\Windows\Forms\CompilerServicesTests.vb (1)
18vbHost.GetParentWindow.Should.BeOfType(Of Control)()
PresentationUI (7)
MS\Internal\Documents\Application\DocumentPropertiesDialog.cs (2)
139private void SetTextProperty(Control control, string text) 153private void SetTextProperty(Control control, DateTime? date)
MS\Internal\Documents\DialogBaseForm.cs (3)
93private void ApplyDialogFont(Control control) 96foreach (Control c in control.Controls) 134private void ApplyDialogFontToPropertyGrid(Control control)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
269System.Windows.Forms.Control rmPublishingDialog = 270System.Windows.Forms.Control.FromHandle(hWndParent) as RMPublishingDialog;
System.Windows.Forms (1017)
src\Common\src\Obsoletions.cs (1)
17internal const string DomainUpDownAccessibleObjectMessage = $"DomainUpDownAccessibleObject is no longer used to provide accessible support for {nameof(DomainUpDown)} controls. Use {nameof(Control.ControlAccessibleObject)} instead.";
System\Windows\Forms\Accessibility\AccessibleObject.cs (3)
274/// Note that the default behavior for <see cref="Control"/> is that it calls base from its override in 275/// <see cref="Control.ControlAccessibleObject"/>. <see cref="Control.ControlAccessibleObject"/> always
System\Windows\Forms\Accessibility\AccessibleObject.EnumVariantObject.cs (1)
155/// <see cref="Control.Controls"/> collection).
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (3)
307where TAccessible : AccessibleObject, IOwnedObject<Control> 319string? defaultName = null) where TAccessible : AccessibleObject, IOwnedObject<Control> 326where TAccessible : AccessibleObject, IOwnedObject<Control>
System\Windows\Forms\Accessibility\AccessibleRoles.cs (1)
10/// If adding to this enumeration please update <see cref="Control.AccessibleRole"/> and
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (26)
17public class ControlAccessibleObject : AccessibleObject, IOwnedObject<Control> 29private readonly WeakReference<Control> _ownerControl; 31public ControlAccessibleObject(Control ownerControl) 36internal ControlAccessibleObject(Control ownerControl, int accObjId) 57=> this.TryGetOwnerAs(out Control? owner) ? owner.Name : string.Empty; 64if (!this.TryGetOwnerAs(out Control? owner) || owner.ToolStripControlHost is not ToolStripControlHost host) 84=> this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.ContainerControl) 121if (!this.TryGetOwnerAs(out Control? owner)) 130Control? parentControl = owner.ParentInternal; 134Control[]? ctrls = null; 231/// the <see cref="Control.Handle"/> property of the <see cref="Owner"/> it is associated with. 274if (this.TryGetOwnerAs(out Control? owner) 288&& (!this.TryGetOwnerAs(out Control? owner) 311if (this.TryGetOwnerAs(out Control? owner) && owner.AccessibleName is { } name) 324if (this.TryGetOwnerAs(out Control? owner)) 348if (this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.UseTextForAccessibility)) 381public Control? Owner => _ownerControl.TryGetTarget(out Control? owner) ? owner : null; 393if (!this.TryGetOwnerAs(out Control? owner) || owner.ParentInternal is not { } parent) 405for (Control? previous = container.GetNextControl(owner, false); 437if (!this.TryGetOwnerAs(out Control? owner) 454&& (!this.TryGetOwnerAs(out Control? owner) 490if (this.TryGetOwnerAs(out Control? owner)) 501=> (this.TryGetOwnerAs(out Control? owner) && owner.SupportsUiaProviders && patternId == UIA_PATTERN_ID.UIA_LegacyIAccessiblePatternId) 529=> this.IsOwnerHandleCreated(out Control? _) && base.RaiseAutomationEvent(eventId); 532=> this.IsOwnerHandleCreated(out Control? _)
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
16public LabelEditAccessibleObject(Control owningControl, LabelEditNativeWindow labelEdit)
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (3)
13private readonly WeakReference<Control> _owningControl; 28public LabelEditNativeWindow(Control owningControl) 85if (_owningControl.TryGetTarget(out Control? target) && !target.IsAccessibilityObjectCreated)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (4)
27private readonly WeakReference<Control> _owningControl; 29public LabelEditUiaTextProvider(Control owner, LabelEditNativeWindow childEdit, AccessibleObject childEditAccessibilityObject) 60public override LOGFONTW Logfont => _owningControl.TryGetTarget(out Control? target) ? target.Font.ToLogicalFont() : default; 179if (IsDegenerate(_owningControl.TryGetTarget(out Control? target) ? target.ClientRectangle : Rectangle.Empty))
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (15)
33private HashSet<Control>? _components; 34private Dictionary<Control, ExtenderProxy>? _extenderCache; 82internal ExtenderProxy? GetExtenderProxyForControl(Control control) 119internal static string GetNameForControl(Control control) 158internal IEnumUnknown.Interface EnumControls(Control control, uint dwOleContF, ENUM_CONTROLS_WHICH_FLAGS dwWhich) 163Control? additionalControl; 196Control[] controls = []; 286private void MaybeAdd(List<object> controls, Control control, bool selected, OLECONTF flags, bool allowContainingControls) 324if (component is Control control && component != _parent && component.Site is not null) 354void GetAllChildren(Control control) 363foreach (Control child in control.Controls) 370private HashSet<Control> GetComponents() 425internal static AxContainer? FindContainerForControl(Control control) 535foreach (Control control in GetComponents()) 586foreach (Control control in GetComponents())
System\Windows\Forms\ActiveX\AxHost.AxContainer.ExtenderProxy.cs (5)
15/// Provides an <see cref="IDispatch"/> and <see cref="IDispatchEx"/> view of <see cref="Control"/> 26private readonly WeakReference<Control> _control; 30internal ExtenderProxy(Control control, AxContainer container) 39private Control? GetControl() 41_control.TryGetTarget(out Control? target);
System\Windows\Forms\ActiveX\AxHost.cs (9)
1597Control? control = container?.ActiveControl; 1934/// The <see cref="ContainingControl"/> property value can be different from the <see cref="Control.Parent"/> 1938/// property value of the ActiveX control is the <see cref="Form"/>, and the <see cref="Control.Parent"/> 1992Control? control = this; 2075Control? richParent = ParentInternal; 2119Control? control = this; 2146Control? parent = ParentInternal; 3002public unsafe void ShowPropertyPages(Control? control) 3323Control? parent = ParentInternal;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (8)
124private readonly Control _control; 151internal ActiveXImpl(Control control) 354Control target = _control; 367Control? realTarget = target.GetChildAtPoint(pt); 710private static void GetMnemonicList(Control control, List<char> mnemonicList) 720foreach (Control c in control.Controls) 1221private static void CallParentPropertyChanged(Control control, string propName) 1861Control? target = FromChildHandle(lpmsg->hwnd);
System\Windows\Forms\Application.cs (2)
952/// Enables visual styles for all subsequent <see cref="Run()"/> and <see cref="Control.CreateHandle"/> calls. 1378Control.UseCompatibleTextRenderingDefault = defaultValue;
System\Windows\Forms\Application.MarshallingControl.cs (1)
12/// on the correct thread via <see cref="Control.Invoke(Action)"/>.
System\Windows\Forms\Application.ModalApplicationContext.cs (2)
22Control? parentControl = null; 32parentControl = Control.FromHandle(parentHandle);
System\Windows\Forms\Application.ThreadContext.cs (9)
42private Control? _marshallingControl; 52private WeakReference<Control>? _activatingControlRef; 161internal Control? ActivatingControl 163get => _activatingControlRef?.TryGetTarget(out Control? target) ?? false ? target : null; 170internal Control MarshallingControl 936Control? target = Control.FromChildHandle(msg.hwnd); 946if (Control.PreProcessControlMessageInternal(target, ref m) == PreProcessControlState.MessageProcessed) 955if (Control.PreProcessControlMessageInternal(target, ref m) == PreProcessControlState.MessageProcessed)
System\Windows\Forms\Application.ThreadWindows.cs (3)
35if (!_onlyWinForms || Control.FromHandle(hwnd) is not null) 51Control.FromHandle(hwnd)?.Dispose(); 62Control? activatingControl = ThreadContext.FromCurrent().ActivatingControl;
System\Windows\Forms\BoundsSpecified.cs (4)
40/// Both <see cref="Control.Width"/> and <see cref="Control.Height"/> 46/// Both <see cref="Control.Location"/> and <see cref="Control.Size"/>
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (3)
36_lastFont = Control.DefaultFont; 59_lastFont = Control.DefaultFont; 67managedValue ??= Control.DefaultFont;
System\Windows\Forms\ContextMenuStrip.cs (2)
37public Control? SourceControl 82internal void ShowInternal(Control source, Point location, bool isKeyboardActivated)
System\Windows\Forms\Control.ControlCollection.cs (21)
24public ControlCollection(Control owner) 42public virtual void Add(Control? value) 96Control? oldParent = value._parent; 127if (control is Control c) 139public virtual void AddRange(params Control[] controls) 166public bool Contains(Control? control) => ((IList)InnerList).Contains(control); 172public Control[] Find(string key, bool searchAllChildren) 176List<Control> foundControls = []; 185private static void FindInternal(string key, bool searchAllChildren, ControlCollection controlsToLookIn, List<Control> foundControls) 232public int IndexOf(Control? control) => ((IList)InnerList).IndexOf(control); 280public Control Owner { get; } 286public virtual void Remove(Control? value) 314if (control is Control c) 340public new virtual Control this[int index] 348Control control = (Control)InnerList[index]!; 357public virtual Control? this[string? key] 397public int GetChildIndex(Control child) => GetChildIndex(child, true); 403public virtual int GetChildIndex(Control child, bool throwException) 418internal virtual void SetChildIndexInternal(Control child, int newIndex) 445public virtual void SetChildIndex(Control child, int newIndex) =>
System\Windows\Forms\Control.ControlNativeWindow.cs (3)
12private readonly Control _control; 15internal ControlNativeWindow(Control control) 21internal Control GetControl()
System\Windows\Forms\Control.ControlTabOrderHolder.cs (1)
12private readonly record struct ControlTabOrderHolder(int OriginalIndex, int TabIndex, Control? Control)
System\Windows\Forms\Control.ControlVersionInfo.cs (2)
16private readonly Control _owner; 18internal ControlVersionInfo(Control owner)
System\Windows\Forms\Control.cs (126)
249private Control? _parent; 250private WeakReference<Control>? _reflectParent; 302/// Initializes a new instance of the <see cref="Control"/> class. 396/// Initializes a new instance of the <see cref="Control"/> class. 403/// Initializes a new instance of the <see cref="Control"/> class. 411/// Initializes a new instance of the <see cref="Control"/> class. 413public Control(Control? parent, string? text) : this() 420/// Initializes a new instance of the <see cref="Control"/> class. 422public Control(Control? parent, string? text, int left, int top, int width, int height) : this(parent, text) 496/// of Control inheritance in WinForms. The constructor of <see cref="Control"/> calls <see cref="CreateParams"/>, 503/// and related logic may be triggered during the base <see cref="Control"/> construction process, before the 876Control? parent = ParentInternal; 1044Control? parent = ParentInternal; 1485if (container.ParentInternal is not Control parent 1708Control? control = ParentInternal; 2254Control topMost = TopMostParent; 2320Control? parent = ParentInternal; 2382Control control; 2389Control marshalingControl = FindMarshalingControl(); 2433private static ISite? GetSitedParentSite(Control control) 2701public Control? Parent 2707internal virtual Control? ParentInternal 2779private Control? ReflectParent 2781get => _reflectParent?.TryGetTarget(out Control? parent) ?? false ? parent : null; 2786Control? existing = ReflectParent; 3232for (Control? control = this; control is not null; control = control.ParentInternal) 3276public Control? TopLevelControl => TopLevelControlInternal; 3278internal Control? TopLevelControlInternal 3282Control? control = this; 3292internal Control TopMostParent 3296Control control = this; 4232internal virtual void AssignParent(Control? value) 4371Control marshaler = FindMarshalingControl(); 4425for (Control? ctl = this; ctl is not null; ctl = ctl._parent) 4440internal static void CheckParentingCycle(Control? bottom, Control? toFind) 4443Control? lastParent = null; 4445for (Control? ctl = bottom; ctl is not null; ctl = ctl.ParentInternal) 4478private void ChildGotFocus(Control child) 4491public bool Contains([NotNullWhen(true)] Control? ctl) 4670Control[] controlSnapshot = new Control[children.Count]; 4673foreach (Control control in controlSnapshot) 4768/// Disposes of the resources (other than memory) used by the <see cref="Control"/>. 4830Control child = children[i]; 5053Control marshaler = FindMarshalingControl(); 5099Control? current = this; 5114private Control FindMarshalingControl() 5118Control? c = this; 5122Control? p = c.ParentInternal; 5223public static Control? FromChildHandle(IntPtr handle) 5228Control? control = FromHandle(hwnd); 5242/// it with the first parent <see cref="Control"/> if possible. 5250public static Control? FromHandle(IntPtr handle) 5299public Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) 5310Control? control = FromChildHandle(hwnd); 5323public Control? GetChildAtPoint(Point pt) => GetChildAtPoint(pt, GetChildAtPointSkip.None); 5331Control? c = IsContainerControl ? ParentInternal : this; 5341private static bool IsFocusManagingContainerControl(Control ctl) 5440Control? control = this; 5471Control? ctl = FromHandle(hWndChild); 5493internal Control[] GetChildControlsInTabOrder(bool handleCreatedOnly) 5497foreach (Control c in Controls) 5507Control[] controls = new Control[holders.Count]; 5516internal virtual Control? GetFirstChildControlInTabOrder(bool forward) 5523Control? found = null; 5599public Control? GetNextControl(Control? ctl, bool forward) 5610Control? found = ctl.GetFirstChildControlInTabOrder(forward: true); 5621Control? found = null; 5622Control? p = ctl._parent; 5684Control? found = null; 5685Control? parent = ctl._parent ?? throw new InvalidOperationException( 5705Control sibling = siblings[c]; 5765Control? found = ctl.GetFirstChildControlInTabOrder(forward: false); 5782/// Return <see cref="Handle"/> if <paramref name="window"/> is a <see cref="Control"/>. 5788if (window is Control control) 6062Control marshaler = FindMarshalingControl(); 6256protected void InvokePaint(Control c, PaintEventArgs e) 6261protected void InvokePaintBackground(Control c, PaintEventArgs e) 6272/// Returns <see langword="true"/> if <paramref name="descendant"/> is a descendant of this <see cref="Control"/>. 6274internal bool IsDescendant(Control? descendant) 6276Control? control = descendant; 6418private static bool IsScaledByParent(Control control) 6420Control? parentControl = control.Parent; 6476private object MarshaledInvoke(Control caller, Delegate method, object?[]? args, bool synchronous) 6649protected void InvokeOnClick(Control? toInvoke, EventArgs e) 6779internal virtual void OnChildLayoutResuming(Control child, bool performLayout) 7081Control? parent = ParentInternal; 7257Control child = children[i]; 7645protected void InvokeGotFocus(Control? toInvoke, EventArgs e) 7803protected void InvokeLostFocus(Control? toInvoke, EventArgs e) 8266Control? parent = ParentInternal; 8396for (Control? c = ParentInternal; c is not null; c = c.ParentInternal) 8434public void PerformLayout(Control? affectedControl, string? affectedProperty) 8550foreach (Control c in Controls) 8683/// on the <see cref="Control"/> referenced by the <paramref name="msg"/> <see cref="Message.HWnd"/>. It 8698internal static PreProcessControlState PreProcessControlMessageInternal(Control? target, ref Message message) 8845Control child = Controls[i]; 9048Control? topMostParent = null; 9247Control?[]? controlSnapshot = null; 9260controlSnapshot = new Control[children.Count]; 9264Control childControl = children[i]; 9324Control? childControl = controlSnapshot[i]; 9545Control child = children[i]; 9662internal virtual void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9698internal void ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9707Control child = children[i]; 9963public bool SelectNextControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9965Control? nextSelectableControl = GetNextSelectableControl(ctl, forward, tabStopOnly, nested, wrap); 9977private Control? GetNextSelectableControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9985Control? start = ctl; 10036((Control)c).SelectNextControl(this, true, true, true, true); 10542internal static AutoValidate GetAutoValidateForControl(Control control) 10943private void UpdateChildControlIndex(Control control) 10950if (this is TabControl || GetType() == typeof(Control)) 10960Control? previousControl = FromHandle(hWnd); 11019private void UpdateChildZOrder(Control control) 11029Control child = Controls[i]; 11204internal void WmContextMenu(ref Message m, Control sourceControl) 11244Control? control = FromHandle(m.LParamInternal); 12854Control? controlParent = ParentInternal; 12871void AddIfCreated(Control? control) 12930internal virtual ToolInfoWrapper<Control> GetToolInfoWrapper(TOOLTIP_FLAGS flags, string? caption, ToolTip tooltip)
System\Windows\Forms\Control.ExtendedStates.cs (3)
46/// so that <see cref="PreProcessControlMessageInternal(Control, ref Message)"/> doesn't call it again. 52/// so that <see cref="PreProcessControlMessageInternal(Control, ref Message)"/> doesn't call it again. 57/// Used by <see cref="PreProcessControlMessageInternal(Control, ref Message)"/> to avoid calling
System\Windows\Forms\Control.Ime.cs (3)
46Control? parent = ParentInternal; 175Control? ctl = null; 636Control topMostWinformsParent = TopMostParent;
System\Windows\Forms\Control.SuspendLayoutScope.cs (2)
10private readonly Control? _control; 17public SuspendLayoutScope(Control? control, bool performLayout = true)
System\Windows\Forms\Control.ThreadMethodEntry.cs (4)
13internal Control _caller; 14internal Control _marshaler; 32Control caller, 33Control marshaler,
System\Windows\Forms\ControlEventArgs.cs (2)
14public ControlEventArgs(Control? control) 22public Control? Control { get; }
System\Windows\Forms\Controls\Buttons\Button.ButtonAccessibleObject.cs (2)
19=> this.TryGetOwnerAs(out Control? owner) && owner.AccessibleRole == AccessibleRole.Default 22UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\Buttons\Button.cs (4)
43/// Allows the control to optionally shrink when <see cref="Control.AutoSize"/> is <see langword="true"/>. 188/// Raises the <see cref="Control.OnMouseEnter"/> event. 193/// Raises the <see cref="Control.OnMouseLeave"/> event. 301/// Generates a <see cref="Control.Click"/> event for a button.
System\Windows\Forms\Controls\Buttons\ButtonBase.ButtonBaseAccessibleObject.cs (2)
10public ButtonBaseAccessibleObject(Control owner) 30internal static string? GetKeyboardShortcut(Control control, bool useMnemonic, Label? previousLabel)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (7)
181/// method will be called when the <see cref="Control.Click"/> event gets invoked. 651/// or may have flicker. Returning <see cref="Control.ClientRectangle"/> is safe for correct painting but may 689/// or may have flicker. Returning <see cref="Control.ClientRectangle"/> is safe for correct painting but may 889/// Raises the <see cref="Control.OnMouseEnter"/> event. 905/// Raises the <see cref="Control.OnMouseLeave"/> event. 919/// Raises the <see cref="Control.OnMouseMove"/> event. 950/// Raises the <see cref="Control.OnMouseDown"/> event.
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (1)
74internal static double GetDpiScaleRatio(Control? control) =>
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
140Control? control = null)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (2)
32if (Control.ForeColor != Forms.Control.DefaultForeColor) 56if (Control.BackColor != Forms.Control.DefaultBackColor)
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (2)
53public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 56internal static void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl)
System\Windows\Forms\Controls\Buttons\CheckBox.CheckBoxAccessibleObject.cs (2)
11public class CheckBoxAccessibleObject(Control owner) : ButtonBaseAccessibleObject((owner is CheckBox) 49UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (2)
38/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 39public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl)
System\Windows\Forms\Controls\Buttons\IButtonControl.cs (1)
24/// Generates a <see cref="Control.Click"/> event for the control.
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
504/// Generates a <see cref="Control.Click"/> event for the button, simulating a click by a user.
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (2)
39/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 40public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2811/// Raises the <see cref="Control.Resize"/> event.
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (3)
19? VisualStyleElement.CreateElement($"{Control.DarkModeIdentifier}_{Control.ComboBoxButtonThemeIdentifier}::{Control.ComboboxClassIdentifier}", 1, 1)
System\Windows\Forms\Controls\DataGridView\DataGridView.ControlCollection.cs (4)
20public void CopyTo(Control[] array, int index) 25public void Insert(int index, Control value) 30public override void Remove(Control? value) 43internal void RemoveInternal(Control value)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (3)
268private Control? _latestEditingControl; 269private Control? _cachedEditingControl; 2229public Control? EditingControl { get; private set; }
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
1511internal override void AssignParent(Control? value) 2666EditingControl = (Control)Activator.CreateInstance(editControlType)!;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
565Control.MouseButtons == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
355internal virtual bool IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown();
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
918Control.MouseButtons == MouseButtons.Left) 989if (DataGridView.IsAccessibilityObjectCreated && DataGridView.AccessibilityObject is Control.ControlAccessibleObject accessibleObject)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1792bool newMouseInDropDownButtonBounds = dropDownButtonRect.Contains(DataGridView.PointToClient(Control.MousePosition));
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.DataGridViewComboBoxEditingControlAccessibleObject.cs (1)
36if (this.TryGetOwnerAs(out Control? owner) && owner is IDataGridViewEditingControl editingControl
System\Windows\Forms\Controls\DataGridView\DataGridViewEditingControlShowingEventArgs.cs (2)
10public DataGridViewEditingControlShowingEventArgs(Control control, DataGridViewCellStyle cellStyle) 16public Control Control { get; }
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
470Control.MouseButtons == MouseButtons.Left &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
157s_defaultHeight = Control.DefaultFont.Height + 9;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObject.cs (1)
42if (this.TryGetOwnerAs(out Control? owner) && owner is IDataGridViewEditingControl editingControl
System\Windows\Forms\Controls\DataGridView\IDataGridColumnStyleEditingNotificationService.cs (1)
8void ColumnStartedEditing(Control editingControl);
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (1)
50public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl)
System\Windows\Forms\Controls\Labels\Label.cs (2)
659get => ((Control)this).RenderTransparent; 1362Control? parent = ParentInternal;
System\Windows\Forms\Controls\ListView\ListView.cs (2)
3514internal override unsafe ToolInfoWrapper<Control> GetToolInfoWrapper(TOOLTIP_FLAGS flags, string? caption, ToolTip tooltip) 3521ToolInfoWrapper<Control> wrapper = new(this, flags, isExternalTooltip ? null : caption);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
399return Control.DefaultFont;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (2)
68bool IKeyboardToolTip.IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown(); 70bool IKeyboardToolTip.IsHoveredWithMouse() => _listView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
150return _owner?._listView?.Font ?? Control.DefaultFont;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarChildAccessibleObject.cs (1)
61!_monthCalendarAccessibleObject.TryGetOwnerAs(out Control? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (5)
1958private static void DrawXorBar(Control targetControl, Rectangle rcFrame) 2193internal Control? GetElementFromPoint(Point point) 2391if (ShouldForwardChildMouseMessage((Control?)sender, e, ref newPoint)) 2407if (ShouldForwardChildMouseMessage((Control?)sender, e, ref newPoint)) 4090private bool ShouldForwardChildMouseMessage(Control? child, MouseEventArgs e, ref Point point)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyGridAccessibleObject.cs (1)
31Control? element = owningPropertyGrid.GetElementFromPoint(clientPoint);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1478return Control.DefaultFont;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (2)
50foreach (Control control in Controls) 313Control? parent = _detailsButton.Parent;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (10)
8private readonly Control[] _controls; 13internal GridToolTip(Control[] controls) 63ToolInfoWrapper<Control> info = GetTOOLINFO(_controls[i]); 96private ToolInfoWrapper<Control> GetTOOLINFO(Control c) 99private void OnControlCreateHandle(object? sender, EventArgs e) => SetupToolTip((Control?)sender); 105GetTOOLINFO((Control)sender).SendMessage(this, PInvoke.TTM_DELTOOLW); 121private void SetupToolTip(Control? control) 131ToolInfoWrapper<Control> info = GetTOOLINFO(control); 157ToolInfoWrapper<Control> info = GetTOOLINFO(_controls[i]);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.HelpPaneAccessibleObject.cs (1)
54if (this.TryGetOwnerAs(out Control? owner))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (16)
84private Control? _currentEditor; 893private void CommonEditorSetup(Control control) 899private void CommonEditorUse(Control control, Rectangle targetRectangle) 1429public void DropDownControl(Control control) 1522Control? control = _dropDownHolder.Component; 2066private bool IsMyChild(Control? control) 2073Control? parent = control.ParentInternal; 2102internal static bool IsSiblingControl(Control control1, Control control2) 2104Control? parent1 = control1.ParentInternal; 2105Control? parent2 = control2.ParentInternal; 2648private bool OnEscape(Control sender) 3815internal static void PositionTooltip(Control parent, GridToolTip toolTip, Rectangle itemRect) 3871Control? focusedControl = FromHandle(PInvoke.GetFocus()); 4355Control button = needsDropDownButton ? DropDownButton : DialogButton; 4885Control topControl = this;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
15private Control? _currentControl; // the control that is hosted in the holder 176public Control? Component => _currentControl; 553public void SetDropDownControl(Control? control, bool resizable)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObject.cs (1)
70UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (3)
13private readonly Control _control; 25public MouseHook(Control control, IMouseHookClient client, PropertyGridView gridView) 165&& FromHandle(hwnd) is Control targetControl
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
25=> this.IsOwnerHandleCreated(out Control? _) ? HitTest((int)x, (int)y) : null;
System\Windows\Forms\Controls\Splitter\Splitter.cs (11)
32private Control? _splitTarget; 555private Rectangle CalcSplitLine(Control splitTarget, int splitSize, int minWeight) 603Control? target = FindTarget(); 624Control? target = FindTarget(); 640Control? parent = ParentInternal; 651Control ctl = children[i]; 712private Control? FindTarget() 714Control? parent = ParentInternal; 725Control target = children[i]; 768private int GetSplitSize(Control splitTarget, int x, int y) 955private void SplitMove(Control splitTarget, int x, int y)
System\Windows\Forms\Controls\Splitter\Splitter.SplitData.cs (1)
15internal Control? _target;
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (3)
10public new class ControlCollection : Control.ControlCollection 19public override void Add(Control? value) 66public override void Remove(Control? value)
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
955protected override Control.ControlCollection CreateControlsInstance() 1051public Control GetControl(int index)
System\Windows\Forms\Controls\TabControl\TabPage.cs (4)
489internal override void AssignParent(Control? value) 505Control? c = comp as Control; 732Control? parent = ParentInternal;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageControlCollection.cs (1)
27public override void Add(Control? value)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (3)
1836/// Raises the <see cref="Control.KeyDown"/> event. 1948/// Raises the <see cref="Control.KeyPress"/> event. 2017/// Raises the <see cref="Control.KeyUp"/> event.
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (3)
73=> this.TryGetOwnerAs(out Control? owner) && owner.Text is { } text ? text : string.Empty; 77if (!this.IsOwnerHandleCreated(out Control? _)) 89if (this.TryGetOwnerAs(out Control? owner))
System\Windows\Forms\Controls\ToolStrips\OpacityConverter.cs (1)
48if (!Control.UseComponentModelRegisteredTypes)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
140private Control RTLGrip
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
2425internal virtual Control GetOwnerControl() 3851public new Control? GetChildAtPoint(Point point) => base.GetChildAtPoint(point); 3854public new Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) => base.GetChildAtPoint(pt, skipValue); 3859internal override Control? GetFirstChildControlInTabOrder(bool forward) => null; 4001Control? control = FromHandle(_hwndThatLostFocus);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (1)
194bool ShouldItemBeSkipped(Control hostedControl)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (3)
39public ToolStripComboBox(Control c) 404protected override void OnSubscribeControlEvents(Control? control) 420protected override void OnUnsubscribeControlEvents(Control? control)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (3)
379foreach (Control c in Controls) 385foreach (Control c in Controls) 396foreach (Control c in Controls)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerTypedControlCollection.cs (3)
22public override void Add(Control? value) 43public override void Remove(Control? value) 59internal override void SetChildIndexInternal(Control child, int newIndex)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (7)
16private Control _control; 34public ToolStripControlHost(Control c) 50public ToolStripControlHost(Control c, string name) 121public Control Control => _control; 126private Control ControlInternal 706protected virtual void OnSubscribeControlEvents(Control? control) 751protected virtual void OnUnsubscribeControlEvents(Control? control)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.ToolStripHostedControlAccessibleObject.cs (3)
16public class ToolStripHostedControlAccessibleObject : Control.ControlAccessibleObject 19private readonly Control _toolStripHostedControl; 26public ToolStripHostedControlAccessibleObject(Control toolStripHostedControl, ToolStripControlHost? toolStripControlHost) : base(toolStripHostedControl)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (6)
751internal Control? SourceControlInternal 753get => Properties.GetValueOrDefault<Control>(s_propSourceControl); 1475foreach (Control control in Controls) 1813public void Show(Control control, Point position) 1829public void Show(Control control, Point position, ToolStripDropDownDirection direction) 1838public void Show(Control control, int x, int y)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
131if ((Control.ModifierKeys != Keys.Alt) && 152if ((Control.ModifierKeys != Keys.Alt) &&
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
106return (Control.MouseButtons == MouseButtons.Left) && (Control.ModifierKeys == Keys.None);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
520Control? parent = ParentInternal; 526return Control.DefaultBackColor; 874Control? parent = ParentInternal; 880return Control.DefaultForeColor; 2060if (Control.ModifierKeys == Keys.Alt) 3589=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3627internal virtual bool IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown();
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
94/// <see cref="Control.Handle" /> is not.
System\Windows\Forms\Controls\ToolStrips\ToolStripItemClickedEventHandler.cs (3)
7/// Represents a method that will handle the <see cref="Control.MouseDown"/>, 8/// <see cref="Control.MouseUp"/> or <see cref="Control.MouseMove"/> events of a form,
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (14)
56return Control.DefaultFont; 105sysFont ??= Control.DefaultFont; 260private static bool IsOnSameWindow(Control control1, Control control2) 570internal static ToolStripPanel? ToolStripPanelFromPoint(Control draggedControl, Point screenLocation) 748Control? activeControl = Control.FromChildHandle(m.HWnd); 749Control? activeControlInChain = activeControl; 838if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 881Control? intendedControl = Control.FromHandle(m.HWnd); 882Control? toplevelControl = null; 951internal static MenuStrip? GetMainMenuStrip(Control control) 970private static MenuStrip? GetFirstMenuStripRecursive(Control.ControlCollection controlsToLookIn)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (13)
83Control? control = null; 88control = Control.FromHandle(_activeHwnd.Handle); 95control = Control.FromHandle(_activeHwnd.Handle); 135ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive); 191Control? control = Control.FromHandle(ActiveHwnd.Handle); 251ActiveHwndInternal = new(sender as Control); 258if (Control.FromHandle(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown) 405ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive); 528var activeWindowHandle = Control.GetHandleRef(PInvoke.GetActiveWindow()); 538else if (Control.FromChildHandle(activeWindowHandle.Handle) is not ToolStripDropDown 567Control? control = Control.FromChildHandle(m.HWnd);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
123_targetWindowHandle = Control.GetSafeHandle(targetWindow); 199if (Control.UseComponentModelRegisteredTypes) 1083_targetWindowHandle = Control.GetSafeHandle(window); 1101if (!Control.UseComponentModelRegisteredTypes)
System\Windows\Forms\Controls\ToolStrips\ToolStripNumericUpDown.ToolStripNumericUpDownControl.ToolStripNumericUpDownAccessibleObject.cs (1)
15public ToolStripNumericUpDownAccessibleObject(Control toolStripHostedControl, ToolStripControlHost? toolStripControlHost)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (8)
482if (e.AffectedComponent != ParentInternal && e.AffectedComponent as Control is not null) 521Control[] controls = new Control[Controls.Count]; 526foreach (Control control in row.ControlsInternal) 620Control[] controlArray = new Control[controls.Count]; 1079foreach (Control c1 in Controls) 1081foreach (Control c2 in Controls)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.cs (1)
20internal override void AddInternal(Control? value)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.XYComparer.cs (4)
18Control? one = first as Control; 19Control? two = second as Control;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.YXComparer.cs (4)
19Control? one = first as Control; 20Control? two = second as Control;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (3)
35public ToolStripPanelCell(Control control) 40public ToolStripPanelCell(ToolStripPanelRow? parent, Control control) 72public Control Control
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (6)
72public Control[] Controls 76Control[] controls = new Control[ControlsInternal.Count]; 221internal Control ParentInternal 292protected internal virtual void OnControlAdded(Control control, int index) 316protected internal virtual void OnControlRemoved(Control control, int index)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
383protected internal override void OnControlAdded(Control control, int index) 387protected internal override void OnControlRemoved(Control control, int index)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (18)
39public ToolStripPanelRowControlCollection(ToolStripPanelRow owner, Control[] value) 45public new virtual Control this[int index] 72public int Add(Control value) 88public void AddRange(params Control[] value) 109public bool Contains(Control value) 147private Control GetControl(int index) 158private int IndexOfControl(Control c) 182void IList.Remove(object? value) { Remove((Control)value!); } 184int IList.Add(object? value) { return Add((Control)value!); } 186int IList.IndexOf(object? value) { return IndexOf((Control)value!); } 188void IList.Insert(int index, object? value) { Insert(index, (Control)value!); } 190public int IndexOf(Control value) 204public void Insert(int index, Control value) 220private void OnAfterRemove(Control control, int index) 249if (controlToBeDragged is Control control) 264public void Remove(Control value) 275Control control = GetControl(index); 282public void CopyTo(Control[] array, int index)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowManager.cs (3)
26foreach (Control control in Row.ControlsInternal) 184protected internal virtual void OnControlAdded(Control c, int index) 188protected internal virtual void OnControlRemoved(Control c, int index)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
390protected internal override void OnControlRemoved(Control c, int index) 394protected internal override void OnControlAdded(Control control, int index)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (3)
1117private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor) 1123private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation) 1137Control? parent = control.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (2)
250protected override void OnSubscribeControlEvents(Control? control) 261protected override void OnUnsubscribeControlEvents(Control? control)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1157internal static bool ShouldPaintBackground(Control control) =>
System\Windows\Forms\Controls\ToolStrips\ToolStripRendererSwitcher.cs (3)
21public ToolStripRendererSwitcher(Control owner, ToolStripRenderMode defaultRenderMode) : this(owner) 27public ToolStripRendererSwitcher(Control owner) 153if (sender is Control control)
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (7)
139foreach (Control c in toolStripPanel.Controls) 232private void FindControls<T>(bool searchAllChildren, Control.ControlCollection controlsToLookIn, List<T> foundControls) 233where T : Control 285private static void ResumeAllLayout(Control start, bool performLayout) 287Control.ControlCollection controlsCollection = start.Controls; 297private static void SuspendAllLayout(Control start) 301Control.ControlCollection controlsCollection = start.Controls;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (3)
47public ToolStripTextBox(Control c) 122protected override void OnSubscribeControlEvents(Control? control) 139protected override void OnUnsubscribeControlEvents(Control? control)
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (2)
43bool IKeyboardToolTip.IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown(); 45bool IKeyboardToolTip.IsHoveredWithMouse() => TreeView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2887internal override unsafe ToolInfoWrapper<Control> GetToolInfoWrapper(TOOLTIP_FLAGS flags, string? caption, ToolTip tooltip) 2894ToolInfoWrapper<Control> wrapper = new(this, flags, isExternalTooltip ? null : caption);
System\Windows\Forms\Controls\Unsupported\ContextMenu\ContextMenu.cs (4)
37public Control SourceControl => throw null; 55protected internal virtual bool ProcessCmdKey(ref Message msg, Keys keyData, Control control) => throw null; 57public void Show(Control control, Point pos) { } 59public void Show(Control control, Point pos, LeftRightAlignment alignment) { }
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (1)
534protected internal virtual void ColumnStartedEditing(Control editingControl) { }
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (2)
222void IDataGridColumnStyleEditingNotificationService.ColumnStartedEditing(Control editingControl) { } 224protected internal virtual void ColumnStartedEditing(Control editingControl) { }
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
327/// Handles the <see cref="Control.KeyPress"/>
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (8)
588/// Raises the <see cref="Control.KeyDown"/> event. 618/// Raises the <see cref="Control.KeyPress"/> event. 624/// Raises the <see cref="Control.LostFocus"/> event. 635/// Raises the <see cref="Control.Resize"/> event. 675/// Raises the <see cref="Control.OnMouseDown"/> event. 688/// Raises the <see cref="Control.OnMouseUp"/> event. 716/// Raises the <see cref="Control.OnMouseWheel"/> event. 898private MouseEventArgs TranslateMouseEvent(Control child, MouseEventArgs e)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (1)
101/// Raises the <see cref="Control.KeyUp"/> event.
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (3)
360/// <see cref="Control"/>. 465Control? parent = ParentInternal; 1140for (Control? control = this; control is not null; control = control.ParentInternal)
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (13)
21private readonly HashSet<Control> _containerCache = []; 22private HashSet<Control>? _components; 158HashSet<Control>? components = GetComponents(); 164foreach (Control ctl in components.ToArray()) 184private HashSet<Control>? GetComponents() 214if (comp is Control ctrl && comp != _parent && comp.Site is not null) 227Control[] ctls = [.. _containerCache]; 248private void GetAllChildren(Control ctl) 262foreach (Control c in ctl.Controls) 291if (sender == _associatedContainer && e.Component is Control c) 300internal void AddControl(Control ctl) 321internal void RemoveControl(Control ctl) 351internal static string GetNameForControl(Control ctl)
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
92internal static ISelectionService? GetSelectionService(Control ctl)
System\Windows\Forms\DataBinding\Binding.cs (3)
176public Control? Control => BindableComponent as Control; 185return component is not Control control || control.Created;
System\Windows\Forms\DataBinding\ControlBindingsCollection.cs (2)
26public Control? Control => _control as Control;
System\Windows\Forms\DataBinding\ICommandBindingTargetProvider.cs (1)
78/// also raises the <see cref="Control.Click"/> Event of that Button, which
System\Windows\Forms\Design\ComponentEditorForm.ComponentEditorPageSite.cs (3)
19internal Control _parent; 27internal ComponentEditorPageSite(Control parent, Type pageClass, IComponent component, ComponentEditorForm form) 97public Control GetControl()
System\Windows\Forms\Design\ComponentEditorPage.cs (1)
154public virtual Control GetControl() => this;
System\Windows\Forms\Design\IWindowsFormsEditorService.cs (1)
53void DropDownControl(Control control);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (3)
98Rectangle screen = Screen.GetWorkingArea(Control.MousePosition); 199ownerHwnd = Control.GetSafeHandle(owner); 204ownerHwnd = Control.GetHandleRef(PInvoke.GetActiveWindow());
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
728if (Control.CheckForIllegalCrossThreadCalls && Application.OleRequired() != ApartmentState.STA)
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
448if (Control.CheckForIllegalCrossThreadCalls && Application.OleRequired() != ApartmentState.STA)
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (2)
139Font? result = _font ?? Control.DefaultFont; 450private bool ShouldSerializeFont() => !Font.Equals(Control.DefaultFont);
System\Windows\Forms\Dialogs\MessageBox.cs (2)
459handle = owner is null ? Control.GetHandleRef(PInvoke.GetActiveWindow()) : Control.GetSafeHandle(owner);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
215if (Control.CheckForIllegalCrossThreadCalls && InvokeRequired)
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (2)
18private readonly Control _control; 24Control control,
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (2)
17private readonly Control _control; 29public ControlItem(ErrorProvider provider, Control control, IntPtr id)
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (18)
17[ProvideProperty("IconPadding", typeof(Control))] 18[ProvideProperty("IconAlignment", typeof(Control))] 19[ProvideProperty("Error", typeof(Control))] 25private readonly Dictionary<Control, ControlItem> _items = []; 26private readonly Dictionary<Control, ErrorWindow> _windows = []; 420if (errBindings[j].Control is Control control) 465Dictionary<Control, string> controlError = new(bindingsCount); 470if (errBindings[j].Control is not Control control) 498foreach (KeyValuePair<Control, string> entry in controlError) 671return extendee is Control and not Form; 702private ControlItem EnsureControlItem(Control control) 718internal ErrorWindow EnsureErrorWindow(Control parent) 736public string GetError(Control control) => EnsureControlItem(control).Error; 745public ErrorIconAlignment GetIconAlignment(Control control) => EnsureControlItem(control).IconAlignment; 754public int GetIconPadding(Control control) => EnsureControlItem(control).IconPadding; 772public void SetError(Control control, string? value) 796public void SetIconAlignment(Control control, ErrorIconAlignment value) 804public void SetIconPadding(Control control, int padding)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (2)
23private readonly Control _parent; 32public ErrorWindow(ErrorProvider provider, Control parent)
System\Windows\Forms\Form.AccessibleObject.cs (2)
21public override Rectangle Bounds => this.IsOwnerHandleCreated(out Control? owner) 26=> !this.IsOwnerHandleCreated(out Control? owner)
System\Windows\Forms\Form.ControlCollection.cs (3)
11public new class ControlCollection : Control.ControlCollection 29public override void Add(Control? value) 61public override void Remove(Control? value)
System\Windows\Forms\Form.cs (21)
542Control toLayout = DesignMode || ParentInternal is null ? this : ParentInternal; 1705internal override Control? ParentInternal 3155internal override void AssignParent(Control? value) 3304protected override Control.ControlCollection CreateControlsInstance() 3313internal override void AfterControlRemoved(Control control, Control oldParent) 3700Control? mdiclient = MdiParentInternal.MdiClient; 3872Control ctl = Controls[index]; 4133Control? activeControl = ActiveControl; 4315foreach (Control c in Controls) 4394Control button = (Control)AcceptButton; 4649foreach (Control c in Controls) 4744if (button is Control) 5161foreach (Control control in Controls) 5408/// Displays the form by setting its <see cref="Control.Visible"/> property to <see langword="true"/>. 5428/// This method makes the form visible by setting the <see cref="Control.Visible"/> property to <see langword="true"/>. 5471if (owner is Control ownerControl) 5502/// Displays the form asynchronously, by setting its <see cref="Control.Visible"/> property to <see langword="true"/>. 5512/// This method makes the form visible by setting the <see cref="Control.Visible"/> property to <see langword="true"/>. 5697if (owner is Control ownerControl)
System\Windows\Forms\GiveFeedbackEventArgs.cs (1)
11/// Provides data for the <see cref="Control.GiveFeedback"/> event.
System\Windows\Forms\GiveFeedbackEventHandler.cs (2)
7/// Represents a method that handles the <see cref="Control.GiveFeedback"/> 8/// event of a <see cref="Control"/>.
System\Windows\Forms\Help\Help.cs (10)
22public static void ShowHelp(Control? parent, string? url) 30public static void ShowHelp(Control? parent, string? url, HelpNavigator navigator) 38public static void ShowHelp(Control? parent, string? url, string? keyword) 53public static void ShowHelp(Control? parent, string? url, HelpNavigator command, object? parameter) 69public static void ShowHelpIndex(Control? parent, string? url) 77public static unsafe void ShowPopup(Control? parent, string caption, Point location) 102private static unsafe void ShowHTML10Help(Control? parent, string? url, HelpNavigator command, object? param) 137HandleRef<HWND> handle = parent is not null ? (new(parent)) : Control.GetHandleRef(PInvoke.GetActiveWindow()); 194private static void ShowHTMLFile(Control? parent, string? url, HelpNavigator command, object? param) 214HandleRef<HWND> handle = parent is not null ? new(parent) : Control.GetHandleRef(PInvoke.GetActiveWindow());
System\Windows\Forms\Help\HelpEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.HelpRequested"/> event of a <see cref="Control"/>.
System\Windows\Forms\Help\HelpProvider.cs (24)
12[ProvideProperty("HelpString", typeof(Control))] 13[ProvideProperty("HelpKeyword", typeof(Control))] 14[ProvideProperty("HelpNavigator", typeof(Control))] 15[ProvideProperty("ShowHelp", typeof(Control))] 20private readonly Dictionary<Control, string?> _helpStrings = []; 21private readonly Dictionary<Control, bool> _showHelp = []; 22private readonly List<Control> _boundControls = []; 23private readonly Dictionary<Control, string?> _keywords = []; 24private readonly Dictionary<Control, HelpNavigator> _navigators = []; 55public virtual bool CanExtend(object? target) => target is Control; 63public virtual string? GetHelpKeyword(Control ctl) 75public virtual HelpNavigator GetHelpNavigator(Control ctl) 87public virtual string? GetHelpString(Control ctl) 98public virtual bool GetShowHelp(Control ctl) 109if (sender is not Control ctl) 123if (Control.MouseButtons != MouseButtons.None && !string.IsNullOrEmpty(helpString)) 159if (sender is not Control ctl) 172public virtual void SetHelpString(Control ctl, string? helpString) 188public virtual void SetHelpKeyword(Control ctl, string? keyword) 204public virtual void SetHelpNavigator(Control ctl, HelpNavigator navigator) 218public virtual void SetShowHelp(Control ctl, bool value) 229internal bool ShouldSerializeShowHelp(Control ctl) 239public virtual void ResetShowHelp(Control ctl) 249private void UpdateEventBinding(Control ctl)
System\Windows\Forms\IComponentEditorPageSite.cs (1)
14Control GetControl();
System\Windows\Forms\Input\KeyEventArgs.cs (10)
7/// Provides data for the <see cref="Control.KeyDown"/> or 8/// <see cref="Control.KeyUp"/> event. 38/// Gets the keyboard code for a <see cref="Control.KeyDown"/> or 39/// <see cref="Control.KeyUp"/> event. 58/// Gets the keyboard value for a <see cref="Control.KeyDown"/> or 59/// <see cref="Control.KeyUp"/> event. 64/// Gets the key data for a <see cref="Control.KeyDown"/> or 65/// <see cref="Control.KeyUp"/> event. 70/// Gets the modifier flags for a <see cref="Control.KeyDown"/> or 71/// <see cref="Control.KeyUp"/> event.
System\Windows\Forms\Input\KeyEventHandler.cs (3)
7/// Represents a method that will handle the <see cref="Control.KeyUp"/> 8/// or <see cref="Control.KeyDown"/> event of a 9/// <see cref="Control"/>.
System\Windows\Forms\Input\KeyPressEventArgs.cs (2)
7/// Provides data for the <see cref="Control.KeyPress"/> event. 25/// Gets or sets a value indicating whether the <see cref="Control.KeyPress"/> event was handled.
System\Windows\Forms\Input\KeyPressEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.KeyPress"/> 8/// event of a <see cref="Control"/>.
System\Windows\Forms\Input\MouseEventArgs.cs (3)
7/// Provides data for the <see cref="Control.MouseUp"/>, <see cref="Control.MouseDown"/> and 8/// <see cref="Control.MouseMove"/> events.
System\Windows\Forms\Input\MouseEventHandler.cs (3)
7/// Represents a method that will handle the <see cref="Control.MouseDown"/>, 8/// <see cref="Control.MouseUp"/> or <see cref="Control.MouseMove"/> events of a form,
System\Windows\Forms\Input\PreviewKeyDownEventArgs.cs (8)
17/// Gets the key data for a <see cref="Control.KeyDown"/> 18/// or <see cref="Control.KeyUp"/> event. 30/// Gets the keyboard code for a <see cref="Control.KeyDown"/> 31/// or <see cref="Control.KeyUp"/> event. 48/// Gets the keyboard value for a <see cref="Control.KeyDown"/> 49/// or <see cref="Control.KeyUp"/> event. 54/// Gets the modifier flags for a <see cref="Control.KeyDown"/> 55/// or <see cref="Control.KeyUp"/> event.
System\Windows\Forms\Input\PreviewKeyDownEventHandler.cs (2)
7/// Represents a method that will handle <see cref="Control.PreviewKeyDown"/> event of a <see cref="Control"/>.
System\Windows\Forms\Internal\Formatter.cs (2)
141if (!Control.UseComponentModelRegisteredTypes) 157if (!Control.UseComponentModelRegisteredTypes)
System\Windows\Forms\Internal\OwnedObjectExtensions.cs (1)
28where TAs : Control
System\Windows\Forms\Internal\ReadOnlyControlCollection.cs (5)
11internal class ReadOnlyControlCollection : Control.ControlCollection 15public ReadOnlyControlCollection(Control owner, bool isReadOnly) 21public override void Add(Control? value) 36internal virtual void AddInternal(Control? value) => base.Add(value); 48internal virtual void RemoveInternal(Control value) => base.Remove(value);
System\Windows\Forms\Internal\TypedControlCollection.cs (5)
15private readonly Control _ownerControl; 17public TypedControlCollection(Control owner, Type typeOfControl, bool isReadOnly) 24public TypedControlCollection(Control owner, Type typeOfControl) 31public override void Add(Control? value) 39Control.CheckParentingCycle(_ownerControl, value);
System\Windows\Forms\Internal\Win32WindowExtensions.cs (1)
11Control.GetSafeHandle(window),
System\Windows\Forms\Internal\WinFormsUtils.cs (4)
164Control? c = Control.FromHandle(hwnd); 284public static Point TranslatePoint(Point point, Control fromControl, Control toControl)
System\Windows\Forms\Layout\CommonProperties.cs (15)
62/// A control can thwart the layout engine by overriding its virtual <see cref="Control.AutoSize"/> 79/// We can not use our pattern of passing the default value into <see cref="Control.Margin"/> because the 80/// LayoutEngines read this property and do not know each element's <see cref="Control.DefaultMargin"/>. 125/// Typically the padding is accounted for in either the <see cref="Control.DisplayRectangle"/> calculation 126/// and/or the <see cref="Control.GetPreferredSize(Size)"/> calculation of a control. 227using (new LayoutTransaction(element.Container as Control, element, PropertyNames.MinimumSize)) 245/// responsibility to do layout. See <see cref="Control.Padding"/> for details. 264/// The main purpose of this function is to remember what size someone specified in the <see cref="Control.Size"/>, 265/// <see cref="Control.Width"/>, <see cref="Control.Height"/>, <see cref="Control.Bounds"/>, property. (Its the 267/// to <see cref="DockStyle.Fill"/>, then <see cref="DockStyle.None"/>. When filled, the <see cref="Control.Size"/> 342/// <see cref="Control.GetPreferredSizeCore(Size)"/> method. DO NOT CALL DIRECTLY 372/// <see cref="Control.GetPreferredSizeCore(Size)"/> implementation when asked for a constraining 500if (element.Container is Control { LayoutEngine: DefaultLayout })
System\Windows\Forms\Layout\Containers\ContainerControl.cs (41)
16private Control? _activeControl; 21private Control? _focusedControl; 26private Control? _unvalidatedControl; 283public Control? ActiveControl 384bool IContainerControl.ActivateControl(Control control) 389internal bool ActivateControl(Control control) 394internal bool ActivateControl(Control? control, bool originator) 400Control? parent = ParentInternal; 436Control? ctl = null; 464internal virtual void AfterControlRemoved(Control control, Control oldParent) 506Control? parent = cc.ParentInternal; 530private bool AssignActiveControlInternal(Control? value) 607private static void EnableRequiredScaling(Control start, bool enable) 610foreach (Control c in start.Controls) 640Control? parent = containerControl.ParentInternal; 660Control? parentControl = Parent; 794internal override void OnChildLayoutResuming(Control child, bool performLayout) 1025internal static void ResumeAllLayout(Control start, bool performLayout) 1043internal static void SuspendAllLayout(Control start) 1064internal override void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 1158Control? group = this; 1250Control? start = ActiveControl; 1267Control? ctl = start; 1319private static ScrollableControl? FindScrollableParent(Control ctl) 1321Control? current = ctl.ParentInternal; 1332Control? last = _activeControl; 1449internal void SetActiveControl(Control? value) 1538Control? pathControl = _focusedControl; 1545Control? nextControlDown = _activeControl; 1548Control? parent = nextControlDown!.ParentInternal; 1557Control? priorFocusedControl = _focusedControl = pathControl; 1587Control? stopControl = null; 1622Control leaveControl = pathControl; 1674private void EnsureUnvalidatedControl(Control? candidate) 1727private void EnterValidation(Control enterControl) 1751Control? commonAncestor = enterControl; 1814Control? controlToValidate = _unvalidatedControl ?? _focusedControl; 1862private bool ValidateThroughAncestor(Control? ancestorControl, bool preventFocusChangeOnError) 1887Control? currentActiveControl = _activeControl; 1888Control? currentValidatingControl = _unvalidatedControl;
System\Windows\Forms\Layout\Containers\IContainerControl.cs (2)
14Control? ActiveControl { get; set; } 19bool ActivateControl(Control active);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (11)
64private Control? _nextActiveControl; 1537Control? group = this; 1803Control? parent = ParentInternal; 1825private bool SelectNextControlInContainer(Control? ctl, bool forward, bool tabStopOnly, 1906Control? parent = ParentInternal; 1928private bool SelectNextControlInPanel(Control? ctl, bool forward, bool tabStopOnly, 1995private static void SelectNextActiveControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 2026foreach (Control control in sc.Controls) 2031foreach (Control child in control.Controls) 2288internal override void AfterControlRemoved(Control control, Control oldParent)
System\Windows\Forms\Layout\Containers\SplitContainer.SplitContainerTypedControlCollection.cs (2)
22public override void Remove(Control? value) 32internal override void SetChildIndexInternal(Control child, int newIndex)
System\Windows\Forms\Layout\DefaultLayout.cs (11)
7using static System.Windows.Forms.Control; 346return AppContextSwitches.AnchorLayoutV2 && element is Control; 519Control control = (Control)element; 665if (container is Control control) 686private static void UpdateAnchorsIteratively(Control control) 721UpdateAnchorsIteratively((Control)element); 826internal static void UpdateAnchorInfoV2(Control control) 834Control? parent = control.Parent; 943using (new LayoutTransaction(element.Container as Control, element, PropertyNames.Dock)) 1096(CommonProperties.GetNeedsAnchorLayout(element) || (UseAnchorLayoutV2(element) && ((Control)element)._childControlsNeedAnchorLayout)))
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (1)
39if (_container is Control control)
System\Windows\Forms\Layout\FlowLayout.cs (1)
311if (container is Control flp && flp.Site is not null && flp.Site.DesignMode)
System\Windows\Forms\Layout\LayoutEventArgs.cs (3)
18public LayoutEventArgs(Control? affectedControl, string? affectedProperty) 33public Control? AffectedControl => AffectedComponent as Control;
System\Windows\Forms\Layout\LayoutTransaction.cs (4)
26private readonly Control? _controlToLayout; 32public LayoutTransaction(Control? controlToLayout, IArrangedElement controlCausingLayout, string? property) 37public LayoutTransaction(Control? controlToLayout, IArrangedElement controlCausingLayout, string? property, bool resumeLayout) 71public static IDisposable CreateTransactionIf(bool condition, Control? controlToLayout, IArrangedElement elementCausingLayout, string? property)
System\Windows\Forms\Layout\TableLayout.cs (1)
1182if (containerInfo.Container is Control containerAsControl)
System\Windows\Forms\MDI\MDIClient.ControlCollection.cs (3)
11public new class ControlCollection : Control.ControlCollection 37public override void Add(Control? value) 61public override void Remove(Control? value)
System\Windows\Forms\MDI\MDIClient.cs (2)
129protected override Control.ControlCollection CreateControlsInstance() 163/// Raises the <see cref="Control.Resize" /> event.
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
38if (target is Control controlTarget) 166if (_target is Control controlTarget)
System\Windows\Forms\NotifyIcon.cs (1)
702OnMouseMove(new MouseEventArgs(Control.MouseButtons, 0, 0, 0, 0));
System\Windows\Forms\OLE\DragEventArgs.cs (3)
10/// Provides data for the <see cref="Control.DragDrop"/>, <see cref="Control.DragEnter"/>, 11/// or <see cref="Control.DragOver"/> event.
System\Windows\Forms\OLE\DragEventHandler.cs (4)
7/// Represents a method that will handle the <see cref="Control.DragDrop"/>, 8/// <see cref="Control.DragEnter"/>, or <see cref="Control.DragOver"/> 9/// event of a <see cref="Control"/>.
System\Windows\Forms\OLE\DropTarget.cs (1)
25if (_owner is Control control && control.IsHandleCreated)
System\Windows\Forms\OLE\QueryContinueDragEventArgs.cs (1)
7/// Provides data for the <see cref="Control.QueryContinueDrag"/> event.
System\Windows\Forms\OLE\QueryContinueDragEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.QueryContinueDrag"/> 8/// event of a <see cref="Control"/>.
System\Windows\Forms\OwnerDrawPropertyBag.cs (2)
15private Control.FontHandleWrapper? _fontWrapper; 54_fontWrapper = new Control.FontHandleWrapper(Font);
System\Windows\Forms\Panels\FlowLayoutPanel.cs (4)
9[ProvideProperty("FlowBreak", typeof(Control))] 53bool IExtenderProvider.CanExtend(object obj) => obj is Control control && control.Parent == this; 57public bool GetFlowBreak(Control control) 65public void SetFlowBreak(Control control, bool value)
System\Windows\Forms\Panels\SplitterPanel.cs (1)
209public new Control? Parent
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutControlCollection.cs (2)
14public class TableLayoutControlCollection : Control.ControlCollection 29public virtual void Add(Control control, int column, int row)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (19)
11[ProvideProperty("ColumnSpan", typeof(Control))] 12[ProvideProperty("RowSpan", typeof(Control))] 13[ProvideProperty("Row", typeof(Control))] 14[ProvideProperty("Column", typeof(Control))] 15[ProvideProperty("CellPosition", typeof(Control))] 177obj is Control control && control.Parent == this; 183public int GetColumnSpan(Control control) => 186public void SetColumnSpan(Control control, int value) 197public int GetRowSpan(Control control) => _tableLayoutSettings.GetRowSpan(control); 199public void SetRowSpan(Control control, int value) 212public int GetRow(Control control) => _tableLayoutSettings.GetRow(control); 215public void SetRow(Control control, int row) 227public TableLayoutPanelCellPosition GetCellPosition(Control control) => 231public void SetCellPosition(Control control, TableLayoutPanelCellPosition position) => 240public int GetColumn(Control control) => _tableLayoutSettings.GetColumn(control); 243public void SetColumn(Control control, int column) 252public Control? GetControlFromPosition(int column, int row) => 253(Control?)_tableLayoutSettings.GetControlFromPosition(column, row); 255public TableLayoutPanelCellPosition GetPositionFromControl(Control? control) =>
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.cs (5)
470if (!Control.UseComponentModelRegisteredTypes) 499if (Control.UseComponentModelRegisteredTypes) 501TypeDescriptor.RegisterType<Control>(); 506if (element is Control c) 513if (!Control.UseComponentModelRegisteredTypes)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.TableLayoutSettingsStub.cs (2)
33if (containerInfo.Container is Control appliedControl && _controlsInfo is not null) 44foreach (Control tableControl in appliedControl.Controls)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyle.cs (2)
29if (Owner is Control owner) 51if (Owner is Control owner)
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
596if (SystemInformation.HighContrast && Parent is Control parent)
System\Windows\Forms\Printing\PrintPreviewDialog.PrintPreviewDialogToolStripButton.cs (1)
11/// See <see cref="Control.ProcessDialogKey"/> for more info.
System\Windows\Forms\Rendering\ControlPaint.cs (2)
2587Control control, 2641Control control,
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
9/// This event is fired by owner drawn <see cref="Control"/> objects, such as <see cref="ListBox"/> and
System\Windows\Forms\Rendering\InvalidateEventArgs.cs (1)
9/// Provides data for the <see cref="Control.Invalidate()"/> event.
System\Windows\Forms\Rendering\InvalidateEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.Invalidate()"/> 8/// event of a <see cref="Control"/>.
System\Windows\Forms\Rendering\PaintEventArgs.cs (3)
11/// Provides data for the <see cref="Control.Paint"/> event. 27/// <item><description>In <see cref="Control.WmPaint(ref Message)"/> when we are painting the background.</description></item> 28/// <item><description>In <see cref="Control.WmPrintClient(ref Message)"/>.</description></item>
System\Windows\Forms\Rendering\PaintEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.Paint"/> event of a <see cref="Control"/> class.
System\Windows\Forms\Screen.cs (3)
265public static Screen FromControl(Control control) 293public static Rectangle GetWorkingArea(Control ctl) => FromControl(ctl).WorkingArea; 308public static Rectangle GetBounds(Control ctl) => FromControl(ctl).Bounds;
System\Windows\Forms\Scrolling\ScrollableControl.cs (6)
341Control current = Controls[i]; 400Control current = Controls[i]; 408Control richCurrent = current; 803Control ctl = Controls[i]; 815public void ScrollControlIntoView(Control? activeControl) 844protected virtual Point ScrollToControl(Control activeControl)
System\Windows\Forms\SendKeys\SendKeys.cs (2)
902private static void Send(string keys, Control? control, bool wait) 981private static void SendWait(string keys, Control? control)
System\Windows\Forms\SystemInformation.cs (1)
165return Control.DefaultFont;
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
22Control? associatedControl, 52public Control? AssociatedControl { get; }
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (1)
154return Control.FromHandle(PInvoke.GetFocus());
System\Windows\Forms\ToolTip\PopupEventArgs.cs (2)
17public PopupEventArgs(IWin32Window? associatedWindow, Control? associatedControl, bool isBalloon, Size size) 33public Control? AssociatedControl { get; }
System\Windows\Forms\ToolTip\ToolTip.cs (73)
13[ProvideProperty(nameof(ToolTip), typeof(Control))] 36private readonly Dictionary<Control, TipInfo> _tools = []; 41private Control? _topLevelControl; 50private readonly Dictionary<HWND, Control> _owners = []; 69private readonly HashSet<Control> _created = []; 149internal string? GetCaptionForTool(Control tool) 305if (window is Control control && 475private Control? TopLevelControl 484Control? currentTopLevel = null; 485Control[] controls = [.. _tools.Keys]; 488var control = controls[i]; 617private void AnnounceText(Control? tool, string text) 636Control control = (Control)sender!; 645Control control = (Control)sender!; 676public bool CanExtend(object target) => target is Control; 793Control[] controls = [.. _tools.Keys]; 794foreach (Control control in controls) 802Control[] controls = [.. _tools.Keys]; 803foreach (Control control in controls) 815private void SetToolInfo(Control control, string? caption) 843private void CreateRegion(Control control) 869if (sender is not Control control) 897private void DestroyRegion(Control control) 913new ToolInfoWrapper<Control>(control).SendMessage(this, PInvoke.TTM_DELTOOLW); 972private unsafe ToolInfoWrapper<Control> GetTOOLINFO(Control control, string? caption) 1002return new(Control.GetSafeHandle(window), flags); 1012public string? GetToolTip(Control? control) 1030Control? current = TopLevelControl; 1039Control? currentControl = Control.FromHandle(hwndControl); 1073current = Control.FromHandle(found); 1076current = Control.FromChildHandle(found); 1093Control? control = Control.FromHandle(hwnd); 1147Control[] controls = [.. _tools.Keys]; 1148foreach (Control control in controls) 1205public void SetToolTip(Control control, string? caption) 1214private void SetToolTipInternal(Control control, TipInfo info) 1247ToolInfoWrapper<Control> toolInfo = GetTOOLINFO(control, info!.Caption); 1266private void SetToolTipToControl(Control associatedControl) 1309if (window is Control associatedControl) 1409PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1429PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1447PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1465PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1502if ((tool is Control toolAsControl && _tools.TryGetValue(toolAsControl, out TipInfo? tipInfo)) || 1503(ownerWindow is Control ownerWindowAsControl && _tools.TryGetValue(ownerWindowAsControl, out tipInfo))) 1532ToolInfoWrapper<HandleRef<HWND>> info = new(Control.GetSafeHandle(ownerWindow)); 1729if (win is Control control && control.IsDisposed) 1737ToolInfoWrapper<HandleRef<HWND>> info = new(Control.GetSafeHandle(win)); 1745if (win is not Control tool) 1780Control[] controls = [.. _owners.Values]; 1789Control? tool = window as Control; 1792ToolInfoWrapper<Control> toolInfo = new(tool); 1827if (window is Control windowAsControl) 1955ToolInfoWrapper<Control> toolInfo = default; 1964private Control? GetCurrentToolWindow() 1967return _owners.TryGetValue(hwnd, out Control? control) ? control : Control.FromHandle(hwnd); 1976if (window is not Control windowAsControl || !_tools.TryGetValue(windowAsControl, out TipInfo? tipInfo)) 2001PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 2037Control? toolControl = window as Control; 2151if (window is Control windowAsControl && !_tools.TryGetValue(windowAsControl, out tipInfo)) 2225if (window is not Control control || !_tools.TryGetValue(control, out TipInfo? tipInfo)) 2331font = Control.DefaultFont; 2334Control? control = window as Control ?? Control.FromHandle(window.Handle);
System\Windows\Forms\UICuesEventArgs.cs (1)
7/// Provides data for the <see cref="Control.ChangeUICues"/> event.
System\Windows\Forms\UICuesEventHandler.cs (2)
7/// Represents a method that will handle the <see cref="Control.ChangeUICues"/> event of a <see cref="Control"/>.
System\Windows\Forms\UserControl.cs (1)
81Control toLayout = DesignMode || ParentInternal is null ? this : ParentInternal;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
335public void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl)
System\Windows\Forms\WindowsFormsSynchronizationContext.cs (2)
13private Control? _controlToSendTo; 34private WindowsFormsSynchronizationContext(Control? marshalingControl, Thread? destinationThread)
System.Windows.Forms.Design (724)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (8)
338Control ctrlSender = (Control)sender!; 918Control ctrlSender = (Control)sender!; 1001Control ctrlSender = (Control)sender!; 1114private readonly Control _control; 1119public SelectionWrapper(Type collectionType, Type collectionItemType, Control control, ICollection collection)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (1)
25foreach (Control c in Parent.Controls)
System\ComponentModel\Design\DesignerActionPanel.cs (2)
878List<Control> newControlList = newLine.GetControls(); 879Control[] controls = [.. newControlList];
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (4)
333private void ShowDropDown(Control hostedControl, Color borderColor) 406void IWindowsFormsEditorService.DropDownControl(Control control) 444public DropDownHolder(Control hostedControl, Control parentControl, Color borderColor, Font font, EditorPropertyLine parent)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (6)
15private readonly Control _hostedControl; 16private readonly Control _parentControl; 18public FlyoutDialog(Control hostedControl, Control parentControl, Color borderColor, Font font) 137public void ShowDropDown(Control parent) 179Control? toplevel = _parentControl.TopLevelControl;
System\ComponentModel\Design\DesignerActionPanel.Line.cs (4)
13protected readonly List<Control> AddedControls = []; 30internal List<Control> GetControls() 33foreach (Control c in AddedControls) 53foreach (Control c in AddedControls)
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
63protected Control? EditControl { get; private set; }
System\ComponentModel\Design\DesignerActionUI.cs (3)
32private Control _marshalingControl; // used to invoke events on our main gui thread 189if (comp is not Control or ToolStripDropDown) 666if (relatedComponent is Control and not ToolStripDropDown)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (3)
168Control ctrl = (Control)sender!; 259Control? focusedControl = FromChildHandle(focusedControlPtr);
System\ComponentModel\Design\SelectionService.cs (2)
373fToggle = (Control.ModifierKeys & (Keys.Control | Keys.Shift)) > 0; 374fAdd |= Control.ModifierKeys == Keys.Shift;
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (2)
195Windows.Forms.Control? control = value as Windows.Forms.Control;
System\ComponentModel\Design\ToolStripContainerActionList.cs (13)
53foreach (Control control in panel.Controls) 97=> _designerHost?.RootComponent is Control root 113if (_designerHost.RootComponent is Control root && _toolStripContainer.Parent is null) 132if (_designerHost?.RootComponent is not Control root 139Control newParent = _toolStripContainer.ContentPanel; 149Control[] childControls = new Control[root.Controls.Count]; 152foreach (Control control in childControls) 169Control? oldParent = control.Parent; 210private Control GetParent(Control control) 212Control newParent = _toolStripContainer.ContentPanel; 215foreach (Control panel in _toolStripContainer.Controls)
System\Windows\Forms\Design\AnchorEditor.cs (1)
10/// Provides a design-time editor for specifying the <see cref="Control.Anchor"/> property.
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
87if (selectionService.PrimarySelection is Control selectedControl && root is not null && selectedControl != root) 89Control? parentControl = selectedControl.Parent;
System\Windows\Forms\Design\Behavior\Behavior.cs (1)
330e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (6)
38private Control? _dropSource; // actual control used to call .dodragdrop 106internal Control AdornerWindowControl => _adornerWindow; 183private Control DropSource => _dropSource ??= new Control(); 265public Point ControlToAdornerWindow(Control c) 294public Rectangle ControlRectInAdornerWindow(Control c) 795if (comp is not Control)
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (8)
17private Control _containerControl; // our related control 32internal ContainerSelectorBehavior(Control containerControl, IServiceProvider serviceProvider) 41internal ContainerSelectorBehavior(Control containerControl, IServiceProvider serviceProvider, bool setInitialDragPoint) 50private void Init(Control containerControl, IServiceProvider serviceProvider) 65public Control ContainerControl 96&& !_containerControl.Equals(selSvc.PrimarySelection as Control)) 216Control? requiredParent = _containerControl.Parent; 222if ((comp is Control ctrl) && (ctrl.Parent is not null))
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (1)
56bool isVisible = _component is not Control control || control.Visible;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (4)
23private readonly Control? _alternativeParent; // if this is valid - then the glyph will invalidate itself here instead of on the adorner 40public DesignerActionGlyph(DesignerActionBehavior? behavior, Rectangle alternativeBounds, Control? alternativeParent) 48private DesignerActionGlyph(DesignerActionBehavior? behavior, Adorner? adorner, Rectangle alternativeBounds, Control? alternativeParent) 134if (relatedComponent is Control relatedControl && !(relatedComponent is ToolStripDropDown) && _adorner?.BehaviorService is not null)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (17)
472private bool AddChildCompSnaplines(IComponent comp, List<IComponent>? dragComponents, Rectangle clipBounds, Control? targetControl) 474if (!(comp is Control control) || // has to be a control to get snaplines 484Control c = control; 500private bool AddControlSnaplinesWhenResizing(ControlDesigner designer, Control control, Control? targetControl) 525Control? targetControl = null; 528targetControl = dragComponents[0] as Control; 531Control rootControl = (Control)host.RootComponent; 595if (AddControlSnaplinesWhenResizing(designer, (Control)comp, targetControl)) 608AddControlSnaplinesWhenResizing(internalDesigner, (Control)internalDesigner.Component, targetControl)) 625private static bool IsChildOfParent(Control? child, Control? parent) 632Control? currentParent = child.Parent; 661internal Point OffsetToNearestSnapLocation(Control targetControl, IList targetSnaplines, Point directionOffset) 686internal Point OffsetToNearestSnapLocation(Control targetControl, Point directionOffset) 1085internal Point OnMouseMove(Control targetControl, SnapLine[] snapLines, ref bool didSnap, bool shouldSnapHorizontally)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.BehaviorDataObject.cs (2)
18public BehaviorDataObject(List<IComponent> dragComponents, Control source, DropSourceBehavior sourceBehavior) : base() 26public Control Source { get; }
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (34)
61private Control _suspendedParent; // pointer to the parent that we suspended @ the beginning of the drag 78internal DropSourceBehavior(List<IComponent> dragComponents, Control source, Point initialMouseLocation) 216private void SetDesignerHost(Control c) 218foreach (Control control in c.Controls) 229private void DropControl(int dragComponentIndex, Control dragTarget, Control dragSource, bool localDrag) 231Control currentControl = _dragComponents[dragComponentIndex].dragComponent as Control; 262private void SetLocationPropertyAndChildIndex(int dragComponentIndex, Control dragTarget, Point dropPoint, int newIndex, bool allowSetChildIndexOnDrop) 265if ((propLoc is not null) && (_dragComponents[dragComponentIndex].dragComponent is Control currentControl)) 296if (_data.Target is not Control dragTarget) 339Control dragSource = _data.Source; 448initialDropPoint = ((Control)_dragComponents[_primaryComponentIndex].dragComponent).Parent.PointToClient(initialDropPoint); 453if (((Control)(_dragComponents[_primaryComponentIndex].dragComponent)).Parent.IsMirrored) 455initialDropPoint.Offset(-((Control)(_dragComponents[_primaryComponentIndex].dragComponent)).Width, 0); 459Control primaryComponent = _dragComponents[_primaryComponentIndex].dragComponent as Control; 532List<Control> listOfTrayControls = []; 612Point mouseLoc = Control.MousePosition; 613bool altKeyPressed = Control.ModifierKeys == Keys.Alt; 632Control target = _data.Target as Control; 688Control dragControl = (Control)_dragObjects[i]; 814if (_dragComponents[_primaryComponentIndex].dragComponent is Control c) 865private void GetParentSnapInfo(Control parentControl, BehaviorService bhvSvc) 878if (_dragComponents[_primaryComponentIndex].dragComponent is Control) 929Control primaryControl = _dragObjects[0] as Control; 930Control primaryParent = primaryControl?.Parent; 939Control dragControl = (Control)_dragObjects[i]; 982if (primaryControl.Equals(_dragComponents[i].dragComponent as Control)) 1110if (_dragComponents[i].dragComponent is Control c)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (12)
21public Control resizeControl; 44private Control _primaryControl; // the primary control the status bar will queue off of 264if (_resizeComponents[0].resizeControl is Control control && control.Parent is not null) 321_primaryControl = selSvc.PrimarySelection as Control; 324List<Control> components = []; 327if (component is Control control) 380Control control = _resizeComponents[i].resizeControl; 424internal static int AdjustPixelsForIntegralHeight(Control control, int pixelsMoved) 464bool altKeyPressed = Control.ModifierKeys == Keys.Alt; 545Control targetControl = _resizeComponents[0].resizeControl; 635Control control = _resizeComponents[i].resizeControl; 837Control parent = control.Parent;
System\Windows\Forms\Design\Behavior\SelectionManager.cs (6)
23private readonly Control _rootComponent; 59_rootComponent = (Control)_designerHost.RootComponent; 114private void AddAllControlGlyphs(Control parent, List<IComponent> selComps, object? primarySelection) 116foreach (Control control in parent.Controls) 135private void AddControlGlyphs(Control control, GlyphSelectionType selType) 261if (g.RelatedComponent is Control control && (dragComps.Contains(g.RelatedComponent) || !control.AllowDrop))
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
276Control? ctl = body.RelatedComponent as Control; 294bool altKeyPressed = Control.ModifierKeys == Keys.Alt; 339Control? baseControl = host.RootComponent as Control;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (4)
112Control parent = _relatedControl.Parent; 163Control newParent = _relatedControl; 165Control? oldParent = control.Parent; 311? Control.ModifierKeys == Keys.Control
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
16private Control? _baseParent;
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (7)
41Control root = _host.RootComponent as Control; 64Control newParent = GetParent(tsc, toolStrip); 66Control oldParent = toolStrip.Parent; 117private static Control GetParent(ToolStripContainer container, ToolStrip c) 119Control newParent = container.ContentPanel; 126foreach (Control panel in container.Controls)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
160void IWindowsFormsEditorService.DropDownControl(Control control)
System\Windows\Forms\Design\CommandSet.cs (47)
481if (comp is Control) 787Control? primaryControl = comp as Control; // this can be null (when we are moving a component in the ComponentTray) 1134if (host.RootComponent is Control baseComponent) 1246Control? viewParent = null; 1269if (obj is Control comp) 1329if (obj is Control comp) 1458Control? commonParent = null; 1481if (obj == host.RootComponent || obj is not Control c) 1489Control? parent = c.Parent; 1515if (obj is Control selectedControl) 1610if (obj is Control c) 1612Control? parent = c.Parent; 1643if (obj is Control control) 1665if (obj is Control selectedControl && commonParent is Control controlCommonParent) 1676Control? parent = controlCommonParent; 1777else if (commonParent is Control controlCommonParent) 1782Control? parent = controlCommonParent.Controls[0]; 1898List<Control> controls = []; 2046Control designerControl = designer.GetControlForComponent(curComp); 2067if (curComp is Control c) 2099List<Control> compsWithControlDesigners = []; 2100foreach (Control c in controls) 2135List<Control> listOfTrayControls = []; 2150foreach (Control c in controls) 2247if (baseComponent is Control) 2396if (baseComponent is not null and Control) 2480if (baseComponent is Control) 2533if (baseComponent is Control) 2916if (obj is not Control) 2939Control? marshalControl = BehaviorService?.AdornerWindowControl; 3227private void UpdatePastePositions(List<Control> controls) 3238Control? parentControl = controls[0].Parent; 3241foreach (Control c in controls) 3301foreach (Control child in parentControl.Controls) 3325Control pasteControl = controls[0]; 3338if (baseComponent is Control) 3408foreach (Control c in controls) 3421private static void UpdatePasteTabIndex(Control componentControl, Control? parentControl) 3434foreach (Control c in parentControl.Controls) 3507if (p is not Control c1 || q is not Control c2) 3516private class TabIndexComparer : IComparer<Control> 3522public int Compare(Control? c1, Control? c2)
System\Windows\Forms\Design\ComponentDocumentDesigner.cs (3)
20public Control Control => throw new NotImplementedException(SR.NotImplementedByDesign); 55Control IOleDragClient.GetDesignerControl() 60Control IOleDragClient.GetControlForComponent(object component)
System\Windows\Forms\Design\ComponentTray.cs (27)
32private List<Control> _controls; // List of items in the tray in the order of their layout. 244Control c = TrayControl.FromComponent(component); 258Control c = TrayControl.FromComponent(comp); 363Control prevCtl = null; 365foreach (Control ctl in _controls) 534Control IOleDragClient.GetDesignerControl() => this; 536Control IOleDragClient.GetControlForComponent(object component) 754if (!compType.IsSubclassOf(typeof(Control))) 970Control c = TrayControl.FromComponent(receiver); 1007foreach (Control control in Controls) 1365Control child = Controls[i]; 1411foreach (Control ctl in _controls) 1439Control c = ((IOleDragClient)this).GetControlForComponent(o); 1688if (rd.GetView(techs[0]) is Control view) 1710internal void UpdatePastePositions(List<Control> components) 1721Control prevCtl = null; 1752Control prevCtl = null; 1777Control prevCtl = null; 1793internal void RearrangeInAutoSlots(Control c, Point pos) 1803private bool PositionInNextAutoSlot(TrayControl c, Control prevCtl, bool dirtyDesigner) 2748internal class AutoArrangeComparer : IComparer<Control> 2750int IComparer<Control>.Compare(Control o1, Control o2) 2823protected override Control GetControl() 2831protected override Control GetControl(IComponent component) 2928if (comp is Control or not IComponent)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (16)
30List<Control>? suspendedComponents = null; 38if (component is Control control) 67foreach (Control control in suspendedComponents) 81private static bool HasAutoSizedChildren(Control parent) 83foreach (Control child in parent.Controls) 94private static bool HasMixedInheritedChildren(Control parent) 99foreach (Control control in parent.Controls) 120protected virtual bool HasSitedNonReadonlyChildren(Control parent) 127foreach (Control control in parent.Controls) 189Control control = (Control)value; 222if (value is Control control) 237if (component is Control) 278Control? parent = control.Parent; 413private void SerializeZOrder(IDesignerSerializationManager manager, CodeStatementCollection statements, Control control) 421Control child = control.Controls[i];
System\Windows\Forms\Design\ControlCommandSet.cs (61)
21private readonly Control _baseControl; 281Control comp = host.RootComponent as Control; 297HashSet<Control> itemHash = new(sel.Count); 300if (obj is not Control control || control.Site is null) 308Control okParent = null; 312foreach (Control component in sel) 316for (Control parent = component.Parent; parent is not null; parent = parent.Parent) 375Control ctrl = component as Control; 378Control c = ctrl.Parent; 459private List<SnapLine> GenerateSnapLines(SelectionRules rules, Control primaryControl, int directionOffsetX, int directionOffsetY) 610Control primaryControl = comp as Control; 759Control control = component as Control; 970List<Control> layoutParentList = []; 971List<Control> parentList = []; 1009Control control = selectedComponents[i] as Control; 1022control = nestedContainer.Owner as Control; 1030Control parent = control.Parent; 1084Control otherControl = selectedComponents[len - i - 1] as Control; 1090Control control = selectedComponents[i] as Control; 1101foreach (Control parent in parentList) 1111foreach (Control parent in layoutParentList) 1249&& host.RootComponent is Control baseComponent 1266&& host.RootComponent is Control baseComponent 1313if (obj is Control && 1364if (selSvc is null || host is null || !(host.RootComponent is Control)) 1371Control component = selSvc.PrimarySelection as Control; 1372Control current; 1379current = (Control)host.RootComponent; 1401Control nextControl = next as Control; 1424Control ctl; 1425Control baseCtl; 1431if (selSvc is null || host is null || !(host.RootComponent is Control)) 1436baseCtl = (Control)host.RootComponent; 1446ctl = currentSelection as Control; 1499private static Control GetNextControlInTab(Control basectl, Control ctl, bool forward) 1503Control.ControlCollection ctlControls = ctl.Controls; 1507Control found = null; 1526Control found = null; 1527Control p = ctl.Parent; 1535Control.ControlCollection parentControls = p.Controls; 1595Control found = null; 1596Control p = ctl.Parent; 1603Control.ControlCollection parentControls = p.Controls; 1671Control.ControlCollection ctlControls = ctl.Controls; 1675Control found = null; 1722Control cX = x as Control; 1723Control cY = y as Control; 1728Control parent = cX.Parent;
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
58_designer.SetUnhandledException(Control.FromChildHandle(m.HWnd), ex);
System\Windows\Forms\Design\ControlDesigner.ChildWindowTarget.cs (2)
11private readonly Control _childControl; 14public ChildWindowTarget(ControlDesigner designer, Control childControl, IWindowTarget oldWindowTarget)
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (4)
14private readonly Control _control; 18public ControlDesignerAccessibleObject(ControlDesigner designer, Control control) 67if (_control.AccessibilityObject.GetChild(index) is Control.ControlAccessibleObject childAccObj) 81private AccessibleObject? GetDesignerAccessibleObject(Control.ControlAccessibleObject cao)
System\Windows\Forms\Design\ControlDesigner.cs (37)
115foreach (Control control in Control.Controls) 136public virtual Control Control => (Control)Component; 178Component is Control c && c.Parent is not null ? c.Parent : base.ParentComponent; 530if (Component is not Control ctl) 579protected bool EnableDesignMode(Control child, string name) 607Control rc = Control; 701Control? parent = Control.Parent; 875protected void HookChildControls(Control firstChild) 877foreach (Control child in firstChild.Controls) 911Control? child = sender as Control; 1057if (Component is Control ctl) 1131foreach (Control control in Control.Controls) 1171if (parent is Control parentControl) 1181foreach (Control c in parentControl.Controls) 1247Control control = Control; 1268Control control = Control; 1282Control control = Control; 1295Control control = Control; 1322_ctrlSelect = (Control.ModifierKeys & Keys.Control) != 0; 1347bool shiftSelect = (Control.ModifierKeys & Keys.Shift) != 0; 1428Control? requiredParent = null; 1431if (comp is Control control) 1468Control ctl = Control; 1469Control? parent = ctl; 1497Control ctl = Control; 1498Control? parent = ctl; 1526Control ctl = Control; 1527Control? parent = ctl; 1686protected void UnhookChildControls(Control firstChild) 1690foreach (Control child in firstChild.Controls) 2192if (rd.GetView(techs[0]) is Control view) 2414Control? child = Control.FromHandle(hwndChild); 2482internal void SetUnhandledException(Control? owner, Exception exception) 2510foreach (Control c in Control.Controls)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (7)
16internal class DesignerControlCollection : Control.ControlCollection, IList 18private readonly Control.ControlCollection _realCollection; 20public DesignerControlCollection(Control owner) : base(owner) => _realCollection = owner.Controls; 34public override void Add(Control c) => _realCollection.Add(c); 36public override void AddRange(params Control[] controls) => _realCollection.AddRange(controls); 62public override int GetChildIndex(Control child, bool throwException) 65public override void SetChildIndex(Control child, int newIndex)
System\Windows\Forms\Design\ControlDesigner.DesignerWindowTarget.cs (1)
15Control control = designer.Control;
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
693internal static void ShowErrorDialog(IUIService? uiService, Exception ex, Control? dataGridView) 712internal static void ShowErrorDialog(IUIService? uiService, string errorString, Control? dataGridView)
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (1)
34if (context.Instance is Control control)
System\Windows\Forms\Design\DesignerFrame.cs (23)
30private Control? _designer; 71Control designerHolder = _designer; 95public void Initialize(Control view) 116if (selSvc?.PrimarySelection is Control { IsDisposed: false } ctrl) 222int IOverlayService.PushOverlay(Control control) => _designerRegion.PushOverlay(control); 228void IOverlayService.RemoveOverlay(Control control) 236void IOverlayService.InsertOverlay(Control control, int index) 260void ISplitWindowService.AddSplitWindow(Control window) 298void ISplitWindowService.RemoveSplitWindow(Control window) 316foreach (Control c in Controls) 339private readonly List<Control> _overlayList; 372foreach (Control c in _overlayList) 391foreach (Control c in _overlayList) 401private void ParentOverlay(Control control) 415public int PushOverlay(Control control) 433public void RemoveOverlay(Control control) 444public void InsertOverlay(Control control, int index) 447Control c = _overlayList[index]; 462Control overlayControl = _overlayList[i]; 479Control overlayControl = _overlayList[i]; 500foreach (Control c in _overlayList) 511foreach (Control c in _overlayList) 544foreach (Control c in Owner!.Controls)
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
20public DesignerToolStripControlHost(Control c)
System\Windows\Forms\Design\DesignerUtils.cs (5)
312public static void GenerateSnapShot(Control control, out Bitmap image, int borderSize, double opacity, Color backColor) 385public static void GenerateSnapShotWithBitBlt(Control control, out Bitmap image) 420public static bool GenerateSnapShotWithWM_PRINT(Control control, out Bitmap image) 524public static unsafe int GetTextBaseline(Control ctrl, ContentAlignment alignment) 768if (comp is Control { Parent: null })
System\Windows\Forms\Design\DockEditor.cs (1)
10/// Implements the design time editor for specifying the <see cref="Control.Dock"/> property.
System\Windows\Forms\Design\DocumentDesigner.cs (22)
34private List<Control> _suspendedComponents; 230Control IOleDragClient.GetControlForComponent(object component) 232Control c = GetControl(component); 470Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 471Rectangle translatedBounds = new(loc, ((Control)Component).Size); 558if (sel is null || !(sel is Control)) 566if (obj is Control) 580Debug.Assert(sel is Control, "Our logic is flawed - sel should be a Control"); 581Control c = (Control)sel; 786foreach (Control c in _suspendedComponents) 807if (comp is Control control) 817if (host.RootComponent is Control root) 819Control rootParent = root.Parent; 897bool designableAsControl = ce.Component is Control 1048Control control = Control; 1080Control ctrl = e.Component as Control; 1116if (selObj is Control c) 1126if (svc.PrimarySelection is Control primary) 1151if (obj is Control) 1210properties["DoubleBuffered"] = TypeDescriptor.CreateProperty(typeof(Control), "DoubleBuffered", typeof(bool),
System\Windows\Forms\Design\DocumentDesigner.DocumentInheritanceService.cs (5)
56if (typeof(Control).IsAssignableFrom(memberType)) 60Control? child = null; 63child = (Control?)field.GetValue(component); 67child = (Control?)method.Invoke(component, parameters: null); 70Control parent = _designer.Control;
System\Windows\Forms\Design\EditorServiceContext.cs (1)
117void IWindowsFormsEditorService.DropDownControl(Control control)
System\Windows\Forms\Design\EventHandlerService.cs (3)
21/// <param name="focusWnd">The <see cref="Control"/> which is being designed.</param> 22public EventHandlerService(Control? focusWnd) 36public Control? FocusWindow { get; }
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (10)
28private List<Control> _dragControls; 30private Control _primaryDragControl; 145private Rectangle GetMarginBounds(Control control) 199var currentControl = children[i]; 597Control control = null; 610List<Control> originalControls = []; 615foreach (var dragControl in _dragControls) 645_primaryDragControl = (Control)tempList[j]; 648_dragControls[j] = (Control)tempList[j]; 760_dragControls = [..data.GetSortedDragControls(out int primaryIndex).OfType<Control>()];
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
37internal override void AddChildControl(Control newChild) => Control.Controls.Add(newChild);
System\Windows\Forms\Design\FormatControl.cs (1)
422for (Control? ctl = Parent; ctl is not null; ctl = ctl.Parent)
System\Windows\Forms\Design\FormatStringDialog.cs (2)
97private static int GetRightSideOffset(Control ctl) 100Control? control = ctl;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
77Control control = Control;
System\Windows\Forms\Design\IEventHandlerService.cs (1)
30Control? FocusWindow { get; }
System\Windows\Forms\Design\InheritanceUI.cs (4)
47public void AddInheritedControl(Control c, InheritanceLevel level) 68foreach (Control child in c.Controls) 85public void RemoveInheritedControl(Control c) 93foreach (Control child in c.Controls)
System\Windows\Forms\Design\IOleDragClient.cs (2)
33Control GetDesignerControl(); 39Control GetControlForComponent(object component);
System\Windows\Forms\Design\IOverlayService.cs (3)
22int PushOverlay(Control control); 28void RemoveOverlay(Control control); 33void InsertOverlay(Control control, int index);
System\Windows\Forms\Design\ISplitWindowService.cs (2)
14void AddSplitWindow(Control window); 19void RemoveSplitWindow(Control window);
System\Windows\Forms\Design\ListViewDesigner.cs (1)
186private static void ShowErrorDialog(IUIService uiService, InvalidOperationException ex, Control control)
System\Windows\Forms\Design\NavigationalTableLayoutPanel.cs (1)
15foreach (Control control in Controls)
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (4)
91if (defaultValues["Parent"] is Control parentControl && host.GetDesigner(parentControl) is ParentControlDesigner parentControlDesigner) 98if (component is Control { Parent: null } childControl && childControl != parentControl) 107if (component is Control { Parent: null } childControl and not Form { TopLevel: true }) // Don't add top-level forms 120List<Control>? trayComponents = null;
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
252if (_components[i] is Control c)
System\Windows\Forms\Design\OleDragDropHandler.cs (15)
134public IComponent[] CreateTool(ToolboxItem tool, Control? parent, int x, int y, int width, int height, bool hasLocation, bool hasSize) 139public IComponent[] CreateTool(ToolboxItem tool, Control? parent, int x, int y, int width, int height, bool hasLocation, bool hasSize, ToolboxSnapDragDropEventArgs? e) 298private static void DisableDragDropChildren(ICollection controls, List<Control> allowDropCache) 300foreach (Control c in controls) 325Control parentControl = Destination.GetDesignerControl(); 340Control comp = Destination.GetControlForComponent(comps[i])!; 452if ((rules & SelectionRules.AllSizeable) != SelectionRules.None || Control.MouseButtons == MouseButtons.None) 457Control c = Destination.GetDesignerControl(); 511List<Control> allowDropChanged = []; 514if (comp is Control { HasChildren: true } ctl) 538foreach (Control ctl in allowDropChanged) 751Control? oldDesignerControl = null; 794Control c = Destination.GetControlForComponent(comp)!; 1049Control? c = comp as Control;
System\Windows\Forms\Design\ParentControlDesigner.cs (50)
29private Control _pendingRemoveControl; // we've gotten an OnComponentRemoving, and are waiting for OnComponentRemove 182Control control = Control; 192foreach (Control child in Control.Controls) 261Control control = Control; 270foreach (Control child in Control.Controls) 293protected virtual Control GetParentForComponent(IComponent component) => Control; 408foreach (Control child in Control.Controls) 418internal virtual void AddChildControl(Control newChild) 432internal void AddControl(Control newChild, IDictionary defaultValues) 473Control selectedControl = null; 548Control rootControl = host.RootComponent as Control; 600Control control = GetControl(component); 606Control parent = control; 608Control[] children = new Control[parent.Controls.Count]; 781public virtual bool CanParent(Control control) 861internal List<Control> GetComponentsInRect(Rectangle value, bool screenCoords, bool containRect) 863List<Control> list = []; 868Control control = Control; 873Control child = control.Controls[i]; 891protected Control GetControl(object component) 917Control parent = Control; 998Control parent = Control.Parent; 1041Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1052ContainerSelectorBehavior behavior = new((Control)Component, Component.Site, true); 1075Control parent = Control.Parent; 1259List<Control> selectedControls = parentDesigner.GetComponentsInRect(bounds, true, true /* component should be fully contained*/); 1323Control comp = e.Component as Control; 1459de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1489Control draggedControl = null; 1540Control ctrl = dragComps[i] as Control; 1660de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1707Control control = Control; 1880List<Control> selection = GetComponentsInRect(offset, true, false /*component does not need to be fully contained*/); 2021Control control = Control; 2126private void ReParentControls(Control newParent, List<Control> controls, string transactionName, IDesignerHost host) 2145foreach (Control control in controls) 2147Control oldParent = control.Parent; 2268Control control = Control; 2277Control control = Control; 2386Control c = GetControl(component); 2391Control parent = GetParentForComponent(component); 2403Control cParent = c.Parent; 2522Control IOleDragClient.GetDesignerControl() 2532Control IOleDragClient.GetControlForComponent(object component)
System\Windows\Forms\Design\PbrsForward.cs (3)
10private readonly Control _target; 27public PbrsForward(Control target, IServiceProvider sp) 136if ((Control.ModifierKeys & (Keys.Control | Keys.Alt)) != 0)
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
32Control ctl = Control;
System\Windows\Forms\Design\RichTextBoxDesigner.cs (1)
29Control control = Control;
System\Windows\Forms\Design\SelectionUIHandler.cs (11)
22private Control[]? _dragControls; // the set of controls we're dragging 43_dragControls = new Control[components.Length]; 58private static void CancelControlMove(Control[] controls, BoundsInfo[] bounds) 68Control? parent = controls[i].Parent; 87Control? parent = controls[i].Parent; 135protected abstract Control GetControl(); 140protected abstract Control GetControl(IComponent component); 183Control[] controls = _dragControls!; 244Control? parent = controls[i].Parent; 491Control? parent = controls[i].Parent; 589public BoundsInfo(Control control)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (2)
66private readonly Control? _control; 138Control parent = _control.Parent;
System\Windows\Forms\Design\SplitContainerDesigner.cs (4)
68protected override Control? GetParentForComponent(IComponent component) => _splitterPanel1; 145List<Control> components = []; 148components.AddRange(panel.Controls.Cast<Control>()); 279public override bool CanParent(Control control) => false;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
25Control control = Control;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
146Control control = Control; 164Control control = Control; 180Control control = Control;
System\Windows\Forms\Design\StatusCommandUI.cs (2)
46if (selectedComponent is Control c) 75if (selectedComponent is Control c)
System\Windows\Forms\Design\StyleEditorForm.cs (1)
22private readonly List<Control> _deleteList;
System\Windows\Forms\Design\TabControlDesigner.cs (7)
110public override bool CanParent(Control control) => (control is TabPage && !Control.Contains(control)); 178if (!(comp is Control)) 183Control c = (Control)comp; 299Control focusWnd = eventSvc.FocusWindow; 494if (!(dragControls[i] is Control) || (dragControls[i] is Control && !(dragControls[i] is TabPage)))
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (4)
66if (serializedObj is not null && !typeof(Control).IsAssignableFrom(o.GetType())) 68serializedObj = new CodeCastExpression(typeof(Control), serializedObj); 74col = tableCollection.Container.GetColumn((Control)o); 75row = tableCollection.Container.GetRow((Control)o);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (33)
27private Control _localDragControl; // only valid if we're currently dragging a child control of the table 446private void RemoveControlInternal(Control c) 453private void AddControlInternal(Control c, int col, int row) 460private void ControlAddedInternal(Control control, Point newControlPosition, bool localReposition, bool fullTable, DragEventArgs de) 497Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(newControlPosition.X, newControlPosition.Y); 565control = temp[0] as Control; 724Control newControl = GetControl(component); 945private Control ExtractControlFromDragEvent(DragEventArgs de) 950return _dragComponents[0] as Control; 1042private Point GetControlPosition(Control control) 1258Point dropPoint = GetCellPosition(Control.MousePosition); 1271Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1278(_localDragControl is not null && existingControl is not null && Control.ModifierKeys == Keys.Control)) 1308Control dragControl = ExtractControlFromDragEvent(de); 1325_droppedCellPosition = GetCellPosition(Control.MousePosition); 1355foreach (Control dragControl in _dragComponents) 1425Control changingControl = e.Component as Control; 1447Control c = e.Component as Control; 1473Control c = comp as Control; 1524_droppedCellPosition = GetCellPosition(Control.MousePosition); 1701foreach (Control child in Table.Controls) 1771internal void FixUpControlsOnDelete(bool isRow, int index, List<Control> deleteList) 1776foreach (Control child in Table.Controls) 1870List<Control> deleteList = []; 1884foreach (Control control in deleteList) 2150public override void Add(Control c) => _realCollection.Add(c); 2152public override void AddRange(Control[] controls) => _realCollection.AddRange(controls); 2184public override void Add(Control control, int column, int row) => _realCollection.Add(control, column, row); 2186public override int GetChildIndex(Control child, bool throwException) => _realCollection.GetChildIndex(child, throwException); 2188public override void SetChildIndex(Control child, int newIndex) => _realCollection.SetChildIndex(child, newIndex);
System\Windows\Forms\Design\TabOrder.cs (37)
21private Control? _ctlHover; 22private List<Control>? _tabControls; 24private HashSet<Control>? _tabComplete; 25private Dictionary<Control, int>? _tabNext; 32private readonly Dictionary<Control, PropertyDescriptor> _tabProperties; 189private void DrawTabs(List<Control> tabs, Graphics graphics, bool fRegion) 210if (_ctlHover.Parent is Control hoverParent) 227foreach (Control control in tabs) 234Control? parent = control; 235Control baseControl = (Control)_host.RootComponent; 293Control rootControl = (Control)_host.RootComponent; 303private Control? GetControlAtPoint(List<Control> tabs, int x, int y) 306Control? ctlFound = null; 307Control? parent; 309foreach (Control control in tabs) 336private Rectangle GetConvertedBounds(Control? control) 338if (control is null || control.Parent is not Control parent) 354private int GetMaxControlCount(Control ctl) 374private Control? GetSitedParent(Control child) 376Control? parent = child.Parent; 403private void GetTabbing(Control control, IList tabs) 410Control ctlTab; 437private bool GetTabbable(Control control) 439for (Control? c = control; c is not null; c = c.Parent) 587Control? ctl = GetControlAtPoint(_tabControls, x, y); 603Control? ctl = null; 649GetTabbing((Control)_host.RootComponent, _tabControls); 718Control? control = _ctlHover; 719Control form = (Control)_host.RootComponent; 733private void SetNewHover(Control? ctl) 760private void SetNextTabIndex(Control ctl) 768Control? parent = GetSitedParent(ctl);
System\Windows\Forms\Design\TabPageDesigner.cs (1)
19Control ctl = Control;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (5)
26internal ToolStripAdornerWindowService(IServiceProvider serviceProvider, Control windowFrame) 51internal Control ToolStripAdornerWindowControl 97public Point ControlToAdornerWindow(Control c) 160private Control _designerFrame; // the designer's frame 162internal ToolStripAdornerWindow(Control designerFrame)
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (1)
10protected override bool HasSitedNonReadonlyChildren(Control parent)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (14)
27private Control[]? _panels; 138Control panel = _panels[internalControlIndex]; 151foreach (Control parent in _toolStripContainer!.Controls) 153foreach (Control control in parent.Controls) 188public override bool CanParent(Control control) => false; 203private static ToolStripContainer? ContainerParent(Control control) 233Control currentPanel = _panels![i]; 250if (comp is Control control) 271private static Control? GetAssociatedControl(Component component) 273Control? associatedControl = null; 274if (component is Control control) 281Control? parent = item.GetCurrentParent(); 321Control? associatedControl = GetAssociatedControl(component); 341protected override Control? GetParentForComponent(IComponent component)
System\Windows\Forms\Design\ToolStripDesigner.cs (8)
1304Control parent = ToolStrip.Parent; 1351Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 1352Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1480Control parent = defaultValues is not null ? defaultValues["Parent"] as Control : null; 1557foreach (Control c in parent.Controls) 1578foreach (Control c in parent.Controls) 2297: (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (4)
264if (_host.RootComponent is Control form) 292if (_host.RootComponent is not Control) 380if (_host.RootComponent is Control form) 639Control parent = _designMenu.Parent;
System\Windows\Forms\Design\ToolStripEditorManager.cs (2)
122private readonly Control _wrappedEditor; 125public ToolStripEditorControl(Control editorToolStrip, Rectangle bounds)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (6)
29private Control _dropSource; 37private Control DropSource 352bool removeSel = (Control.ModifierKeys & (Keys.Control | Keys.Shift)) > 0; 381bool shiftPressed = (Control.ModifierKeys & Keys.Shift) > 0; 447else if (shiftPressed || (Control.ModifierKeys & Keys.Control) > 0) 874e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (8)
294else if (startComp is Control) 296Control selectedControl = startComp as Control; 297Control parentControl = selectedControl.Parent; 424if (designerHost.RootComponent is Control parent) 498Point loc = b.ControlToAdornerWindow((Control)ImmediateParent); 560Rectangle parentBounds = GetService<BehaviorService>().ControlRectInAdornerWindow((Control)ImmediateParent); 898Point location = behaviorService.ControlToAdornerWindow((Control)ImmediateParent);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (26)
316private static Control GetNextControlInTab(Control basectl, Control ctl, bool forward) 324Control found = null; 325Control p = ctl.Parent; 330Control.ControlCollection parentControls = p.Controls; 380Control found = null; 381Control p = ctl.Parent; 385Control.ControlCollection parentControls = p.Controls; 683bool shiftPressed = (Control.ModifierKeys & Keys.Shift) > 0; 728bool shiftPressed = (Control.ModifierKeys & Keys.Shift) > 0; 1177|| host.RootComponent is not Control) 1190if (currentSelection is Control) 1292|| host.RootComponent is not Control) 1317if (currentSelection is Control) 1647Control current = null; 1652if (selSvc is null || host is null || !(host.RootComponent is Control)) 1658if (selSvc.PrimarySelection is not Control component) 1660component = SelectedDesignerControl as Control; 1674current = (Control)host.RootComponent; 1694if (!(next is Control nextControl) || nextControl.Site is null || nextControl.Site.Container != container) 1737Control ctl; 1738Control baseCtl; 1743if (selSvc is null || host is null || !(host.RootComponent is Control)) 1749baseCtl = (Control)host.RootComponent; 1801ctl = currentSelection as Control;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
1098Control rootControl = ddi.DropDown; 2600e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2615e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
146public override bool CanParent(Control control) 300protected override Control? GetParentForComponent(IComponent component)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
870Control baseComponent = null; 873baseComponent = (Control)_designerHost.RootComponent; 953Control baseComponent = (Control)_designerHost.RootComponent;
System.Windows.Forms.Design.Tests (154)
ControlDesignerTests.cs (5)
33Control _ = controlDesigner.Control; 155using Control control = _designer.Control; 199using Control childControl = new(); 216using Control childControl = new(); 343PropertyDescriptor? dockPropDescriptor = TypeDescriptor.GetProperties(_designer._control)[nameof(Control.Dock)];
SplitContainerDesignerTests.cs (2)
22.Setup(s => s.GetDesigner(It.IsAny<Control>())) 45using Control control = new();
System\ComponentModel\Design\ByteViewerTests.cs (3)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 80Assert.Equal(Control.DefaultFont, control.Font); 82Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\ComponentModel\Design\MultilineStringEditorTests.cs (2)
41.Setup(e => e.DropDownControl(It.IsAny<Control>())) 45mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\ComponentModel\Design\ObjectSelectorEditorTests.cs (2)
51.Setup(e => e.DropDownControl(It.IsAny<Control>())) 55mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Drawing\Design\ColorEditorTests.cs (2)
43.Setup(e => e.DropDownControl(It.IsAny<Control>())) 47mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Drawing\Design\CursorEditorTests.cs (2)
42.Setup(e => e.DropDownControl(It.IsAny<Control>())) 46mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\AnchorEditorTests.cs (6)
44.Setup(e => e.DropDownControl(It.IsAny<Control>())) 48mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once()); 89var anchorUI = (Control)Activator.CreateInstance(type); 90var item = (Control)anchorUI.GetType()
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (1)
247using Control control = new();
System\Windows\Forms\Design\BorderSidesEditorTests.cs (2)
42.Setup(e => e.DropDownControl(It.IsAny<Control>())) 46mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\ChangeToolStripParentVerbTests.cs (3)
74Control? oldParent = _toolStrip.Parent; 90Control oldParent = _toolStrip.Parent; 110Control oldParent = _toolStrip.Parent;
System\Windows\Forms\Design\ContentAlignmentEditorTests.cs (4)
29var contentUI = (Control)Activator.CreateInstance(type); 30var item = (Control)contentUI.GetType()
System\Windows\Forms\Design\ControlCommandSetTests.cs (5)
20private readonly Control _baseControl; 75using Control component = new(); 94using Control childComponent = new(); 95using Control parentComponent = new(); 112snapPropertyDescriptorMock.Setup(p => p.ComponentType).Returns(typeof(Control));
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (16)
11private readonly Control _control; 60using Control control = new(); 62_control.Controls.Cast<Control>().Should().Contain(control); 68using Control control1 = new(); 69using Control control2 = new(); 70Control[] controls = [control1, control2]; 72_control.Controls.Cast<Control>().Should().Contain(controls); 78using Control control = new(); 105using Control control = new(); 113using Control control = new(); 114using Control anotherControl = new(); 124using Control control = new(); 133using Control control = new(); 142using Control control = new(); 150using Control control = new(); 159using Control control = new();
System\Windows\Forms\Design\ControlDesignerAccessibleObjectTests.cs (2)
90Control control = new() { Name = "TestControl" }; 101Control control = new();
System\Windows\Forms\Design\DataGridViewColumnTypeEditorTests.cs (1)
85mockEditorService.Verify(s => s.DropDownControl(It.IsAny<Control>()), Times.Once);
System\Windows\Forms\Design\DesignBindingPickerTests.cs (1)
61private static bool ContainsType<T>(Control.ControlCollection collection)
System\Windows\Forms\Design\DesignerFrameTests.cs (10)
47designerFrame.Controls.Cast<Control>().Should().HaveCount(1); 58Control control = new(); 64List<Control> controls = designerFrame.Controls.Cast<Control>().ToList(); 65Control? designerRegion = controls.FirstOrDefault(c => c is ScrollableControl); 69Control? containedControl = designerRegion?.Controls.Cast<Control>().FirstOrDefault(); 75designerFrame.Controls.Cast<Control>().Should().NotContain(control); 119Control control = new(); 125designerFrame.Controls.Cast<Control>().Should().Contain(control);
System\Windows\Forms\Design\DesignerToolStripControlHostTests.cs (1)
11using Control control = new();
System\Windows\Forms\Design\DockEditorTests.cs (2)
42.Setup(e => e.DropDownControl(It.IsAny<Control>())) 46mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\DocumentDesignerTests.cs (2)
31public Control? IOleDragClient_GetControlForComponent(object component) => 93Control? result = designer.IOleDragClient_GetControlForComponent(new object());
System\Windows\Forms\Design\EventHandlerServiceTests.cs (1)
16using Control focusWnd = new();
System\Windows\Forms\Design\FlowLayoutPanelDesignerTests.cs (5)
43using Control childControl = new() { Site = new Mock<ISite>().Object }; 55using Control childControl = new() { Site = new Mock<ISite>().Object }; 131using Control control = new() 191using Control control1 = new(); 192using Control control2 = new();
System\Windows\Forms\Design\FormatControlTests.cs (1)
15_formatControl.Should().BeAssignableTo<Control>();
System\Windows\Forms\Design\FormatStringDialogTests.cs (2)
86static int GetRightSideOffset(Control ctl) 89Control? control = ctl;
System\Windows\Forms\Design\InheritanceUITests.cs (3)
17private readonly Control _control; 18private readonly Control _childControl; 19private readonly Control _sitedChildControl;
System\Windows\Forms\Design\InheritedPropertyDescriptorTestExtensions.cs (1)
13public static InheritedPropertyDescriptor GetInheritedPropertyDescriptor(this Control control, string property)
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (8)
16using Control control = new(); 17InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Size)); 30using Control control = new(); 31InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Anchor)); 48using Control control = new(); 49InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.BackColor)); 62using Control control = new(); 63InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Visible));
System\Windows\Forms\Design\ParentControlDesignerTests.cs (6)
15private readonly Control _control; 51Mock<Control> mockControl = new(); 140public new bool Contains(Control ctl) 148private void DisableDragDrop(Control control) 154foreach (Control child in control.Controls) 228Control parentControl = _designer.TestAccessor.Dynamic.GetParentForComponent(mockComponent.Object);
System\Windows\Forms\Design\SelectionUIHandlerTests.cs (5)
15private readonly Control _control; 29_selectionUIHandlerMock.Protected().Setup<Control>("GetControl").Returns(_control); 30_selectionUIHandlerMock.Protected().Setup<Control>("GetControl", ItExpr.IsAny<IComponent>()).Returns(_control); 51Control[] dragControls = _selectionUIHandlerMock.Object.TestAccessor.Dynamic._dragControls; 84Control[]? dragControls = _selectionUIHandlerMock.Object.TestAccessor.Dynamic._dragControls;
System\Windows\Forms\Design\ShortcutKeysEditorTests.cs (2)
42.Setup(e => e.DropDownControl(It.IsAny<Control>())) 46mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\StatusCommandUITests.cs (3)
45using Control control = new() { Bounds = new(10, 20, 30, 40) }; 81using Control control = new() { Bounds = new(10, 20, 30, 40) }; 106using Control control = new() { Bounds = new(10, 20, 30, 40) };
System\Windows\Forms\Design\TabControlDesignerTests.cs (2)
63Control? control = Activator.CreateInstance(controlType) as Control;
System\Windows\Forms\Design\TableLayoutPanelDesignerTests.cs (6)
157foreach (Control control in _tableLayoutPanel.Controls) 213Control[] controls = [button1, button2]; 229Control[] array = new Control[2]; 268List<Control> controls = new(); 272controls.Add((Control)enumerator.Current);
System\Windows\Forms\Design\TabOrderTests.cs (2)
25public Mock<Control> ControlMock { get; } 124List<Control> tabControls = new() { ControlMock.Object };
System\Windows\Forms\Design\ToolStripAdornerWindowServiceTests.cs (4)
17private readonly Control _control; 69_overlayServiceMock.Verify(o => o.RemoveOverlay(It.IsAny<Control>()), Times.Once); 116Control parentControl = new() { Left = 10, Top = 20 }; 117Control control = new() { Parent = parentControl, Left = 30, Top = 40 };
System\Windows\Forms\Design\ToolStripContainerActionListTests.cs (15)
44using Control rootComponent = new(); 47rootComponent.Controls.Cast<Control>().Should().Contain(_toolStripContainer); 53using Control rootComponent = new(); 54using Control childControl1 = new(); 55using Control childControl2 = new(); 66_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().Contain(childControl1); 67_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().Contain(childControl2); 68rootComponent.Controls.Cast<Control>().Should().NotContain(childControl1); 69rootComponent.Controls.Cast<Control>().Should().NotContain(childControl2); 75using Control rootComponent = new(); 76using Control inheritedControl = new(); 87rootComponent.Controls.Cast<Control>().Should().Contain(inheritedControl); 88_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().NotContain(inheritedControl); 192using Control rootComponent = new(); 193using Control childControl = new();
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
66using Control control = new(); 82var value = field?.GetValue(_designer) as Control[];
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (6)
22private readonly Control _editorControl; 51_constructor = _toolStripEditorControlType?.GetConstructor([typeof(Control), typeof(Rectangle)]) 106_behaviorService.AdornerWindowControl.Controls.Cast<Control>().Should().NotContain((Control)_toolStripEditorControl); 132Mock<Control> mockRootComponent = new(); 182_toolStripEditorControlType?.GetProperty("Controls")?.GetValue(_toolStripEditorControl).Should().BeOfType<Control.ControlCollection>();
TestControlDesigner.cs (2)
61internal bool EnableDesignModeMethod(Control child, string name) 81internal void HookChildControlsMethod(Control firstChild)
TestControlDesigner.Mocks.cs (2)
12internal readonly Control _control = new(); 22.Setup(s => s.GetDesigner(It.IsAny<Control>()))
ToolStripMenuItemDesignerTest.cs (2)
106.Setup(s => s.GetDesigner(It.IsAny<Control>())) 135.Setup(s => s.GetDesigner(It.IsAny<Control>()))
System.Windows.Forms.Tests (3428)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (8)
546using Control first = new(); 547using Control second = new(); 574using Control control = new(); 633using Control control = new(); 699using Control control = new(); 718using Control control = new(); 737using Control control = new(); 2163using Control control = new();
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (2)
292private class ControlAccessibleObjectWithNotificationCounter : Control.ControlAccessibleObject 296public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (164)
63using Control ownerControl = new(); 64var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 87using Control ownerControl = new(); 96var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 122Assert.Throws<ArgumentNullException>("ownerControl", () => new Control.ControlAccessibleObject(null)); 128using Control ownerControl = new(); 131Assert.IsType<Control.ControlAccessibleObject>(accessibleObject); 133Control.ControlAccessibleObject controlAccessibleObject = (Control.ControlAccessibleObject)accessibleObject; 147using Control ownerControl = new(); 151Assert.IsType<Control.ControlAccessibleObject>(accessibleObject); 153Control.ControlAccessibleObject controlAccessibleObject = (Control.ControlAccessibleObject)accessibleObject; 166using Control ownerControl = new(); 167var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 181using Control ownerControl = new(); 182var controlAccessibleObject = new Control.ControlAccessibleObject(ownerControl); 200using Control ownerControl = new() 204var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 212using Control ownerControl = new() 216var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 231using Control ownerControl = new() 235var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 258using Control control = new(); 266using Control ownerControl = new(); 269var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 285using Control ownerControl = new(); 286var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 347var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 355using Control parent = new(); 362var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 377var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 436using Control previousControl = new() 447var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 461using Control previousControl = new() 472var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 486using Control previousControl = new() 496var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 547var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 555using Control parent = new(); 563var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 579var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 676using Control previousControl = new() 688var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 702using Control previousControl = new() 714var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 728using Control previousControl = new() 739var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 747using Control ownerControl = new(); 748var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 836using Control ownerControl = new() 840var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 848using Control ownerControl = new(); 850var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 866using Control ownerControl = new(); 867var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 882using Control ownerControl = new(); 883var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 890using Control ownerControl = new(); 891var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 898using Control child = new(); 899using Control ownerControl = new(); 901var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 911using Control ownerControl = new(); 912var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 919using Control ownerControl = new(); 920var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 948using Control ownerControl = new(); 955var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 993using Control ownerControl = new(); 994var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1004using Control ownerControl = new(); 1005var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1013using Control ownerControl = new(); 1014var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1022using Control ownerControl = new(); 1023var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1033using Control ownerControl = new(); 1034var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1044using Control ownerControl = new(); 1045var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1053var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1060using Control ownerControl = new(); 1061var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1070using Control ownerControl = new(); 1071var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1089using Control ownerControl = new(); 1090var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1107using Control ownerControl = new(); 1108var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1115using Control ownerControl = new(); 1116var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1130using Control ownerControl = new(); 1138var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1149using Control ownerControl = new(); 1157var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1166using Control ownerControl = new(); 1167var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1177using Control ownerControl = new(); 1178var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1186using Control ownerControl = new(); 1187var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1197using Control child = new(); 1198using Control ownerControl = new(); 1206var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1217using Control ownerControl = new(); 1218var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1226using Control control = new(); 1240var accessibleObject = new Control.ControlAccessibleObject(control); 1249return ReflectionHelper.GetPublicNotAbstractClasses<Control>() 1258using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1277using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1299using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1317using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1336using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1364foreach (Type type in ReflectionHelper.GetPublicNotAbstractClasses<Control>()) 1383using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1415using Control control = new(); 1431using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1434Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1447using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1463Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1478using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1480Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1494using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1496Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1514using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1532Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1548using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1570Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1586using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1606Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1619using Control ownerControl = new() { Name = "test name" }; 1630Control.ControlAccessibleObject accessibleObject = CreateAndDisposeControl(); 1632Assert.False(accessibleObject.TryGetOwnerAs(out Control _)); 1635static Control.ControlAccessibleObject CreateAndDisposeControl() 1637using Control control = new(); 1638var accessibleObject = (Control.ControlAccessibleObject)control.AccessibilityObject; 1640Assert.True(accessibleObject.TryGetOwnerAs(out Control _)); 1650Control.ControlAccessibleObject accessibleObject = CreateAndDisposeControl(type); 1652Assert.False(accessibleObject.TryGetOwnerAs(out Control _)); 1655static Control.ControlAccessibleObject CreateAndDisposeControl(Type type) 1657using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1658var accessibleObject = (Control.ControlAccessibleObject)control.AccessibilityObject; 1660Assert.True(accessibleObject.TryGetOwnerAs(out Control _)); 1681using var control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1725using var control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1748private static bool CanBeAddedToToolStrip(Control control)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (2)
456Control.ControlAccessibleObject accessibleObject = (Control.ControlAccessibleObject)dataGridView.AccessibilityObject;
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxEditingControlAccessibleObjectTests.cs (1)
117Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject);
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
141Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject);
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (11)
33using Control control = new(); 45using Control parentControl = new(); 46using Control control = new(); 65using Control control = new(); 80using Control control = new(); 119using Control control = new(); 146using Control control = new(); 186using Control control = new(); 213using Control control = new(); 228using Control control = new(); 261using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObjectTests.cs (6)
92using Control control = new(); 106using Control control = new(); 123using Control control = new(); 145using Control control = new(); 163using Control control = new(); 182using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (2)
14private readonly Control _control1; 15private readonly Control _control2;
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (1)
123using Control control = controlCase switch
System\Windows\Forms\AccessibleObjects\LabelAccessibleObjectTests.cs (2)
197private class ControlAccessibleObjectWithNotificationCounter : Control.ControlAccessibleObject 201public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (1)
276Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (8)
24Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 49Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 87Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 106Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (1)
10using static System.Windows.Forms.Control;
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (5)
22using Control control = new(); 34using Control control = new(); 46using Control control = new(); 59using Control control = new(); 72using Control control = new();
System\Windows\Forms\AccessibleObjects\ToolStripNumericUpDown.ToolStripNumericUpDownAccessibleObjectTests.cs (1)
42Control control = toolStripNumericUpDown.Control;
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxControlAccessibleObjectTests.cs (2)
8using static System.Windows.Forms.Control; 32Assert.Throws<TargetInvocationException>(() => Activator.CreateInstance(type, (Control)null));
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (10)
25Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 50Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 88Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 116Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 134Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
System\Windows\Forms\Application.ParkingWindowTests.cs (6)
18Control.CheckForIllegalCrossThreadCalls = true; 77using Control control = new(); 112using Control control = new(); 145using Control control = new(); 178using Control control = new(); 189using Control systemControl = new();
System\Windows\Forms\ApplicationTests.cs (1)
249using Control control = new();
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (20)
162((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 410((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 433((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 459((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 562((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 598((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 629((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 677((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 725((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 843((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 874((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 903((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 935((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 964((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1007((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1051((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1103((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1151((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1199((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1253((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
System\Windows\Forms\AxHostTests.cs (43)
39Assert.Equal(Control.DefaultBackColor, control.BackColor); 77Assert.Equal(Control.DefaultFont, control.Font); 79Assert.Equal(Control.DefaultForeColor, control.ForeColor); 104Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 133Assert.Equal(Control.DefaultBackColor, control.BackColor); 171Assert.Equal(Control.DefaultFont, control.Font); 173Assert.Equal(Control.DefaultForeColor, control.ForeColor); 198Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 351Control parent = new() 390Control parent = new(); 468Control child1 = new(); 469Control child2 = new(); 492Control child1 = new() 496Control child2 = new() 524Assert.Equal(value ?? Control.DefaultFont, control.Font); 530Assert.Equal(value ?? Control.DefaultFont, control.Font); 814((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 908((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1306using Control parent = new(); 1323using Control parent = new(); 1352using Control parent = new(); 1421((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1823using Control parent = new(); 2096((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2120using Control parent = new(); 2162((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2232((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2351((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2393((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2433((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2473((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2515((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2559((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2609((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2653((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2710((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2758((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2806((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2852((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2909((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2957((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 3005((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 3059((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
System\Windows\Forms\BindingContextTests.cs (1)
995Control control = new();
System\Windows\Forms\ButtonBaseTests.cs (31)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 70Assert.Equal(Control.DefaultFont, control.Font); 72Assert.Equal(Control.DefaultForeColor, control.ForeColor); 697yield return new object[] { Color.Empty, Control.DefaultBackColor, 1 }; 754Assert.Equal(Control.DefaultBackColor, control.BackColor); 1139using Control parent = new(); 1310using Control parent = new(); 1550using Control parent = new(); 1717using Control parent = new(); 1887using Control parent = new(); 1991using Control parent = new(); 2811public void ButtonBase_Parent_Set_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2831public void ButtonBase_Parent_SetDesignMode_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2865public void ButtonBase_Parent_SetWithNonNullOldParent_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2867using Control oldParent = new(); 2891using Control parent = new(); 2909public void ButtonBase_Parent_SetWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2943public void ButtonBase_Parent_SetDesignModeWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2992using Control parent = new(); 3077using Control parent = new(); 3172using Control parent = new(); 3317using Control parent = new(); 3433using Control parent = new(); 3551using Control parent = new(); 3660using Control parent = new(); 3761using Control parent = new(); 3858using Control parent = new(); 3971using Control parent = new(); 4087using Control parent = new(); 7190using Control parent = new(); 7292using Control parent = new();
System\Windows\Forms\ButtonTests.cs (16)
33Assert.Equal(Control.DefaultBackColor, control.BackColor); 73Assert.Equal(Control.DefaultFont, control.Font); 75Assert.Equal(Control.DefaultForeColor, control.ForeColor); 299using Control parent = new(); 447using Control parent = new(); 676Assert.Equal(value ?? Control.DefaultFont, control.Font); 682Assert.Equal(value ?? Control.DefaultFont, control.Font); 739Assert.Equal(Control.DefaultFont, control.Font); 793using Control parent = new(); 888using Control parent = new(); 1937using Control parent = new() 2019using Control parent = new() 2924using Control parent = new(); 3026using Control parent = new(); 3121using Control parent = new() 3199using Control parent = new()
System\Windows\Forms\CheckBoxTests.cs (3)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 74Assert.Equal(Control.DefaultFont, control.Font); 76Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ComboBoxTests.cs (6)
81Assert.Equal(Control.DefaultFont, control.Font); 92Assert.Equal(Control.DefaultFont.Height + 2, control.ItemHeight); 994Assert.Equal(value ?? Control.DefaultFont, control.Font); 1000Assert.Equal(value ?? Control.DefaultFont, control.Font); 1037Assert.Equal(Control.DefaultFont, control.Font); 2781private class AutomationEventCountingComboBoxAccessibleObject : Control.ControlAccessibleObject
System\Windows\Forms\CommonDialogTests.cs (4)
155using Control owner = new(); 176using Control owner = new(); 190using Control owner = new(); 212using Control owner = new();
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (1)
44Assert.NotEqual(font, Control.DefaultFont);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (1)
159using Control control = new();
System\Windows\Forms\ContainerControlTests.cs (27)
37Assert.Equal(Control.DefaultBackColor, control.BackColor); 81Assert.Equal(Control.DefaultFont, control.Font); 83Assert.Equal(Control.DefaultForeColor, control.ForeColor); 152using Control child = new(); 153Control grandchild = new(); 202using Control child = new(); 414Assert.Equal(value ?? Control.DefaultFont, control.Font); 420Assert.Equal(value ?? Control.DefaultFont, control.Font); 435Assert.Equal(value ?? Control.DefaultFont, control.Font); 442Assert.Equal(value ?? Control.DefaultFont, control.Font); 480Assert.Equal(Control.DefaultFont, control.Font); 564using Control child = new(); 615using Control child = new(); 796using Control child1 = new(); 797using Control grandchild1 = new(); 800using Control grandchild2 = new(); 1022using Control child1 = new(); 1023using Control grandchild1 = new(); 1026using Control grandchild2 = new(); 1256using Control child1 = new(); 1257using Control child2 = new(); 1286using Control child1 = new(); 1287using Control child2 = new(); 1317using Control control = new(); 1342using Control control = new(); 1367using Control control = new(); 1383using Control control = new();
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (1)
14typeof(Control).Assembly.GetType("System.Windows.Forms.Control+ActiveXFontMarshaler")!,
System\Windows\Forms\Control.ActiveXImplTests.cs (1)
17using Control control = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (53)
19Control control = new(); 26public void Ctor_IBindableComponent(IBindableComponent control, Control expectedControl) 40using Control control = new(); 52yield return new object[] { new Binding(nameof(Control.Text), new object(), "dataMember") }; 59using Control control = new(); 71using Control control = new(); 75Binding binding3 = new(nameof(Control.Text), 1, "dataMember"); 80Binding binding4 = new(nameof(Control.Text), 1, "dataMember"); 94Binding binding = new(nameof(Control.Text), 1, "dataMember"); 126using Control control = new(); 128Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember"); 131Assert.Equal(nameof(Control.Text), binding.PropertyName); 143using Control control = new(); 145Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true); 148Assert.Equal(nameof(Control.Text), binding.PropertyName); 160using Control control = new(); 162Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged); 165Assert.Equal(nameof(Control.Text), binding.PropertyName); 177using Control control = new(); 179Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"); 182Assert.Equal(nameof(Control.Text), binding.PropertyName); 194using Control control = new(); 196Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"); 199Assert.Equal(nameof(Control.Text), binding.PropertyName); 211using Control control = new(); 213Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture); 216Assert.Equal(nameof(Control.Text), binding.PropertyName); 228using Control control = new(); 241using Control control = new(); 255using Control control = new(); 257Binding binding = new(nameof(Control.Text), new object(), "dataMember"); 260Assert.Throws<ArgumentException>("binding", () => collection.Add(new Binding(nameof(Control.Text), new object(), "dataMember"))); 261Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember")); 262Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true)); 263Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged)); 264Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null")); 265Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString")); 266Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 272using Control control = new(); 280using Control control = new(); 291using Control control1 = new(); 292using Control control2 = new(); 304using Control control = new(); 324using Control control = new(); 340using Control control = new(); 352using Control control = new(); 365using Control control1 = new(); 366using Control control2 = new(); 382using Control control = new(); 400using Control control = new(); 402Binding binding = new(nameof(Control.Text), new object(), "member"); 413using Control control = new(); 415Binding binding = new(nameof(Control.Text), new object(), "member");
System\Windows\Forms\ControlEventArgsTests.cs (1)
18public void Ctor_Control(Control control)
System\Windows\Forms\ControlTests.ControlCollection.cs (470)
19using Control owner = new(); 20Control.ControlCollection collection = new(owner); 30Assert.Throws<ArgumentNullException>("owner", () => new Control.ControlCollection(null)); 36using Control owner = new(); 37using Control control1 = new(); 38using Control control2 = new(); 39var collection = new Control.ControlCollection(owner); 44Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 69Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 84Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 99Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 110using Control owner = new(); 111using Control control1 = new(); 112using Control control2 = new(); 113Control.ControlCollection collection = owner.Controls; 119Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 145Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 150Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 161Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 166Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 176Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 187using Control owner1 = new(); 188using Control owner2 = new(); 189using Control control = new(); 190Control.ControlCollection collection1 = owner1.Controls; 191Control.ControlCollection collection2 = owner2.Controls; 197Assert.Same(collection2.Cast<Control>().Last(), e.AffectedControl); 226using Control owner = new(); 227Control.ControlCollection collection = owner.Controls; 233Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 282Control.ControlCollection collection = owner.Controls; 291Assert.Equal(new Control[] { control1 }, collection.Cast<Control>()); 301Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 315Assert.Equal(new Control[] { control1, control2, control3 }, collection.Cast<Control>()); 331using Control owner = new(); 332using Control control = new() 336Control.ControlCollection collection = owner.Controls; 360using Control owner = new(); 361using Control control = new() 365Control.ControlCollection collection = owner.Controls; 389using Control owner = new(); 390using Control control = new() 394var collection = new Control.ControlCollection(owner); 428using Control owner = new(); 429using Control control = new() 433Control.ControlCollection collection = owner.Controls; 467using Control owner = new(); 468using Control child1 = new(); 469using Control child2 = new(); 470Control.ControlCollection collection = owner.Controls; 545using Control owner = new(); 546using Control control = new(); 547var collection = new Control.ControlCollection(owner); 573Assert.Equal(Control.DefaultFont, control.Font); 575Assert.Equal(Control.DefaultForeColor, control.ForeColor); 577Assert.Equal(Control.DefaultBackColor, control.BackColor); 588using Control owner = new(); 589using Control control = new(); 590var collection = new Control.ControlCollection(owner); 617Assert.Equal(Control.DefaultFont, control.Font); 619Assert.Equal(Control.DefaultForeColor, control.ForeColor); 621Assert.Equal(Control.DefaultBackColor, control.BackColor); 643using Control owner = new(); 644using Control control = new(); 645var collection = new Control.ControlCollection(owner); 653Assert.Equal(Control.DefaultFont, control.Font); 655Assert.Equal(Control.DefaultForeColor, control.ForeColor); 657Assert.Equal(Control.DefaultBackColor, control.BackColor); 793using Control owner = new(); 794using Control control = new(); 795var collection = new Control.ControlCollection(owner); 803Assert.Equal(Control.DefaultFont, control.Font); 805Assert.Equal(Control.DefaultForeColor, control.ForeColor); 807Assert.Equal(Control.DefaultBackColor, control.BackColor); 946using Control owner = new(); 948var collection = new Control.ControlCollection(owner); 956Assert.Equal(Control.DefaultFont, control.Font); 958Assert.Equal(Control.DefaultForeColor, control.ForeColor); 960Assert.Equal(Control.DefaultBackColor, control.BackColor); 962Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 981((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 983((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 984((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 985((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 986((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 987((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 1004Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 1019using Control owner = new(); 1021var collection = new Control.ControlCollection(owner); 1029Assert.Equal(Control.DefaultFont, control.Font); 1031Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1033Assert.Equal(Control.DefaultBackColor, control.BackColor); 1035Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 1043((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1061((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 1063((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 1064((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 1065((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 1066((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 1067((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 1084Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 1113using Control owner = new(); 1116var collection = new Control.ControlCollection(owner); 1123Control owner = null; 1134using Control control = new(); 1135var collection = new Control.ControlCollection(owner); 1147Control control = null; 1158using Control owner = new(); 1159var collection = new Control.ControlCollection(owner); 1171using Control owner = new(); 1172var collection = new Control.ControlCollection(owner); 1179using Control parent = new(); 1180using Control owner = new() 1184var collection = new Control.ControlCollection(owner); 1191using Control grandparent = new(); 1192using Control parent = new() 1196using Control owner = new() 1200var collection = new Control.ControlCollection(owner); 1207using Control owner = new(); 1208using Control child1 = new(); 1209using Control child2 = new(); 1210using Control child3 = new(); 1211Control.ControlCollection collection = owner.Controls; 1232Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1246Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1258collection.AddRange(Array.Empty<Control>()); 1259Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1279using Control owner = new(); 1280var collection = new Control.ControlCollection(owner); 1287using Control owner = new(); 1288using Control child1 = new(); 1289using Control child2 = new(); 1290using Control child3 = new(); 1291var collection = new Control.ControlCollection(owner) 1337using Control owner = new(); 1338using Control child1 = new(); 1339using Control child2 = new(); 1340using Control child3 = new(); 1341var sourceCollection = new Control.ControlCollection(owner); 1356var collection = Assert.IsType<Control.ControlCollection>(iCloneable.Clone()); 1358Assert.Equal(new Control[] { child1, child2, child3 }, sourceCollection.Cast<Control>()); 1359Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1380using Control owner = new(); 1381var collection = new Control.ControlCollection(owner); 1382using Control child1 = new(); 1383using Control child2 = new(); 1405using Control owner = new(); 1406using Control child1 = new() 1410using Control child2 = new() 1414using Control child3 = new() 1418var collection = new Control.ControlCollection(owner) 1437using Control owner = new(); 1438using Control child1 = new() 1442using Control child2 = new() 1446using Control child3 = new() 1450using Control grandchild1 = new() 1454using Control grandchild2 = new() 1458using Control grandchild3 = new() 1465Control.ControlCollection collection = owner.Controls; 1490using Control owner = new(); 1491using Control child1 = new() 1495using Control child2 = new() 1499using Control child3 = new() 1503Control.ControlCollection collection = owner.Controls; 1516using Control owner = new(); 1517var collection = new Control.ControlCollection(owner); 1525using Control owner = new(); 1526var collection = new Control.ControlCollection(owner); 1527using Control child1 = new(); 1528using Control child2 = new(); 1539using Control owner = new(); 1540var collection = new Control.ControlCollection(owner); 1541using Control child1 = new(); 1542using Control child2 = new(); 1553using Control owner = new(); 1554var collection = new Control.ControlCollection(owner); 1555using Control child1 = new(); 1556using Control child2 = new(); 1574public void ControlCollection_GetChildIndex_NoSuchControl_ThrowsArgumentException(Control child) 1576using Control owner = new(); 1577var collection = new Control.ControlCollection(owner); 1578using Control child1 = new(); 1579using Control child2 = new(); 1590using Control owner = new(); 1591var collection = new Control.ControlCollection(owner); 1611using Control owner = new(); 1612using Control child1 = new(); 1613using Control child2 = new(); 1614using Control child3 = new(); 1615var collection = new Control.ControlCollection(owner) 1650using Control owner = new(); 1651using Control child = new(); 1652var collection = new Control.ControlCollection(owner); 1673using Control owner = new(); 1674using Control child1 = new(); 1675using Control child2 = new(); 1676using Control child3 = new(); 1677var collection = new Control.ControlCollection(owner) 1706using Control owner = new(); 1707using Control child1 = new(); 1708using Control child2 = new(); 1709using Control child3 = new(); 1710var collection = new Control.ControlCollection(owner) 1746using Control owner = new(); 1747var collection = new Control.ControlCollection(owner); 1748using Control child1 = new(); 1749using Control child2 = new(); 1771using Control owner = new(); 1772using Control child1 = new() 1776using Control child2 = new() 1780using Control child3 = new() 1784var collection = new Control.ControlCollection(owner) 1804using Control owner = new(); 1805using Control child1 = new() 1809using Control child2 = new() 1813using Control child3 = new() 1817var collection = new Control.ControlCollection(owner) 1840using Control owner = new(); 1841using Control child1 = new() 1845using Control child2 = new() 1849using Control child3 = new() 1853var collection = new Control.ControlCollection(owner) 1870using Control owner = new(); 1871using Control child1 = new(); 1872using Control child2 = new(); 1873using Control child3 = new(); 1874var collection = new Control.ControlCollection(owner) 1892using Control owner = new(); 1893var collection = new Control.ControlCollection(owner); 1903using Control owner = new(); 1904using Control child = new(); 1905var collection = new Control.ControlCollection(owner) 1915using Control owner = new(); 1916using Control child1 = new(); 1917using Control child2 = new(); 1918var collection = new Control.ControlCollection(owner) 1940Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1950Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1960Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1978using Control child1 = new(); 1979using Control child2 = new(); 1980var collection = new Control.ControlCollection(owner) 2004Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2015Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2026Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2044using Control owner = new(); 2045using Control child1 = new(); 2046using Control child2 = new(); 2047Control.ControlCollection collection = owner.Controls; 2074Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2087Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2100Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2120using Control owner = new(); 2121using Control child1 = new(); 2122using Control child2 = new(); 2123Control.ControlCollection collection = owner.Controls; 2156Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2172Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2188Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2211using Control owner1 = new(); 2212using Control owner2 = new(); 2213using Control control1 = new(); 2214using Control control2 = new(); 2215using Control control3 = new(); 2216var collection1 = new Control.ControlCollection(owner1); 2217var collection2 = new Control.ControlCollection(owner2); 2223Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2224Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2230Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2231Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2239using Control owner = new(); 2240using Control control = new(); 2241var collection = new Control.ControlCollection(owner) 2270Assert.Equal(Control.DefaultFont, control.Font); 2272Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2274Assert.Equal(Control.DefaultBackColor, control.BackColor); 2285using Control owner = new(); 2286using Control control = new(); 2287var collection = new Control.ControlCollection(owner) 2317Assert.Equal(Control.DefaultFont, control.Font); 2319Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2321Assert.Equal(Control.DefaultBackColor, control.BackColor); 2343using Control owner = new(); 2344using Control control = new(); 2345var collection = new Control.ControlCollection(owner) 2461Assert.Equal(Control.DefaultFont, control.Font); 2463Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2465Assert.Equal(Control.DefaultBackColor, control.BackColor); 2487using Control owner = new(); 2488using Control control = new(); 2489var collection = new Control.ControlCollection(owner) 2594Assert.Equal(Control.DefaultFont, control.Font); 2596Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2598Assert.Equal(Control.DefaultBackColor, control.BackColor); 2619using Control owner = new(); 2621var collection = new Control.ControlCollection(owner) 2638Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 2652((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 2654((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 2655((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 2656((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 2657((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 2658((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 2667Assert.Equal(Control.DefaultFont, control.Font); 2669Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2671Assert.Equal(Control.DefaultBackColor, control.BackColor); 2673Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 2683using Control owner = new(); 2685var collection = new Control.ControlCollection(owner) 2702Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 2710((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2728((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 2730((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 2731((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 2732((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 2733((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 2734((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 2745Assert.Equal(Control.DefaultFont, control.Font); 2747Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2749Assert.Equal(Control.DefaultBackColor, control.BackColor); 2751Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 2769using Control owner = new(); 2770using Control child1 = new(); 2771using Control child2 = new(); 2772var collection = new Control.ControlCollection(owner) 2847using Control owner = new(); 2848using Control child1 = new(); 2849using Control child2 = new(); 2850var collection = new Control.ControlCollection(owner) 2874Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 2885Assert.Empty(collection.Cast<Control>()); 2905using Control owner = new(); 2906var collection = new Control.ControlCollection(owner); 2916using Control owner = new(); 2917using Control child = new(); 2918var collection = new Control.ControlCollection(owner) 2930using Control owner = new(); 2931using Control child1 = new() 2935using Control child2 = new() 2939using Control child3 = new() 2943var collection = new Control.ControlCollection(owner) 2968Assert.Equal(new Control[] { child1, child3 }, collection.Cast<Control>()); 2981Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 3006using Control owner = new(); 3007using Control child1 = new() 3011using Control child2 = new() 3015using Control child3 = new() 3019var collection = new Control.ControlCollection(owner) 3027Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3031Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3037using Control owner = new(); 3038using Control child1 = new(); 3039using Control child2 = new(); 3040using Control child3 = new(); 3041var collection = new Control.ControlCollection(owner) 3065Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3075Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3085Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3105using Control owner = new(); 3106using Control child1 = new(); 3107using Control child2 = new(); 3108using Control child3 = new(); 3109var collection = new Control.ControlCollection(owner) 3133Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3143Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3160using Control owner = new(); 3161using Control child1 = new(); 3162using Control child2 = new(); 3163using Control child3 = new(); 3164Control.ControlCollection collection = owner.Controls; 3193Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3206Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3219Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3239using Control owner = new(); 3240using Control child1 = new(); 3241using Control child2 = new(); 3242using Control child3 = new(); 3243Control.ControlCollection collection = owner.Controls; 3278Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3294Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3310Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3333using Control owner = new(); 3335using Control child2 = new(); 3336using Control child3 = new(); 3337Control.ControlCollection collection = owner.Controls; 3367Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3380Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3393Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3413using Control owner = new(); 3414var collection = new Control.ControlCollection(owner); 3421using Control owner = new(); 3422using Control child = new(); 3423var collection = new Control.ControlCollection(owner) 3433using Control owner = new(); 3434using Control control1 = new(); 3435using Control control2 = new(); 3442Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 3469Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 3474Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 3485Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 3490Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 3507using Control owner = new(); 3508IList collection = new Control.ControlCollection(owner); 3516using Control owner = new(); 3517using Control child1 = new(); 3518using Control child2 = new(); 3519IList collection = new Control.ControlCollection(owner) 3541Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3551Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3561Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3578using Control owner = new(); 3579IList collection = new Control.ControlCollection(owner);
System\Windows\Forms\ControlTests.cs (52)
27Assert.Equal(Control.DefaultBackColor, control.BackColor); 63Assert.Equal(Control.DefaultFont, control.Font); 65Assert.Equal(Control.DefaultForeColor, control.ForeColor); 116Assert.Equal(Control.DefaultBackColor, control.BackColor); 152Assert.Equal(Control.DefaultFont, control.Font); 154Assert.Equal(Control.DefaultForeColor, control.ForeColor); 212Assert.Equal(Control.DefaultBackColor, control.BackColor); 248Assert.Equal(Control.DefaultFont, control.Font); 250Assert.Equal(Control.DefaultForeColor, control.ForeColor); 298public void Control_Ctor_Control_String(Control parent, string text, string expectedText) 308Assert.Equal(Control.DefaultBackColor, control.BackColor); 344Assert.Equal(Control.DefaultFont, control.Font); 346Assert.Equal(Control.DefaultForeColor, control.ForeColor); 394public void Control_Ctor_Control_String_Int_Int_Int_Int(Control parent, string text, int left, int top, int width, int height, string expectedText) 404Assert.Equal(Control.DefaultBackColor, control.BackColor); 440Assert.Equal(Control.DefaultFont, control.Font); 442Assert.Equal(Control.DefaultForeColor, control.ForeColor); 484Assert.Equal(SystemColors.Control, Control.DefaultBackColor); 490Assert.Equal(SystemColors.ControlText, Control.DefaultForeColor); 496Font font = Control.DefaultFont; 497Assert.Equal(SystemFonts.MessageBoxFont, Control.DefaultFont); 498Assert.Same(font, Control.DefaultFont); 574using Control parent = new(); 599using Control parent = new(); 791Control nextControl1 = control.GetNextControl(button1, forward: true); 792Control nextControl2 = control.GetNextControl(button2, forward: true); 793Control nextControl3 = control.GetNextControl(button3, forward: true); 810Control previousControl1 = control.GetNextControl(button1, forward: false); 811Control previousControl2 = control.GetNextControl(button2, forward: false); 812Control previousControl3 = control.GetNextControl(button3, forward: false); 829Control nextControl1 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 830Control nextControl2 = control.GetNextSelectableControl(button2, forward: true, tabStopOnly: true, nested: true, wrap: true); 831Control nextControl3 = control.GetNextSelectableControl(button3, forward: true, tabStopOnly: true, nested: true, wrap: true); 832Control nextControl4 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 850Control previousControl1 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 851Control previousControl2 = control.GetNextSelectableControl(button3, forward: false, tabStopOnly: true, nested: true, wrap: true); 852Control previousControl3 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 853Control previousControl4 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 905Control previousControl1 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 906Control previousControl2 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 907Control previousControl3 = control.GetNextSelectableControl(checkBox2, forward: false, tabStopOnly: true, nested: true, wrap: true); 908Control previousControl4 = control.GetNextSelectableControl(checkBox1, forward: false, tabStopOnly: true, nested: true, wrap: true); 909Control previousControl5 = control.GetNextSelectableControl(radioButton1, forward: false, tabStopOnly: true, nested: true, wrap: true); 910Control previousControl6 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 1229public SubControl(Control parent, string text) : base(parent, text) 1233public SubControl(Control parent, string text, int left, int top, int width, int height) : base(parent, text, left, top, width, height) 1237public Control GetNextSelectableControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 1316public new void InvokeGotFocus(Control toInvoke, EventArgs e) => base.InvokeGotFocus(toInvoke, e); 1318public new void InvokeLostFocus(Control toInvoke, EventArgs e) => base.InvokeLostFocus(toInvoke, e); 1320public new void InvokePaint(Control c, PaintEventArgs e) => base.InvokePaint(c, e); 1322public new void InvokePaintBackground(Control c, PaintEventArgs e) => base.InvokePaintBackground(c, e);
System\Windows\Forms\ControlTests.Handlers.cs (63)
133using Control child1 = new(); 134using Control child2 = new(); 180using Control child1 = new() 184using Control child2 = new() 328using Control child1 = new(); 329using Control child2 = new(); 379using Control child1 = new() 383using Control child2 = new() 509using Control child1 = new(); 510using Control child2 = new(); 556using Control child1 = new() 560using Control child2 = new() 657using Control child1 = new(); 658using Control child2 = new(); 706using Control child1 = new() 710using Control child2 = new() 1107using Control child1 = new(); 1108using Control child2 = new(); 1156using Control child1 = new() 1160using Control child2 = new() 1504using Control child1 = new(); 1505using Control child2 = new(); 1551using Control child1 = new() 1555using Control child2 = new() 1641Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1648Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1672Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1679Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1718Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1728Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1739using Control child1 = new(); 1740using Control child2 = new(); 1788using Control child1 = new() 1792using Control child2 = new() 1960using Control child1 = new(); 1961using Control child2 = new(); 2007using Control child1 = new() 2011using Control child2 = new() 2619Control parent = new(); 2679Control parent = new(); 3137using Control parent = new(); 3891Control control = new() 3899foreach (Control parent in new Control[] { control, tabPage }) 3932Control control = new() 3941foreach (Control parent in new Control[] { control, tabPage }) 3976public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4109using Control parent = new() 5031using Control child1 = new(); 5032using Control child2 = new() 5081using Control child1 = new() 5085using Control child2 = new() 5362using Control child1 = new(); 5363using Control child2 = new(); 5580using Control parent = new(); 5667using Control parent = new(); 5721using Control grandchild1 = new(); 5722using Control child1 = new(); 5723using Control child2 = new(); 5797using Control grandchild1 = new(); 5798using Control child1 = new() 5802using Control child2 = new()
System\Windows\Forms\ControlTests.Internals.cs (47)
16using Control control = new(); 28using Control control = new() 40using Control control = new() 55using Control control = new() 74using Control control = new() 93using Control control = new(); 111using Control control = new() 152using Control control = new() 164using Control control = new() 176using Control control = new(); 188using Control control = new(); 200using Control control = new(); 208using Control control = new(); 209Control parent = new(); 220using Control control = new(); 222Control parent = new(); 232using Control control = new(); 241using Control control = new() 253using Control control = new() 265using Control control = new(); 266Control parent = new(); 277using Control control = new(); 287using Control control = new(); 288Control first = new() 292Control second = new() 296Control third = new() 300var ordered = new Control[] 306var unordered = new Control[] 314Control[] tabOrderedChildren = control.GetChildControlsInTabOrder(false); 322using Control control = new(); 323Control first = new() 327Control second = new() 331Control third = new() 335var unordered = new Control[] 343Control[] tabOrderedChildrenWithhandlesOnly = control.GetChildControlsInTabOrder(true); 351using Control control = new(); 352Control first = new() 356Control second = new() 360Control third = new() 364var tabOrder = new Control[] 379using Control control = new(); 380Control first = new() 384Control second = new() 388Control third = new() 392var tabOrder = new Control[] 407using Control control = new(); 413static void CreateAndDispose(Control control)
System\Windows\Forms\ControlTests.Methods.ClipboardTests.cs (2)
33using Control control = new(); 43using Control control = new();
System\Windows\Forms\ControlTests.Methods.cs (259)
136using Control parent = new(); 137using Control child1 = new(); 138using Control child2 = new(); 141Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 156Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 165Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 178using Control parent = new(); 179using Control child1 = new(); 180using Control child2 = new(); 183Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 205Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 217Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 233using Control parent = new(); 234using Control child1 = new(); 235using Control child2 = new(); 238Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 266Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 281Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 300using Control parent = new(); 302using Control child2 = new(); 305Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 328Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 340Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 406Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 518using Control parent = new(); 579using Control control = new() 626Control.ControlCollection controls = Assert.IsType<Control.ControlCollection>(control.CreateControlsInstance()); 705using Control parent = new(); 793using Control parent = new(); 794using Control control = new() 798using Control child1 = new() 802using Control child2 = new() 806using Control grandchild1 = new() 810using Control otherParent = new(); 811using Control otherControl = new() 815using Control emptyControl = new(); 858using Control parent = new(); 988using Control control = new(); 1033using Control parent = new(); 1036using Control control = new() 1086using Control control = new(); 1087using Control child1 = new(); 1088using Control child2 = new(); 1164using Control control = new(); 1211using Control control = new(); 1564Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1585Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1831using Control control = new(); 1839using Control control = new(); 1948using Control control = new(); 1957using Control control = new(); 1967Assert.Same(control, Control.FromChildHandle(handle)); 1971Assert.Null(Control.FromChildHandle(handle)); 1981Assert.Null(Control.FromChildHandle(handle)); 1985Assert.Null(Control.FromChildHandle(handle)); 2002Assert.Same(parent, Control.FromChildHandle(window.Handle)); 2006Assert.Null(Control.FromChildHandle(window.Handle)); 2012Assert.Null(Control.FromChildHandle(IntPtr.Zero)); 2013Assert.Null(Control.FromChildHandle(1)); 2022Assert.Same(control, Control.FromHandle(handle)); 2026Assert.Null(Control.FromHandle(handle)); 2036Assert.Null(Control.FromHandle(handle)); 2040Assert.Null(Control.FromHandle(handle)); 2057Assert.Null(Control.FromHandle(window.Handle)); 2061Assert.Null(Control.FromHandle(window.Handle)); 2067Assert.Null(Control.FromHandle(IntPtr.Zero)); 2068Assert.Null(Control.FromHandle(1)); 2075using Control control = new(); 2095using Control control = new(); 2109using Control control = new(); 2116using Control grandparent = new(); 2117using Control parent = new() 2121using Control control = new() 2138using Control parent = new() 2142using Control control = new() 2159using Control control = new() 2177using Control parent = new() 2181using Control control = new() 2199using Control parent = new() 2203using Control control = new() 2220using Control cont = new(); 2221using Control first = new() 2225using Control second = new() 2229using Control third = new() 2233var tabOrder = new Control[] 2248using Control cont = new(); 2249using Control first = new() 2253using Control second = new() 2257using Control third = new() 2261var tabOrder = new Control[] 2276using Control cont = new(); 2277using Control first = new() 2281using Control second = new() 2285using Control third = new() 2289var tabOrder = new Control[] 2304using Control cont = new(); 2305using Control first = new() 2309using Control second = new() 2313using Control third = new() 2317var tabOrder = new Control[] 2342using Control control = new(); 2355using Control control = new() 2394using Control control = new() 2879using Control control = new() 2894using Control control = new() 3769using Control control = new(); 3794using Control control = new(); 3820using Control control = new(); 3849using Control control = new(); 3883using Control control = new(); 3919using Control control = new(); 3952using Control control = new(); 3985using Control control = new(); 4011using Control control = new(); 4038using Control control = new(); 4073using Control control = new(); 4103using Control control = new(); 4145using Control control = new(); 4154using Control control = new(); 4166using Control otherControl = new(); 4290using Control otherControlParent = new(); 4342using Control otherControl = new(); 4504Assert.Equal(expected, Control.IsMnemonic(charCode, text)); 4745using Control control = new(); 4799using Control parent = new(); 4800using Control control = new() 4834using Control parent = new(); 4951using Control control = new(); 4996public void Control_PerformLayout_InvokeControlString_Success(Control affectedControl, string affectedProperty) 4998using Control control = new(); 5020public void Control_PerformLayout_InvokeControlStringCustomLayoutEngine_Success(Control affectedControl, string affectedProperty) 5052public void Control_PerformLayout_InvokeControlStringWithParent_Success(Control affectedControl, string affectedProperty) 5054using Control parent = new(); 5055using Control control = new() 5097public void Control_PerformLayout_InvokeControlStringWithParentCustomLayoutEngine_Success(bool parentNeedsLayout, Control affectedControl, string affectedProperty, int expectedParentLayoutCallCount) 5099using Control parent = new(); 5160public void Control_PerformLayout_InvokeControlStringSuspended_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5186public void Control_PerformLayout_InvokeControlStringSuspendedMultipleTimes_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5225using Control control = new(); 5345using Control parent = new(); 5522using Control parent = new(); 5575using Control parent = new(); 5623using Control parent = new(); 5723using Control parent = new(); 6014using Control parent = new(); 6222using Control parent = new(); 6308using Control control = new(); 6320using Control control = new(); 6361using Control control = new(); 6365Assert.Equal(Control.DefaultBackColor, control.BackColor); 6370Assert.Equal(Control.DefaultBackColor, control.BackColor); 6374Assert.Equal(Control.DefaultBackColor, control.BackColor); 6419using Control control = new(); 6424Assert.Equal(Control.DefaultFont, control.Font); 6429Assert.Equal(Control.DefaultFont, control.Font); 6433Assert.Equal(Control.DefaultFont, control.Font); 6439using Control control = new(); 6443Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6448Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6452Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6563public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6565using Control control = new(); 6591public void Control_ResumeLayout_InvokeSuspendedWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6593using Control control = new(); 6623using Control control = new(); 6641public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6643using Control control = new(); 6671public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6673using Control control = new(); 6704using Control control = new(); 6727using Control child = new(); 6756using Control control = new(); 6775using Control child = new(); 6800public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequestWithHandle_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6802using Control control = new(); 7003using Control parent = new(); 7004using Control child1 = new(); 7005using Control child2 = new(); 7008Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7023Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7032Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7045using Control parent = new(); 7046using Control child1 = new(); 7047using Control child2 = new(); 7050Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7072Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7084Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7100using Control parent = new(); 7101using Control child1 = new(); 7102using Control child2 = new(); 7105Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7133Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7148Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7167using Control parent = new(); 7169using Control child2 = new(); 7172Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7195Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7207Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7288using Control parent = new(); 7661using Control parent = new(); 7918using Control parent = new(); 8518using Control parent = new(); 8775using Control parent = new(); 9315using Control parent = new(); 9613using Control parent = new(); 10099using Control parent = new(); 10202using Control control = new() 10220using Control control = new() 10251using Control control = new(); 10268using Control control = new(); 10298using Control control = new(); 10305using Control control = new(); 10317using Control control = new(); 11218using Control parent = new(); 11456using Control parent = new(); 11704using Control parent = new(); 11954using Control parent = new(); 12163using Control parent = new(); 12182using Control parent = new(); 12214using Control parent = new(); 12247using Control parent = new(); 12291using Control parent = new(); 12292using Control child1 = new(); 12338using Control parent = new(); 12527using Control control = new(); 12601using Control control = new(); 14165public Control ActiveControl { get; set; } 14167public Func<Control, bool> ActivateControlAction { get; set; } 14169public bool ActivateControl(Control active) => ActivateControlAction(active); 14222using Control grandparent = new(); 14310using Control grandparent = new();
System\Windows\Forms\ControlTests.Properties.cs (470)
23using Control control = new(); 30Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject); 39using Control control = new(); 48Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject); 83using Control control1 = new(); 84var controlAccessibleObject = new Control.ControlAccessibleObject(control1); 111using Control control = new() 128using Control control = new() 145using Control control = new() 162using Control control = new() 179using Control control = new(); 187using Control control = new() 209using Control control = new(); 246using Control control = new(); 286using Control control = new(); 341using Control control = new(); 363using Control control = new() 414using Control parent = new(); 415using Control control = new() 459using Control grandparent = new(); 460using Control parent = new() 464using Control control = new() 560using Control parent = new(); 561using Control control = new() 679using Control grandparent = new(); 680using Control parent = new() 684using Control control = new() 771using Control control = new() 825using Control parent = new(); 826using Control control = new() 873using Control control = new(); 908using Control control = new() 923using Control control = new(); 950using Control parent = new(); 951using Control control = new() 1005using Control control = new() 1068using Control control = new(); 1111using Control parent = new(); 1112using Control control = new() 1194using Control control = new() 1233using Control control = new() 1250using Control control = new() 1269yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1293using Control child1 = new(); 1294using Control child2 = new(); 1295using Control control = new(); 1317using Control child1 = new() 1321using Control child2 = new() 1325using Control control = new(); 1346yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1353using Control control = new(); 1381using Control control = new(); 1403Assert.Equal(Control.DefaultBackColor, control.BackColor); 1416using Control control = new(); 1441using Control child1 = new(); 1442using Control child2 = new(); 1443using Control control = new(); 1498Assert.Equal(Control.DefaultBackColor, control.BackColor); 1499Assert.Equal(Control.DefaultBackColor, child1.BackColor); 1500Assert.Equal(Control.DefaultBackColor, child2.BackColor); 1521using Control child1 = new() 1525using Control child2 = new() 1529using Control control = new(); 1578Assert.Equal(Control.DefaultBackColor, control.BackColor); 1601using Control control = new(); 1608PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1609using Control control = new(); 1617Assert.Equal(Control.DefaultBackColor, control.BackColor); 1624PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1625using Control control = new(); 1633Assert.Equal(Control.DefaultBackColor, control.BackColor); 1641using Control control = new() 1664using Control control = new(); 1693using Control child1 = new(); 1694using Control child2 = new(); 1695using Control control = new(); 1717using Control child1 = new() 1721using Control child2 = new() 1725using Control control = new(); 1744using Control control = new(); 1786using Control control = new(); 1812using Control child1 = new(); 1813using Control child2 = new(); 1814using Control control = new(); 1899using Control child1 = new() 1903using Control child2 = new() 1907using Control control = new(); 2077using Control control = new(); 2112using Control control = new(); 2138using Control control = new(); 2146using Control parent = new() 2150using Control control = new() 2165using Control control = new() 2182using Control control = new() 2199using Control control = new() 2217using Control control = new(); 2259using Control child1 = new(); 2260using Control child2 = new(); 2261using Control control = new(); 2346using Control child1 = new() 2350using Control child2 = new() 2354using Control control = new(); 2697using Control parent = new(); 2908using Control parent = new(); 3051using Control control = new() 3067using Control control = new() 3082using Control parent = new() 3087using Control control = new() 3101using Control control = new() 3117using Control parent = new() 3122using Control control = new() 3134using Control control = new() 3156using Control control = new(); 3193using Control control = new() 3215using Control control = new(); 3251using Control control = new() 3296public void Control_ClientSize_Get_ReturnsExpected(Control control, Size expected) 3330using Control control = new(); 3488using Control control = new(); 3542using Control control = new() 3560using Control control = new() 3578using Control control = new() 3593using Control control = new() 3609using Control control = new(); 3651yield return new object[] { new Control.ControlCollection(new Control()) }; 3656public void Control_Controls_GetCustomCreateControlsInstance_ReturnsExpected(Control.ControlCollection result) 3677PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3678using Control control = new(); 3684using Control child = new(); 3697PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3698using Control control = new(); 3704using Control child = new(); 3718using Control control = new() 3734using Control parent = new() 3738using Control control = new() 3758using Control control = new() 3786using Control parent = new() 3812using Control control = new() 3829using Control control = new(); 3858using Control child1 = new(); 3859using Control child2 = new(); 3860using Control control = new(); 3882using Control child1 = new() 3886using Control child2 = new() 3890using Control control = new(); 3909using Control control = new(); 3951using Control child1 = new(); 3952using Control child2 = new(); 3953using Control control = new(); 4038using Control child1 = new() 4042using Control child2 = new() 4046using Control control = new(); 4130using Control control = new(); 4152using Control control = new() 4187using Control parent = new(); 4188using Control control = new() 4277using Control parent = new(); 4278using Control control = new() 4334using Control control = new() 4353using Control control = new(); 4387using Control control = new() 4426using Control control = new(); 4508using Control control = new() 4571using Control control = new() 4609using Control child1 = new(); 4610using Control child2 = new(); 4611using Control control = new() 4686using Control child1 = new() 4690using Control child2 = new() 4694using Control control = new() 4769PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4770using Control control = new(); 4785PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4786using Control control = new(); 4803using Control parent = new() 4807using Control control = new() 4827using Control control = new() 4831Assert.Equal(Control.DefaultFont, control.Font); 4846Assert.Equal(value ?? Control.DefaultFont, control.Font); 4852Assert.Equal(value ?? Control.DefaultFont, control.Font); 4873Assert.Equal(value ?? Control.DefaultFont, control.Font); 4879Assert.Equal(value ?? Control.DefaultFont, control.Font); 4887yield return new object[] { null, Control.DefaultFont.Height }; 4902Assert.Equal(value ?? Control.DefaultFont, control.Font); 4908Assert.Equal(value ?? Control.DefaultFont, control.Font); 4923Assert.Equal(value ?? Control.DefaultFont, control.Font); 4929Assert.Equal(value ?? Control.DefaultFont, control.Font); 4960Assert.Equal(value ?? Control.DefaultFont, control.Font); 4969Assert.Equal(value ?? Control.DefaultFont, control.Font); 5006Assert.Equal(value ?? Control.DefaultFont, control.Font); 5015Assert.Equal(value ?? Control.DefaultFont, control.Font); 5026using Control control = new(); 5055Assert.Equal(Control.DefaultFont, control.Font); 5068using Control child1 = new(); 5069using Control child2 = new(); 5070using Control control = new(); 5130Assert.Equal(Control.DefaultFont, control.Font); 5131Assert.Equal(Control.DefaultFont, child1.Font); 5132Assert.Equal(Control.DefaultFont, child2.Font); 5155using Control child1 = new() 5159using Control child2 = new() 5163using Control control = new(); 5223Assert.Equal(Control.DefaultFont, control.Font); 5246PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5247using Control control = new(); 5256Assert.Equal(Control.DefaultFont, control.Font); 5264Assert.Equal(Control.DefaultFont, control.Font); 5271PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5272using Control control = new(); 5281Assert.Equal(Control.DefaultFont, control.Font); 5289Assert.Equal(Control.DefaultFont, control.Font); 5297using Control control = new() 5314using Control control = new() 5333using Control child1 = new(); 5334using Control child2 = new(); 5335using Control control = new(); 5357using Control child1 = new() 5361using Control child2 = new() 5365using Control control = new(); 5387yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 5394using Control control = new(); 5422using Control control = new(); 5444Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5457using Control control = new(); 5482using Control child1 = new(); 5483using Control child2 = new(); 5484using Control control = new(); 5539Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5540Assert.Equal(Control.DefaultForeColor, child1.ForeColor); 5541Assert.Equal(Control.DefaultForeColor, child2.ForeColor); 5562using Control child1 = new() 5566using Control child2 = new() 5570using Control control = new(); 5619Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5642PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5643using Control control = new(); 5651Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5658PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5659using Control control = new(); 5667Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5674using Control cont = new(); 5974using Control parent = new(); 6209using Control parent = new(); 6367using Control control = new() 6384using Control control = new(); 6412using Control control = new(); 6448using Control control = new(); 6562using Control control = new(); 6575using Control control = new(); 6589using Control control = new() 6610using Control control = new(); 6641using Control control = new(); 6744using Control parent = new(); 6938using Control parent = new(); 7091using Control control = new(); 7149using Control control = new(); 7223using Control parent = new(); 7421using Control parent = new(); 7576PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7577using Control control = new(); 7600PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7601using Control control = new(); 7624using Control control = new(); 7684public void Control_Margin_GetWithCustomDefaultMargin_ReturnsExpected(Control control, Padding expected) 7711using Control control = new(); 7731using Control parent = new(); 7732using Control control = new() 7761using Control control = new(); 7800using Control parent = new(); 7801using Control control = new() 7854PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7855using Control control = new(); 7870PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7871using Control control = new(); 7893public void Control_MaximumSize_GetWithCustomDefaultMaximumSize_ReturnsExpected(Control control, Size expected) 7933using Control control = new(); 7955using Control control = new() 8001using Control control = new() 8032using Control control = new() 8057using Control control = new() 8104using Control parent = new(); 8105using Control control = new() 8159using Control parent = new(); 8160using Control control = new() 8202using Control control = new(); 8237using Control control = new() 8275using Control control = new() 8313using Control parent = new(); 8314using Control control = new() 8380using Control parent = new(); 8381using Control control = new() 8447PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8448using Control control = new(); 8471PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8472using Control control = new(); 8502public void Control_MinimumSize_GetWithCustomDefaultMinimumSize_ReturnsExpected(Control control, Size expected) 8542using Control control = new(); 8586using Control control = new() 8639using Control control = new() 8670using Control control = new() 8701using Control control = new() 8748using Control parent = new(); 8749using Control control = new() 8809using Control parent = new(); 8810using Control control = new() 8874using Control control = new(); 8931using Control control = new() 8997using Control control = new() 9056using Control parent = new(); 9057using Control control = new() 9144using Control parent = new(); 9145using Control control = new() 9217PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9218using Control control = new(); 9241PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9242using Control control = new(); 9287Assert.Equal(expected, Control.MouseButtons); 9304using Control control = new() 9320using Control control = new() 9337using Control control = new() 9372using Control control = new() 9395public void Control_Padding_GetWithCustomDefaultPadding_ReturnsExpected(Control control, Padding expected) 9417using Control control = new(); 9443using Control parent = new(); 9444using Control control = new() 9541using Control parent = new(); 9612using Control control = new(); 9649PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9650using Control control = new(); 9665PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9666using Control control = new(); 9687public void Control_Parent_Set_GetReturnsExpected(Control value) 9689using Control control = new() 9704public void Control_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 9706using Control oldParent = new(); 9707using Control control = new() 9727using Control parent = new(); 9728using Control control = new() 9745public void Control_Parent_SetWithHandle_GetReturnsExpected(Control value) 9747using Control control = new(); 9775using Control parent = new(); 9776using Control control = new(); 9811using Control control = new(); 9819using Control child = new(); 9820using Control control = new(); 9830using Control parent = new(); 9841using Control control = new(); 9842using Control child = new() 9860using Control child = new() 9882using Control control = new() 9900using Control control = new() 9922using Control control = new(); 9952using Control control = new() 9986using Control control = new(); 10061using Control control = new() 10078using Control control = new() 10097using Control child1 = new(); 10098using Control child2 = new(); 10099using Control control = new(); 10121using Control child1 = new() 10125using Control child2 = new() 10129using Control control = new(); 10153using Control control = new(); 10184using Control control = new() 10215using Control control = new(); 10250using Control control = new(); 10275using Control child1 = new(); 10276using Control child2 = new() 10280using Control control = new(); 10358using Control child1 = new() 10362using Control child2 = new() 10366using Control control = new(); 10439using Control control = new(); 10446PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10447using Control control = new(); 10474PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10475using Control control = new(); 10653using Control control = new() 10670using Control control = new(); 10706using Control control = new() 10783using Control control = new(); 10879Assert.Equal(Control.DefaultBackColor, control.BackColor); 10881Assert.Equal(Control.DefaultForeColor, control.ForeColor); 10882Assert.Equal(Control.DefaultFont, control.Font); 10959using Control control = new() 11373using Control parent = new(); 11618using Control parent = new(); 11757PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11758using Control control = new(); 11781PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11782using Control control = new(); 11808using Control control = new() 11824using Control control = new() 11862using Control control = new(); 11870using Control control = new() 11892using Control control = new(); 11928using Control control = new() 11967using Control control = new() 11984using Control control = new(); 12012using Control control = new(); 12047PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12048using Control control = new(); 12074PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12075using Control control = new(); 12178using Control parent = new(); 12370using Control parent = new(); 12523using Control control = new(); 12571using Control grandparent = new(); 12572using Control parent = new() 12576using Control control = new() 12590using Control parent = new() 12594using Control control = new() 12607using Control control = new() 12629using Control control = new(); 12630using Control child1 = new(); 12631using Control child2 = new(); 12660using Control control = new(); 12700using Control parent = new() 12704using Control item = new() 12719using Control control = new() 12741using Control parent = new(); 12742using Control control = new() 12815using Control parent = new(); 12816using Control control = new() 12873using Control control = new() 12911using Control child1 = new(); 12912using Control child2 = new(); 12913using Control control = new() 12988using Control child1 = new() 12992using Control child2 = new() 12996using Control control = new() 13071PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13072using Control control = new(); 13087PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13088using Control control = new(); 13393using Control parent = new(); 13628using Control parent = new(); 13767using Control cont = new(); 13779using Control control = new() 13794using Control control = new();
System\Windows\Forms\DataGridViewCellTests.cs (2)
4752Assert.True(dataGridView.AccessibilityObject is Control.ControlAccessibleObject); 4895Assert.Equal(new Size(10, Control.DefaultFont.Height + 9), cell.GetSize(rowIndex));
System\Windows\Forms\DataGridViewEditingControlShowingEventArgsTests.cs (1)
19public void DataGridViewEditingControlShowingEventArgs_NullArg_ThrowsArgumentNullException(Control control, DataGridViewCellStyle cellStyle)
System\Windows\Forms\DataGridViewRowHeightInfoNeededEventArgsTests.cs (1)
56Assert.Equal(Control.DefaultFont.Height + 9, row.Height);
System\Windows\Forms\DataGridViewRowTests.cs (35)
35Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1794Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1811Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1822yield return new object[] { DataGridViewAutoSizeRowsMode.AllHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1823yield return new object[] { DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1824yield return new object[] { DataGridViewAutoSizeRowsMode.AllCells, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1825yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1826yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1827yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCells, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1848Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 1860Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1883Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 1895Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1933yield return new object[] { autoSizeRowsMode, -1, Control.DefaultFont.Height + 9 }; 1934yield return new object[] { autoSizeRowsMode, 0, Control.DefaultFont.Height + 9 }; 1935yield return new object[] { autoSizeRowsMode, 1, Control.DefaultFont.Height + 9 }; 1936yield return new object[] { autoSizeRowsMode, 3, Control.DefaultFont.Height + 9 }; 1937yield return new object[] { autoSizeRowsMode, 4, Control.DefaultFont.Height + 9 }; 1938yield return new object[] { autoSizeRowsMode, 65536, Control.DefaultFont.Height + 9 }; 2034Assert.Equal(Control.DefaultFont.Height + 9, rowDefaultHeight); 2035Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 2317Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 2352Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 2370yield return new object[] { 2, 2, Control.DefaultFont.Height + 9 }; 2371yield return new object[] { 3, 3, Control.DefaultFont.Height + 9 }; 2372yield return new object[] { 4, 4, Control.DefaultFont.Height + 9 }; 2402yield return new object[] { autoSizeRowsMode, 2, 2, Control.DefaultFont.Height + 9 }; 2403yield return new object[] { autoSizeRowsMode, 3, 3, Control.DefaultFont.Height + 9 }; 2404yield return new object[] { autoSizeRowsMode, 4, 4, Control.DefaultFont.Height + 9 }; 2405yield return new object[] { autoSizeRowsMode, 65536, 65536, Control.DefaultFont.Height + 9 }; 2408yield return new object[] { DataGridViewAutoSizeRowsMode.None, 2, 2, Control.DefaultFont.Height + 9 }; 2409yield return new object[] { DataGridViewAutoSizeRowsMode.None, 3, 3, Control.DefaultFont.Height + 9 }; 2410yield return new object[] { DataGridViewAutoSizeRowsMode.None, 4, 4, Control.DefaultFont.Height + 9 }; 2489Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 3914Assert.Equal(Control.DefaultFont.Height + 9, row.Height);
System\Windows\Forms\DataGridViewTests.cs (10)
115using Control parent = new(); 257using Control parent = new(); 825public void DataGridView_Parent_Set_GetReturnsExpected(Control value) 842public void DataGridView_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 844using Control oldParent = new(); 865using Control parent = new(); 883public void DataGridView_Parent_SetWithHandle_GetReturnsExpected(Control value) 911using Control parent = new(); 1032using Control parent = new(); 1181using Control parent = new();
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (10)
16private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 78Assert.Equal(Control.DefaultFont, control.Font); 746Assert.Equal(expectedFont ?? Control.DefaultFont, control.Font); 957Assert.Equal(expectedFont ?? Control.DefaultFont, control.Font); 986Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1002Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1589using Control parent = new(); 1880using Control parent = new();
System\Windows\Forms\DataObjectComTests.cs (2)
20dynamic accessor = typeof(Control).TestAccessor.Dynamic; 39dynamic accessor = typeof(Control).TestAccessor.Dynamic;
System\Windows\Forms\DataObjectTests.cs (5)
2785dynamic controlAccessor = typeof(Control).TestAccessor.Dynamic; 2821dynamic controlAccessor = typeof(Control).TestAccessor.Dynamic; 2842dynamic accessor = typeof(Control).TestAccessor.Dynamic; 2858dynamic accessor = typeof(Control).TestAccessor.Dynamic; 2874dynamic accessor = typeof(Control).TestAccessor.Dynamic;
System\Windows\Forms\DateTimePickerTests.cs (4)
39Assert.Equal(Control.DefaultForeColor, control.CalendarForeColor); 40Assert.Equal(Control.DefaultFont, control.CalendarFont); 78Assert.Equal(Control.DefaultFont, control.Font); 101Assert.Equal(Control.DefaultFont.Height + 7, control.PreferredHeight);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
44Assert.Equal(Control.DefaultBackColor, control.BackColor); 94Assert.Equal(Control.DefaultFont, control.Font); 96Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (6)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 78Assert.Equal(Control.DefaultFont, control.Font); 80Assert.Equal(Control.DefaultForeColor, control.ForeColor); 805using Control result = new(); 814.Returns<Control>(null) 981public new Control GetControl() => base.GetControl();
System\Windows\Forms\DomainUpDownTests.cs (8)
59_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 60_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 61_sub.ClientSize.Should().Be(new Size(120, Control.DefaultFont.Height + 7)); 66_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3)); 67_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3)); 68_sub.ClientSize.Should().Be(new Size(116, Control.DefaultFont.Height + 3)); 100_sub.Font.Should().Be(Control.DefaultFont); 125_sub.PreferredHeight.Should().Be(Control.DefaultFont.Height + 7);
System\Windows\Forms\DragDropHelperTests.cs (1)
167Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\DrawToolTipEventArgsTests.cs (5)
22public void Ctor_Graphics_IWin32Window_Control_Rectangle_String_Color_Color_Font(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 47public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 57public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 67public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 77public void DrawBorder_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font)
System\Windows\Forms\ErrorProviderTests.cs (19)
873using Control control = new(); 896using Control control = new(); 926using Control control = new(); 955using Control control = new(); 973using Control control = new(); 991using Control control = new(); 1047using Control control = new(); 1074using Control control = new(); 1098using Control control = new(); 1107using Control control = new(); 1142using Control originalParent = new(); 1143using Control newParent = new(); 1229using Control control1 = new(); 1240using Control control1 = new(); 1253using Control control1 = new(); 1266using Control control1 = new(); 1279using Control control1 = new(); 1295using Control control1 = new(); 1308using Control control1 = new();
System\Windows\Forms\FlowLayoutPanelTests.cs (8)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 75Assert.Equal(Control.DefaultFont, control.Font); 77Assert.Equal(Control.DefaultForeColor, control.ForeColor); 217using Control extendee = new() 252using Control child = new(); 320using Control child = new(); 356using Control parent = new(); 357using Control child = new()
System\Windows\Forms\FlowLayoutSettingsTests.cs (3)
136using Control child = new(); 176using Control parent = new(); 177using Control child = new()
System\Windows\Forms\FontDialogTests.cs (10)
28Assert.Equal(Control.DefaultFont, dialog.Font); 58Assert.Equal(Control.DefaultFont, dialog.Font); 305Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 309Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 323Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 327Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 343Assert.Equal(Control.DefaultFont, dialog.Font); 360Assert.Equal(Control.DefaultFont, dialog.Font); 617Assert.Equal(Control.DefaultFont, dialog.Font); 751Assert.Equal($"System.Windows.Forms.Tests.FontDialogTests+SubFontDialog, Font: {Control.DefaultFont}", dialog.ToString());
System\Windows\Forms\FormTests.cs (21)
42Assert.Equal(Control.DefaultBackColor, control.BackColor); 96Assert.Equal(Control.DefaultFont, control.Font); 98Assert.Equal(Control.DefaultForeColor, control.ForeColor); 934public void Form_Parent_Set_GetReturnsExpected(Control value) 954public void Form_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 956using Control oldParent = new(); 1112public void Form_Parent_SetMdiChild_GetReturnsExpected(Control value) 1139using Control parent = new(); 1158public void Form_Parent_SetWithHandle_GetReturnsExpected(Control value) 1193using Control parent = new(); 1244using Control parent = new(); 2614yield return new Action<Form, Control>[] 2616(Form form, Control control) => form.Show(owner: control) 2618yield return new Action<Form, Control>[] 2620(Form form, Control control) => form.ShowDialog(owner: control) 2624yield return new Action<Form, Control>[] 2626(Form form, Control control) => form.Show(owner: control.FindForm()) 2628yield return new Action<Form, Control>[] 2630(Form form, Control control) => form.ShowDialog(owner: control.FindForm()) 2636public void Form_Show_SetsOwnerToTopLevelForm_WhenShownWithOwner(Action<Form, Control> showAction) 2641using Control control = new();
System\Windows\Forms\GroupBoxTests.cs (34)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 58Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 66Assert.Equal(Control.DefaultFont, control.Font); 68Assert.Equal(Control.DefaultForeColor, control.ForeColor); 85Assert.Equal(new Size(6, 6 + Control.DefaultFont.Height), control.PreferredSize); 269using Control parent = new(); 417using Control parent = new(); 571Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 580Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 927using Control child = new() 1220using Control parent = new(); 1317using Control parent = new(); 1384Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1399Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1516Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1517Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1524Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1525Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1564Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1565Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1575Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1576Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1984using Control parent = new(); 2029using Control parent = new() 2045using Control parent = new()
System\Windows\Forms\HelpProviderTests.cs (14)
52using Control control = new(); 149using Control control = new(); 160using Control control = new(); 189using Control control = new(); 223using Control control = new(); 255using Control control = new(); 290using Control control = new(); 307using Control control = new(); 325using Control control = new(); 360using Control control = new(); 379using Control control = new(); 399using Control control = new(); 426using Control control = new(); 452using Control control = new();
System\Windows\Forms\HScrollBarTests.cs (3)
26Assert.Equal(Control.DefaultBackColor, control.BackColor); 73Assert.Equal(Control.DefaultFont, control.Font); 75Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\HtmlDocumentTests.cs (96)
20using Control parent = new(); 52using Control parent = new(); 84using Control parent = new(); 108using Control parent = new(); 138using Control parent = new(); 158using Control parent = new(); 178using Control parent = new(); 195using Control parent = new(); 212using Control parent = new(); 237using Control parent = new(); 269using Control parent = new(); 301using Control parent = new(); 331using Control parent = new(); 361using Control parent = new(); 378using Control parent = new(); 395using Control parent = new(); 420using Control parent = new(); 437using Control parent = new(); 472using Control parent = new(); 487using Control parent = new(); 502using Control parent = new(); 524using Control parent = new(); 539using Control parent = new(); 555using Control parent = new(); 577using Control parent = new(); 592using Control parent = new(); 606using Control parent = new(); 630using Control parent = new(); 664using Control parent = new(); 678using Control parent = new(); 693using Control parent = new(); 717using Control parent = new(); 749using Control parent = new(); 781using Control parent = new(); 803using Control parent = new(); 834using Control parent = new(); 854using Control parent = new(); 870using Control parent = new(); 890using Control parent = new(); 906using Control parent = new(); 938using Control parent = new(); 970using Control parent = new(); 992using Control parent = new(); 1022using Control parent = new(); 1042using Control parent = new(); 1058using Control parent = new(); 1083using Control parent = new(); 1106using Control parent = new(); 1130using Control parent = new(); 1167using Control parent = new(); 1181using Control parent = new(); 1196using Control parent = new(); 1218using Control parent = new(); 1248using Control parent = new(); 1269using Control parent = new(); 1301using Control parent = new(); 1333using Control parent = new(); 1355using Control parent = new(); 1385using Control parent = new(); 1404using Control parent = new(); 1466using Control parent = new(); 1504using Control parent = new(); 1522using Control parent = new(); 1542using Control parent = new(); 1559using Control parent = new(); 1575using Control parent = new(); 1603using Control parent = new(); 1620using Control parent = new(); 1637using Control parent = new(); 1660using Control parent = new(); 1678using Control parent = new(); 1693using Control parent = new(); 1712using Control parent = new(); 1730using Control parent = new(); 1744using Control parent = new(); 1761using Control parent = new(); 1786using Control parent = new(); 1806using Control parent = new(); 1820using Control parent = new(); 1838using Control parent = new(); 1877using Control parent = new(); 1904using Control parent = new(); 1921using Control parent = new(); 1938using Control parent = new(); 1956using Control parent = new(); 1976using Control parent = new(); 1997using Control parent = new(); 2035using Control parent = new(); 2073using Control parent = new(); 2111using Control parent = new(); 2149using Control parent = new(); 2187using Control parent = new(); 2225using Control parent = new(); 2263using Control parent = new(); 2301using Control parent = new(); 2339using Control parent = new();
System\Windows\Forms\HtmlElementTests.cs (127)
20using Control parent = new(); 40using Control parent = new(); 57using Control parent = new(); 76using Control parent = new(); 91using Control parent = new(); 106using Control parent = new(); 122using Control parent = new(); 141using Control parent = new(); 158using Control parent = new(); 180using Control parent = new(); 198using Control parent = new(); 214using Control parent = new(); 236using Control parent = new(); 275using Control parent = new(); 290using Control parent = new(); 308using Control parent = new(); 323using Control parent = new(); 341using Control parent = new(); 366using Control parent = new(); 397using Control parent = new(); 412using Control parent = new(); 431using Control parent = new(); 457using Control parent = new(); 488using Control parent = new(); 503using Control parent = new(); 518using Control parent = new(); 533using Control parent = new(); 552using Control parent = new(); 578using Control parent = new(); 609using Control parent = new(); 624using Control parent = new(); 639using Control parent = new(); 654using Control parent = new(); 670using Control parent = new(); 696using Control parent = new(); 729using Control parent = new(); 744using Control parent = new(); 762using Control parent = new(); 780using Control parent = new(); 798using Control parent = new(); 814using Control parent = new(); 829using Control parent = new(); 853using Control parent = new(); 884using Control parent = new(); 915using Control parent = new(); 930using Control parent = new(); 945using Control parent = new(); 964using Control parent = new(); 990using Control parent = new(); 1021using Control parent = new(); 1036using Control parent = new(); 1057using Control parent = new(); 1075using Control parent = new(); 1093using Control parent = new(); 1117using Control parent = new(); 1147using Control parent = new(); 1165using Control parent = new(); 1183using Control parent = new(); 1207using Control parent = new(); 1237using Control parent = new(); 1256using Control parent = new(); 1275using Control parent = new(); 1304using Control parent = new(); 1337using Control parent = new(); 1355using Control parent = new(); 1379using Control parent = new(); 1409using Control parent = new(); 1424using Control parent = new(); 1456using Control parent = new(); 1494using Control parent = new(); 1511using Control parent = new(); 1576using Control parent = new(); 1617using Control parent = new(); 1659using Control parent = new(); 1698using Control parent = new(); 1717using Control parent = new(); 1737using Control parent = new(); 1766using Control parent = new(); 1784using Control parent = new(); 1802using Control parent = new(); 1824using Control parent = new(); 1842using Control parent = new(); 1858using Control parent = new(); 1890using Control parent = new(); 1910using Control parent = new(); 1925using Control parent = new(); 1950using Control parent = new(); 1965using Control parent = new(); 1988using Control parent = new(); 2026using Control parent = new(); 2070using Control parent = new(); 2108using Control parent = new(); 2152using Control parent = new(); 2188using Control parent = new(); 2232using Control parent = new(); 2267using Control parent = new(); 2311using Control parent = new(); 2327using Control parent = new(); 2343using Control parent = new(); 2363using Control parent = new(); 2382using Control parent = new(); 2400using Control parent = new(); 2421using Control parent = new(); 2440using Control parent = new(); 2465using Control parent = new(); 2480using Control parent = new(); 2497using Control parent = new(); 2520using Control parent = new(); 2544using Control parent = new(); 2585using Control parent = new(); 2626using Control parent = new(); 2667using Control parent = new(); 2708using Control parent = new(); 2749using Control parent = new(); 2790using Control parent = new(); 2831using Control parent = new(); 2872using Control parent = new(); 2913using Control parent = new(); 2954using Control parent = new(); 2995using Control parent = new(); 3036using Control parent = new(); 3077using Control parent = new(); 3118using Control parent = new(); 3159using Control parent = new(); 3200using Control parent = new(); 3241using Control parent = new(); 3282using Control parent = new();
System\Windows\Forms\HtmlWindowTests.cs (4)
17using Control parent = new(); 33using Control parent = new(); 49using Control parent = new(); 70using Control parent = new();
System\Windows\Forms\LabelTests.cs (3)
28Assert.Equal(Control.DefaultBackColor, control.BackColor); 66Assert.Equal(Control.DefaultFont, control.Font); 68Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
42using Control child1 = new() 47using Control child2 = new() 52using Control largeChild = new() 57using Control emptyChild = new() 61using Control emptyChildWithMargin = new() 66using Control child3 = new() 71using Control child4 = new() 103using Control child1 = new() 108using Control child2 = new() 113using Control largeChild = new() 118using Control emptyChild = new() 122using Control emptyChildWithMargin = new() 127using Control child3 = new() 132using Control child4 = new() 164using Control child1 = new() 169using Control child2 = new() 174using Control largeChild = new() 179using Control emptyChild = new() 183using Control emptyChildWithMargin = new() 188using Control child3 = new() 193using Control child4 = new() 225using Control child1 = new() 230using Control child2 = new() 235using Control largeChild = new() 240using Control emptyChild = new() 244using Control emptyChildWithMargin = new() 249using Control child3 = new() 254using Control child4 = new()
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (58)
161using Control child = new(); 170using Control child = new(); 211using Control child = new(); 221using Control child = new(); 231using Control child = new(); 241using Control child = new(); 253using Control child = new(); 260using Control child = new(); 301using Control child = new(); 310using Control child = new(); 319using Control child = new(); 354using Control child = new(); 361using Control child = new(); 402using Control child = new(); 411using Control child = new(); 462using Control child = new(); 499using Control parent = new(); 500using Control child = new() 552using Control child = new(); 574using Control parent = new(); 575using Control child = new() 623using Control child = new(); 637using Control child = new(); 686using Control child = new(); 718using Control parent = new(); 719using Control child = new() 775using Control child = new(); 801using Control parent = new(); 802using Control child = new() 843using Control child = new(); 857using Control child = new(); 924using Control child = new(); 953using Control parent = new(); 954using Control child = new() 1008using Control child = new(); 1032using Control parent = new(); 1033using Control child = new() 1074using Control child = new(); 1088using Control child = new(); 1162using Control child = new(); 1194using Control parent = new(); 1195using Control child = new() 1251using Control child = new(); 1277using Control parent = new(); 1278using Control child = new() 1319using Control child = new(); 1333using Control child = new(); 1400using Control child = new(); 1429using Control parent = new(); 1430using Control child = new() 1484using Control child = new(); 1508using Control parent = new(); 1509using Control child = new() 1550using Control child = new(); 1564using Control child = new(); 1662using Control controlWithName = new() 1666using Control controlWithDefaultName = new(); 1779using Control controlWithName = new() { Name = "name" };
System\Windows\Forms\LayoutEventArgsTests.cs (2)
26Assert.Equal(affectedComponent as Control, e.AffectedControl); 39public void Ctor_Control_String(Control affectedControl, string affectedProperty)
System\Windows\Forms\ListBoxTests.cs (37)
73Assert.Equal(Control.DefaultFont, control.Font); 88Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 102Assert.Equal(Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3, control.PreferredHeight); 930using Control parent = new(); 1060Assert.Equal(value ?? Control.DefaultFont, control.Font); 1068Assert.Equal(value ?? Control.DefaultFont, control.Font); 1088Assert.Equal(value ?? Control.DefaultFont, control.Font); 1096Assert.Equal(value ?? Control.DefaultFont, control.Font); 1128Assert.Equal(value ?? Control.DefaultFont, control.Font); 1139Assert.Equal(value ?? Control.DefaultFont, control.Font); 1177Assert.Equal(value ?? Control.DefaultFont, control.Font); 1188Assert.Equal(value ?? Control.DefaultFont, control.Font); 1230Assert.Equal(Control.DefaultFont, control.Font); 1744yield return new object[] { DrawMode.Normal, integralHeight, Control.DefaultFont.Height, 0 }; 1747yield return new object[] { DrawMode.OwnerDrawFixed, integralHeight, Control.DefaultFont.Height, 0 }; 1750yield return new object[] { DrawMode.OwnerDrawVariable, integralHeight, Control.DefaultFont.Height, 0 }; 1828Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 1844Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 2053yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, Control.DefaultFont.Height + extra }; 2054yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, Control.DefaultFont.Height + extra }; 2055yield return new object[] { DrawMode.Normal, BorderStyle.None, Control.DefaultFont.Height }; 2057yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, Control.DefaultFont.Height + extra }; 2058yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, Control.DefaultFont.Height + extra }; 2059yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, Control.DefaultFont.Height }; 2082yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2083yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2084yield return new object[] { DrawMode.Normal, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 2086yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2087yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2088yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 2090yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2091yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2092yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 4762Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 5151Assert.Equal(Control.DefaultFont.Height, control.GetItemHeight(0)); 5174Assert.Equal(Control.DefaultFont.Height, control.GetItemHeight(index));
System\Windows\Forms\ListControlTests.cs (3)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 69Assert.Equal(Control.DefaultFont, control.Font); 71Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ListViewItemTests.cs (26)
22Assert.Equal(Control.DefaultFont, item.Font); 61Assert.Equal(font ?? Control.DefaultFont, item.Font); 99Assert.Equal(font ?? Control.DefaultFont, item.Font); 137Assert.Equal(font ?? Control.DefaultFont, item.Font); 175Assert.Equal(font ?? Control.DefaultFont, item.Font); 212Assert.Equal(Control.DefaultFont, item.Font); 249Assert.Equal(Control.DefaultFont, item.Font); 287Assert.Equal(Control.DefaultFont, item.Font); 325Assert.Equal(Control.DefaultFont, item.Font); 362Assert.Equal(Control.DefaultFont, item.Font); 400Assert.Equal(Control.DefaultFont, item.Font); 438Assert.Equal(Control.DefaultFont, item.Font); 475Assert.Equal(Control.DefaultFont, item.Font); 513Assert.Equal(Control.DefaultFont, item.Font); 551Assert.Equal(Control.DefaultFont, item.Font); 589Assert.Equal(Control.DefaultFont, item.Font); 626Assert.Equal(Control.DefaultFont, item.Font); 664Assert.Equal(Control.DefaultFont, item.Font); 702Assert.Equal(Control.DefaultFont, item.Font); 739Assert.Equal(Control.DefaultFont, item.Font); 778Assert.Equal(Control.DefaultFont, item.Font); 808Assert.Equal(Control.DefaultFont, item.Font); 973Assert.Equal(value ?? Control.DefaultFont, item.Font); 977Assert.Equal(Control.DefaultFont, item.Font); 989Assert.Equal(value ?? Control.DefaultFont, item.Font); 993Assert.Equal(value ?? Control.DefaultFont, item.Font);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (3)
277Assert.Equal(font ?? Control.DefaultFont, subItem.Font); 407Assert.Equal(font ?? Control.DefaultFont, collection[0].Font); 411Assert.Equal(font ?? Control.DefaultFont, collection[1].Font);
System\Windows\Forms\ListViewSubItemTests.cs (14)
21Assert.Equal(Control.DefaultFont, subItem.Font); 47Assert.Equal(Control.DefaultFont, subItem.Font); 73Assert.Equal(font ?? Control.DefaultFont, subItem.Font); 242Assert.Equal(Control.DefaultFont, subItem.Font); 246Assert.Equal(Control.DefaultFont, subItem.Font); 268Assert.Equal(Control.DefaultFont, subItem.Font); 279Assert.Same(value ?? Control.DefaultFont, subItem.Font); 283Assert.Same(value ?? Control.DefaultFont, subItem.Font); 322Assert.Equal(value ?? Control.DefaultFont, subItem.Font); 326Assert.Equal(value ?? Control.DefaultFont, subItem.Font); 545Assert.Equal(Control.DefaultFont, subItem.Font); 550Assert.Equal(Control.DefaultFont, subItem.Font); 562Assert.Equal(Control.DefaultFont, subItem.Font); 567Assert.Equal(Control.DefaultFont, subItem.Font);
System\Windows\Forms\ListViewTests.cs (3)
81Assert.Equal(Control.DefaultFont, control.Font); 4841ToolInfoWrapper<Control> wrapper = listView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip); 4854ToolInfoWrapper<Control> wrapper = listView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip);
System\Windows\Forms\MdiClientTests.cs (14)
52Assert.Equal(Control.DefaultFont, control.Font); 53Assert.Equal(Control.DefaultForeColor, control.ForeColor); 134Assert.Equal(Control.DefaultBackColor, control.BackColor); 156Assert.Equal(Control.DefaultBackColor, control.BackColor); 172Assert.Equal(Control.DefaultBackColor, control.BackColor); 181using Control parent = new() 260using Control parent = new() 376using Control parent = new() 420using Control parent = new() 698using Control parent = new(); 847using Control parent = new() 1009using Control parent = new() 1150PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(MdiClient))[nameof(Control.Size)]; 1174PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(MdiClient))[nameof(Control.Size)];
System\Windows\Forms\MdiControlStripTests.cs (3)
34Assert.Equal(Control.DefaultBackColor, mdiControlStrip.BackColor); 83Assert.Equal(Control.DefaultFont, mdiControlStrip.Font); 85Assert.Equal(Control.DefaultForeColor, mdiControlStrip.ForeColor);
System\Windows\Forms\MenuStripTests.cs (4)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 81Assert.Equal(Control.DefaultFont, control.Font); 83Assert.Equal(Control.DefaultForeColor, control.ForeColor); 699using Control parent = new();
System\Windows\Forms\MixedDpiHostingTests.cs (1)
29using Control control = new();
System\Windows\Forms\MonthCalendarTests.cs (3)
83Assert.Equal(Control.DefaultFont, control.Font); 2294Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\NativeWindowTests.cs (12)
22using Control control = new(); 51using Control control = new(); 88using Control control = new(); 145using Control control = new(); 174using Control control = new(); 238using Control control = new(); 295using Control control = new(); 340using Control control = new(); 406using Control control = new(); 416using Control control = new(); 428using Control control = new(); 474using Control control = new();
System\Windows\Forms\PanelTests.cs (7)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 75Assert.Equal(Control.DefaultFont, control.Font); 77Assert.Equal(Control.DefaultForeColor, control.ForeColor); 257using Control parent = new(); 405using Control parent = new(); 614using Control child = new() 629using Control child = new()
System\Windows\Forms\PictureBoxTests.cs (15)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 70Assert.Equal(Control.DefaultFont, control.Font); 72Assert.Equal(Control.DefaultForeColor, control.ForeColor); 240using Control control = new() 259using Control control = new(); 277using Control control = new() 459Assert.Equal(Control.DefaultForeColor, control.ForeColor); 477Assert.Equal(value ?? Control.DefaultFont, control.Font); 483Assert.Equal(value ?? Control.DefaultFont, control.Font); 520Assert.Equal(Control.DefaultFont, control.Font); 1125public void PictureBox_Parent_Set_GetReturnsExpected(Control value) 1140public void PictureBox_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 1142using Control oldParent = new(); 1161using Control parent = new(); 1178using Control parent = new();
System\Windows\Forms\PopupEventArgsTests.cs (1)
21public void Ctor_IWin32Window_Control_Bool_Size(IWin32Window associatedWindow, Control associatedControl, bool isBalloon, Size size)
System\Windows\Forms\ProgressBarTests.cs (13)
28Assert.Equal(Control.DefaultBackColor, control.BackColor); 63Assert.Equal(Control.DefaultFont, control.Font); 482Assert.Equal(value ?? Control.DefaultFont, control.Font); 488Assert.Equal(value ?? Control.DefaultFont, control.Font); 525Assert.Equal(Control.DefaultFont, control.Font); 556yield return new object[] { Color.Empty, Control.DefaultForeColor, 1 }; 613Assert.Equal(Control.DefaultForeColor, control.ForeColor); 626PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 642PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 1772Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.DropDownHolder.DropDownHolderAccessibleObjectTests.cs (2)
46Control.ControlAccessibleObject accessibilityObject = ownerControl.AccessibilityObject as Control.ControlAccessibleObject;
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewListBoxAccessibleObjectTests.cs (1)
7using static System.Windows.Forms.Control;
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
10using static System.Windows.Forms.Control;
System\Windows\Forms\PropertyGridInternal\GridToolTipTests.cs (3)
8private readonly Control[] _controls; 20foreach (Control c in _controls) 83foreach (Control c in _controls)
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (5)
44Validate.TextOut("Misc", new(25, 4, 25, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 50Validate.TextOut(pt.X.ToString(), new(145, 22, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 53Validate.TextOut(nameof(Point.X), new(25, 23, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 59Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 62Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\PropertyGridTests.cs (11)
42Assert.Equal(Control.DefaultBackColor, control.BackColor); 104Assert.Equal(Control.DefaultFont, control.Font); 106Assert.Equal(Control.DefaultForeColor, control.ForeColor); 306yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 367Assert.Equal(Control.DefaultBackColor, control.BackColor); 389Assert.Equal(Control.DefaultBackColor, control.BackColor); 405Assert.Equal(Control.DefaultBackColor, control.BackColor); 1634yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 1692Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1714Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1730Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\RadioButtonTests.cs (3)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 73Assert.Equal(Control.DefaultFont, control.Font); 75Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ReadOnlyControlCollectionTests.cs (1)
13using Control owner = new();
System\Windows\Forms\RichTextBoxTests.cs (33)
24private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 82Assert.Equal(Control.DefaultFont, control.Font); 462using Control parent = new(); 671yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 679using Control control = new(); 1339Assert.Equal(value ?? Control.DefaultFont, control.Font); 1345Assert.Equal(value ?? Control.DefaultFont, control.Font); 1359Assert.Equal(value ?? Control.DefaultFont, control.Font); 1365Assert.Equal(value ?? Control.DefaultFont, control.Font); 1381Assert.Equal(value ?? Control.DefaultFont, control.Font); 1387Assert.Equal(value ?? Control.DefaultFont, control.Font); 1404Assert.Equal(value ?? Control.DefaultFont, control.Font); 1410Assert.Equal(value ?? Control.DefaultFont, control.Font); 1441Assert.Equal(value ?? Control.DefaultFont, control.Font); 1450Assert.Equal(value ?? Control.DefaultFont, control.Font); 1478Assert.Equal(value ?? Control.DefaultFont, control.Font); 1487Assert.Equal(value ?? Control.DefaultFont, control.Font); 1525Assert.Equal(value ?? Control.DefaultFont, control.Font); 1534Assert.Equal(value ?? Control.DefaultFont, control.Font); 1564Assert.Equal(value ?? Control.DefaultFont, control.Font); 1573Assert.Equal(value ?? Control.DefaultFont, control.Font); 1628Assert.Equal(Control.DefaultFont.Name, format1.FaceName.ToString()); 1629Assert.Equal((int)(Control.DefaultFont.SizeInPoints * 20), format1.yHeight); 1667Assert.Equal(Control.DefaultFont, control.Font); 2133using Control parent = new(); 2189using Control parent = new(); 2964using Control parent = new(); 3087using Control parent = new(); 7102using Control parent = new(); 7330using Control parent = new(); 10599Mock<Control> mockParent = new() { CallBase = true }; 10600Mock<Control.ControlAccessibleObject> mockAccessibleObject = new(MockBehavior.Strict, mockParent.Object); 10611using Control parent = mockParent.Object;
System\Windows\Forms\ScreenTests.cs (5)
70Control createdControl = new(); 77public void Screen_FromControl_Invoke_ReturnsExpected(Control control) 101using Control control = new(); 143public void Screen_GetBounds_InvokeControl_ReturnsExpected(Control control) 173public void Screen_GetWorkingArea_InvokeControl_ReturnsExpected(Control control)
System\Windows\Forms\ScrollableControlTests.cs (14)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 74Assert.Equal(Control.DefaultFont, control.Font); 76Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1390Control affectedControl; 1403public void ScrollableControl_OnLayout_Invoke_CallsLayout(bool autoScroll, LayoutEventArgs eventArgs, int expectedCallCount, Control affectedControl) 1570Func<Control> controlFactory = () => new Control 1578foreach (Func<Control> parentFactory in new Func<Control>[] { controlFactory, tabPageFactory }) 1618foreach (Func<Control> parentFactory in new Func<Control>[] { CreateControl, CreateTabPage }) 1665static Control CreateControl() => new() 1677public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 1823using Control parent = new() 2530public void ScrollableControl_ScrollControlIntoView_Invoke_Success(bool autoScroll, bool hScroll, bool vScroll, Size clientSize, Control activeControl, Rectangle expectedDisplayRectangle)
System\Windows\Forms\ScrollBarTests.cs (8)
27Assert.Equal(Control.DefaultBackColor, control.BackColor); 63Assert.Equal(Control.DefaultFont, control.Font); 65Assert.Equal(Control.DefaultForeColor, control.ForeColor); 236Assert.Equal(Control.DefaultBackColor, control.BackColor); 490Assert.Equal(value ?? Control.DefaultFont, control.Font); 496Assert.Equal(value ?? Control.DefaultFont, control.Font); 533Assert.Equal(Control.DefaultFont, control.Font); 585Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\SplitterPanelTests.cs (7)
38Assert.Equal(Control.DefaultBackColor, control.BackColor); 68Assert.Equal(Control.DefaultFont, control.Font); 69Assert.Equal(Control.DefaultForeColor, control.ForeColor); 216using Control parent = new(); 277using Control parent = new(); 721public void SplitterPanel_Parent_Set_GetReturnsExpected(Control value) 739using Control parent = new();
System\Windows\Forms\SplitterTests.cs (20)
27Assert.Equal(Control.DefaultBackColor, control.BackColor); 64Assert.Equal(Control.DefaultFont, control.Font); 66Assert.Equal(Control.DefaultForeColor, control.ForeColor); 742Assert.Equal(value ?? Control.DefaultFont, control.Font); 748Assert.Equal(value ?? Control.DefaultFont, control.Font); 785Assert.Equal(Control.DefaultFont, control.Font); 816yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 873Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1142using Control parent = new() 1197using Control parent = new() 1202using Control child = new() 1242using Control parent = new() 1247using Control child = new() 1314using Control parent = new() 1361using Control parent = new() 1366using Control child = new() 2009using Control parent = new() 2014using Control child = new() 2110using Control parent = new() 2115using Control child = new()
System\Windows\Forms\StatusStripTests.cs (7)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 81Assert.Equal(Control.DefaultFont, control.Font); 83Assert.Equal(Control.DefaultForeColor, control.ForeColor); 864Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1187Control grip = Assert.IsAssignableFrom<Control>(Assert.Single(control.Controls));
System\Windows\Forms\TabControl.ControlCollectionTests.cs (28)
88Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 116Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 227Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 268Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 388Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 422Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 545Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 592Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 743Assert.Equal(items, collection.Cast<Control>()); 877using Control value = new(); 1369Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1374Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1379Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1407Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1412Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1417Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1438Assert.Equal(items, collection.Cast<Control>()); 1447Assert.Equal(items, collection.Cast<Control>()); 1457using Control value1 = new(); 1458using Control value2 = new();
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (59)
76Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 105Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 218Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 260Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 382Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 417Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 542Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 590Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 748Assert.Equal(items, owner.Controls.Cast<Control>()); 2018Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2049Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2155Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2199Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2325Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2362Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2491Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2541Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3064Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3095Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3380Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3425Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3465Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3521Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3779Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3823Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3862Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3917Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 4473Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4478Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4483Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 4513Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4518Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4523Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>());
System\Windows\Forms\TabControlTests.cs (14)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 66Assert.Equal(Control.DefaultFont, control.Font); 68Assert.Equal(Control.DefaultForeColor, control.ForeColor); 943yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 1001Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2996Control.ControlCollection controls = Assert.IsType<TabControl.ControlCollection>(control.CreateControlsInstance()); 3867[InlineData(typeof(Control))] 4891Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4899Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4908Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 5802public new Control.ControlCollection CreateControlsInstance() => base.CreateControlsInstance();
System\Windows\Forms\TableLayoutControlCollectionTests.cs (3)
34using Control child = new(); 46using Control child = new(); 58using Control child = new();
System\Windows\Forms\TableLayoutPanelTests.cs (48)
33Assert.Equal(Control.DefaultBackColor, control.BackColor); 80Assert.Equal(Control.DefaultFont, control.Font); 82Assert.Equal(Control.DefaultForeColor, control.ForeColor); 338PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)]; 345using Control child = new(); 358PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)]; 365using Control child = new(); 499using Control controlWithName = new() { Name = "name" }; 500using Control controlWithDefaultName = new(); 648using Control child = new(); 663using Control child = new(); 672using Control child = new(); 681using Control child = new(); 696using Control child = new(); 737using Control child = new(); 777using Control child = new(); 797using Control child = new() 820using Control child = new() 842using Control otherChild = new(); 843using Control child = new() 890using Control child = new(); 904using Control child = new(); 916using Control child = new(); 934using Control child = new(); 1142using Control child = new(); 1507using Control child1 = new(); 1512using Control child2 = new(); 1557using Control child = new(); 1593using Control parent = new(); 1594using Control child = new() 1644using Control child = new(); 1668using Control child = new(); 1699using Control parent = new(); 1700using Control child = new() 1750using Control child = new(); 1779using Control child = new(); 1808using Control parent = new(); 1809using Control child = new() 1859using Control child = new(); 1895using Control child = new(); 1926using Control parent = new(); 1927using Control child = new() 1977using Control child = new(); 2006using Control child = new(); 2035using Control parent = new(); 2036using Control child = new() 2086using Control child = new(); 2116using Control extendee = new();
System\Windows\Forms\TabPageTests.cs (27)
36Assert.Equal(Control.DefaultBackColor, control.BackColor); 80Assert.Equal(Control.DefaultFont, control.Font); 82Assert.Equal(Control.DefaultForeColor, control.ForeColor); 145Assert.Equal(Control.DefaultBackColor, control.BackColor); 189Assert.Equal(Control.DefaultFont, control.Font); 191Assert.Equal(Control.DefaultForeColor, control.ForeColor); 536Assert.Equal(Control.DefaultBackColor, control.BackColor); 554Assert.Equal(Control.DefaultBackColor, control.BackColor); 583Assert.Equal(Control.DefaultBackColor, control.BackColor); 605Assert.Equal(Control.DefaultBackColor, control.BackColor); 611yield return new object[] { true, TabAppearance.Buttons, Control.DefaultBackColor }; 612yield return new object[] { true, TabAppearance.FlatButtons, Control.DefaultBackColor }; 614yield return new object[] { false, TabAppearance.Buttons, Control.DefaultBackColor }; 615yield return new object[] { false, TabAppearance.FlatButtons, Control.DefaultBackColor }; 616yield return new object[] { false, TabAppearance.Normal, Control.DefaultBackColor }; 829yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 886Assert.Equal(Control.DefaultBackColor, control.BackColor); 2483public void TabPage_Parent_Set_GetReturnsExpected(Control value) 2500public void TabPage_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 2541public void TabPage_Parent_SetWithHandle_GetReturnsExpected(Control value) 2615using Control parent = new(); 3746Control.ControlCollection controls = Assert.IsType<TabPage.TabPageControlCollection>(control.CreateControlsInstance()); 3816using Control parent = new() 3820using Control control = new() 3832using Control grandparent = new(); 3833using Control parent = new() 3837using Control control = new()
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (13)
30using Control control1 = new(); 31using Control control2 = new(); 38Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 64Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 69Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 80Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 85Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 95Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>());
System\Windows\Forms\TaskDialogTests.cs (2)
19Control.CheckForIllegalCrossThreadCalls = true; 43Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\ToolStripButtonTests.cs (16)
32Assert.Equal(Control.DefaultBackColor, item.BackColor); 57Assert.NotSame(Control.DefaultFont, item.Font); 59Assert.Equal(Control.DefaultForeColor, item.ForeColor); 113Assert.Equal(Control.DefaultBackColor, item.BackColor); 138Assert.NotSame(Control.DefaultFont, item.Font); 140Assert.Equal(Control.DefaultForeColor, item.ForeColor); 200Assert.Equal(Control.DefaultBackColor, item.BackColor); 225Assert.NotSame(Control.DefaultFont, item.Font); 227Assert.Equal(Control.DefaultForeColor, item.ForeColor); 290Assert.Equal(Control.DefaultBackColor, item.BackColor); 315Assert.NotSame(Control.DefaultFont, item.Font); 317Assert.Equal(Control.DefaultForeColor, item.ForeColor); 403Assert.NotSame(Control.DefaultFont, item.Font); 405Assert.Equal(Control.DefaultForeColor, item.ForeColor); 501Assert.NotSame(Control.DefaultFont, item.Font); 503Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
98using Control control = new();
System\Windows\Forms\ToolStripContainer.ToolStripContainerTypedControlCollectionTests.cs (10)
18collection.Cast<Control>().Should().BeEmpty(); 54Control control = (Control)Activator.CreateInstance(type)!; 58collection.Cast<Control>().Should().Contain(control); 71using Control control = (Control)Activator.CreateInstance(type)!; 88collection.Cast<Control>().Should().NotContain(panel); 102collection.Cast<Control>().Should().NotContain(button); 112using Control control = (Control)Activator.CreateInstance(type)!;
System\Windows\Forms\ToolStripContentPanelTests.cs (7)
34Assert.Equal(Control.DefaultBackColor, control.BackColor); 77Assert.Equal(Control.DefaultFont, control.Font); 79Assert.Equal(Control.DefaultForeColor, control.ForeColor); 496using Control parent = new(); 557using Control parent = new(); 636using Control parent = new() 712Assert.Equal(Control.DefaultBackColor, control.BackColor);
System\Windows\Forms\ToolStripControlHostTests.cs (194)
47public void ToolStripControlHost_Ctor_Control(Control c) 139using Control c = new(); 158using Control c = new(); 169using Control c = new(); 188using Control c = new(); 199using Control c = new(); 218using Control c = new(); 229using Control c = new(); 249using Control c = new(); 257using Control c = new(); 268using Control c = new(); 287using Control c = new(); 310Assert.Equal(Control.DefaultBackColor, item.BackColor); 323using Control c = new(); 334using Control c = new(); 343Assert.Equal(Control.DefaultBackColor, item.BackColor); 351using Control c = new(); 365using Control c = new(); 374Assert.Equal(Control.DefaultBackColor, item.BackColor); 382using Control c = new(); 391using Control c = new(); 410using Control c = new(); 429using Control c = new(); 440using Control c = new(); 451using Control c = new(); 470using Control c = new(); 494using Control c = new() 508using Control c = new(); 518using Control c = new(); 543using Control c = new(); 557using Control c = new(); 569using Control c = new(); 580using Control c = new(); 595using Control c = new(); 614using Control c = new(); 626using Control c = new(); 640using Control c = new(); 654using Control c = new(); 664using Control c = new(); 678using Control c = new(); 700using Control c = new() 725using Control c = new(); 745using Control c = new(); 753using Control c = new(); 764using Control c = new(); 781using Control c = new(); 817using Control c = new(); 826using Control c = new(); 843using Control c = new(); 866using Control c = new(); 893using Control c = new(); 928using Control c = new(); 938using Control c = new(); 948using Control c = new(); 968using Control c = new(); 975Assert.Equal(value ?? Control.DefaultFont, item.Font); 976Assert.Equal(value ?? Control.DefaultFont, c.Font); 981Assert.Equal(value ?? Control.DefaultFont, item.Font); 982Assert.Equal(value ?? Control.DefaultFont, c.Font); 989using Control c = new(); 1001using Control c = new(); 1011Assert.Equal(Control.DefaultFont, item.Font); 1019Assert.Equal(Control.DefaultFont, item.Font); 1027using Control c = new(); 1041using Control c = new(); 1051Assert.Equal(Control.DefaultFont, item.Font); 1059Assert.Equal(Control.DefaultFont, item.Font); 1067using Control c = new(); 1076using Control c = new(); 1087using Control c = new(); 1106using Control c = new(); 1129Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1142using Control c = new(); 1153using Control c = new(); 1162Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1170using Control c = new(); 1184using Control c = new(); 1193Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1201using Control c = new(); 1222using Control c = new(); 1244using Control c = new(); 1264using Control c = new(); 1275using Control c = new(); 1297using Control c = new(); 1319using Control c = new(); 1348using Control c = new(); 1389using Control c = new(); 1457using Control c = new(); 1532using Control c = new(); 1548using Control c = new(); 1559using Control c = new(); 1579using Control c = new(); 1598using Control c = new(); 1635using Control c = new(); 1644using Control c = new(); 1673using Control c = new(); 1687using Control c = new(); 1716using Control c = new(); 1727using Control c = new(); 1749using Control c = new(); 1772using Control c = new(); 1818using Control c = new(); 1839using Control c = new(); 1860using Control c = new(); 1882using Control c = new(); 1918using Control c = new(); 1947using Control c = new(); 1970using Control c = new(); 1988using Control c = new(); 2009using Control c = new(); 2028using Control c = new(); 2048using Control c = new(); 2070using Control c = new(); 2089using Control c = new(); 2109using Control c = new(); 2129using Control c = new(); 2161using Control c = new(); 2180using Control c = new(); 2206using Control c = new() 2230using Control c = new(); 2251using Control c = new(); 2270using Control c = new(); 2307using Control c = new(); 2325using Control c = new(); 2342using Control c = new(); 2358using Control c = new(); 2367using Control c = new(); 2387using Control c = new(); 2408using Control c = new(); 2438using Control c = new(); 2474using Control c = new(); 2512using Control c = new(); 2532using Control c = new(); 2550using Control c = new(); 2565using Control c = new(); 2577using Control c = new(); 2619using Control c = new(); 2661using Control c = new(); 2693using Control c = new(); 2703using Control c = new(); 2723using Control c = new() 2738using Control c = new() 2756using Control c = new(); 2770using Control c = new() 2794using Control c = new(); 2808using Control c = new(); 2833using Control c = new(); 2858using Control c = new() 2876using Control c = new(); 2901using Control c = new(); 2926using Control c = new(); 2951using Control c = new(); 2964using Control c = new(); 2989using Control c = new(); 3014using Control c = new(); 3059using Control c = new(); 3078using Control c = new(); 3102using Control c = new(); 3171using Control controlParent = new(); 3172using Control c = new() 3246using Control c = new(); 3267using Control c = new(); 4138using Control c = new(); 4147using Control c = new(); 4172using Control c = new(); 4201using Control c = new(); 4242using Control c = new(); 4258using Control c = new(); 4302using Control c = new(); 4317using Control c = new(); 4358using Control c = new(); 4390using Control c = new(); 4395Assert.Equal(Control.DefaultBackColor, item.BackColor); 4396Assert.Equal(Control.DefaultBackColor, c.BackColor); 4401Assert.Equal(Control.DefaultBackColor, item.BackColor); 4402Assert.Equal(Control.DefaultBackColor, c.BackColor); 4406Assert.Equal(Control.DefaultBackColor, item.BackColor); 4407Assert.Equal(Control.DefaultBackColor, c.BackColor); 4413using Control c = new(); 4423using Control c = new(); 4428Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4429Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4434Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4435Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4439Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4440Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4446using Control c = new(); 4457using Control c = new(); 4491using Control c = new(); 4527using Control c = new(); 4633public SubToolStripControlHost(Control c) : base(c) 4637public SubToolStripControlHost(Control c, string name) : base(c, name) 4695public new void OnSubscribeControlEvents(Control control) => base.OnSubscribeControlEvents(control); 4697public new void OnUnsubscribeControlEvents(Control control) => base.OnUnsubscribeControlEvents(control);
System\Windows\Forms\ToolStripDropDownItemTests.cs (9)
31Assert.Equal(Control.DefaultBackColor, item.BackColor); 55Assert.NotSame(Control.DefaultFont, item.Font); 57Assert.Equal(Control.DefaultForeColor, item.ForeColor); 144Assert.NotSame(Control.DefaultFont, item.Font); 146Assert.Equal(Control.DefaultForeColor, item.ForeColor); 243Assert.NotSame(Control.DefaultFont, item.Font); 245Assert.Equal(Control.DefaultForeColor, item.ForeColor); 351Assert.NotSame(Control.DefaultFont, item.Font); 353Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripDropDownTests.cs (25)
36Assert.Equal(Control.DefaultBackColor, control.BackColor); 86Assert.Equal(Control.DefaultFont, control.Font); 88Assert.Equal(Control.DefaultForeColor, control.ForeColor); 703using Control parent = new(); 1325using Control parent = new() 1357using Control parent = new() 1478Assert.NotSame(Control.DefaultFont, control.Font); 1487using Control parent = new() 1516Assert.NotSame(Control.DefaultFont, control.Font); 1532Assert.Equal(value ?? Control.DefaultFont, control.Font); 1538Assert.Equal(value ?? Control.DefaultFont, control.Font); 1575Assert.Equal(Control.DefaultFont, control.Font); 1628Assert.Equal(Control.DefaultFont, control.Font); 1629Assert.Equal(Control.DefaultFont, item1.Font); 1630Assert.Equal(Control.DefaultFont, item2.Font); 1693Assert.Equal(Control.DefaultFont, control.Font); 1749Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2329using Control sourceControl = new() 2361using Control sourceControl = new() 2912using Control parent = new(); 3092using Control sourceControl = new() 3373using Control sourceControl = new() 3432using Control sourceControl = new() 4991using Control control = new(); 5023using Control control = new();
System\Windows\Forms\ToolStripItemTests.cs (31)
34Assert.Equal(Control.DefaultBackColor, item.BackColor); 56Assert.NotSame(Control.DefaultFont, item.Font); 58Assert.Equal(Control.DefaultForeColor, item.ForeColor); 141Assert.NotSame(Control.DefaultFont, item.Font); 143Assert.Equal(Control.DefaultForeColor, item.ForeColor); 236Assert.NotSame(Control.DefaultFont, item.Font); 238Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1556Assert.Equal(Control.DefaultBackColor, item.BackColor); 1663yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1725Assert.Equal(Control.DefaultBackColor, item.BackColor); 1747Assert.Equal(Control.DefaultBackColor, item.BackColor); 1763Assert.Equal(Control.DefaultBackColor, item.BackColor); 2945Assert.NotSame(Control.DefaultFont, item.Font); 3191Assert.NotSame(Control.DefaultFont, item.Font); 3201Assert.NotSame(Control.DefaultFont, item.Font); 3220Assert.NotSame(Control.DefaultFont, item.Font); 3230Assert.NotSame(Control.DefaultFont, item.Font); 3246Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3353yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 3418Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3440Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3456Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14085Assert.Equal(Control.DefaultBackColor, item.BackColor); 14090Assert.Equal(Control.DefaultBackColor, item.BackColor); 14094Assert.Equal(Control.DefaultBackColor, item.BackColor); 14124Assert.NotSame(Control.DefaultFont, item.Font); 14131Assert.NotSame(Control.DefaultFont, item.Font); 14137Assert.NotSame(Control.DefaultFont, item.Font); 14148Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14153Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14157Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
28Assert.Equal(Control.DefaultBackColor, item.BackColor); 55Assert.NotSame(Control.DefaultFont, item.Font); 57Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripPanel.ToolStripPanelControlCollection.XYComparerTests.cs (2)
11private readonly Control _control1 = new() { Bounds = new Rectangle(10, 20, 100, 100) }; 12private readonly Control _control2 = new() { Bounds = new Rectangle(10, 10, 100, 100) };
System\Windows\Forms\ToolStripPanelTests.cs (3)
33Assert.Equal(Control.DefaultBackColor, control.BackColor); 77Assert.Equal(Control.DefaultFont, control.Font); 79Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ToolStripSeparatorTests.cs (5)
32Assert.Equal(Control.DefaultBackColor, item.BackColor); 54Assert.NotSame(Control.DefaultFont, item.Font); 375Assert.Equal(Control.DefaultForeColor, item.ForeColor); 397Assert.Equal(Control.DefaultForeColor, item.ForeColor); 413Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripTests.cs (41)
36Assert.Equal(Control.DefaultBackColor, control.BackColor); 96Assert.Equal(Control.DefaultFont, control.Font); 98Assert.Equal(Control.DefaultForeColor, control.ForeColor); 194Assert.Equal(Control.DefaultBackColor, control.BackColor); 250Assert.Equal(Control.DefaultFont, control.Font); 252Assert.Equal(Control.DefaultForeColor, control.ForeColor); 914using Control parent = new(); 1061yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1086using Control parent = new() 1394Assert.NotSame(Control.DefaultFont, control.Font); 1403using Control parent = new() 1432Assert.NotSame(Control.DefaultFont, control.Font); 1448Assert.Equal(value ?? Control.DefaultFont, control.Font); 1454Assert.Equal(value ?? Control.DefaultFont, control.Font); 1491Assert.Equal(Control.DefaultFont, control.Font); 1544Assert.Equal(Control.DefaultFont, control.Font); 1545Assert.Equal(Control.DefaultFont, item1.Font); 1546Assert.Equal(Control.DefaultFont, item2.Font); 1609Assert.Equal(Control.DefaultFont, control.Font); 1876using Control parent = new() 1907using Control parent = new() 2457using Control parent = new(); 2714Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2921using Control parent = new(); 4237Control.ControlCollection controls = Assert.IsAssignableFrom<Control.ControlCollection>(control.CreateControlsInstance()); 4261Control.ControlCollection controls = Assert.IsAssignableFrom<Control.ControlCollection>(control.CreateControlsInstance()); 5267Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 5274Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 5912Control control = new() 5920foreach (Control parent in new Control[] { control, tabPage }) 5960Control control = new() 5968foreach (Control parent in new Control[] { control, tabPage }) 6018public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 6162using Control parent = new() 6921using Control parent = new(); 7349var child = toolStrip.GetChildAtPoint(new Point(x, y)); 7362var child = toolStrip.GetChildAtPoint(new Point(10, 10), skipValue);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
36Control control = new();
System\Windows\Forms\ToolTipTests.cs (9)
643public void ToolTip_GetToolTip_NoSuchControl_ReturnsEmpty(Control control) 652using Control control = new(); 675using Control control = new(); 696using Control control = new(); 723using Control control = new(); 751using Control control = new(); 809using Control topLevelControl = new(); 828Mock<Control.ControlAccessibleObject> mockAccessibleObject = new(MockBehavior.Strict, mockTabControl.Object); 903int expected = (int)default(ToolInfoWrapper<Control>).TestAccessor.Dynamic.TTTOOLINFO_V2_Size;
System\Windows\Forms\TreeViewTests.cs (5)
67Assert.Equal(Control.DefaultFont, control.Font); 83Assert.Equal(Control.DefaultFont.Height + 3, control.ItemHeight); 2736yield return new object[] { -1, Control.DefaultFont.Height + 3 }; 6629ToolInfoWrapper<Control> wrapper = treeView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip); 6642ToolInfoWrapper<Control> wrapper = treeView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip);
System\Windows\Forms\UnsupportedTypesTests.cs (2)
81using Control control = new(); 94using Control control = new();
System\Windows\Forms\UpDownBaseTests.cs (34)
46Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.ClientRectangle); 47Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.DisplayRectangle); 48Assert.Equal(new Size(120, Control.DefaultFont.Height + 7), control.ClientSize); 53Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.ClientRectangle); 54Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.DisplayRectangle); 55Assert.Equal(new Size(116, Control.DefaultFont.Height + 3), control.ClientSize); 87Assert.Equal(Control.DefaultFont, control.Font); 110Assert.Equal(Control.DefaultFont.Height + 7, control.PreferredHeight); 721yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 722yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 723yield return new object[] { BorderStyle.None, new Size(122, Control.DefaultFont.Height + 3) }; 727yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 728yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 729yield return new object[] { BorderStyle.None, new Size(119, Control.DefaultFont.Height + 3) }; 758yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 759yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 760yield return new object[] { BorderStyle.None, 1, 1, new Size(123, Control.DefaultFont.Height + 3) }; 764yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 765yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 766yield return new object[] { BorderStyle.None, 2, 1, new Size(123, Control.DefaultFont.Height + 3) }; 1263Assert.Same(control, ((Control)source).Parent); 1303Assert.Same(control, ((Control)source).Parent); 2757Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2758Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2759Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2763Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2764Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2765Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle); 2789Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2790Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2791Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2795Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2796Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2797Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle);
System\Windows\Forms\UserControlTests.cs (16)
37Assert.Equal(Control.DefaultBackColor, control.BackColor); 81Assert.Equal(Control.DefaultFont, control.Font); 83Assert.Equal(Control.DefaultForeColor, control.ForeColor); 314using Control parent = new(); 362using Control parent = new(); 520using Control parent = new(); 1262using Control child1 = new(); 1263using Control grandchild1 = new(); 1266using Control grandchild2 = new(); 1488using Control child1 = new(); 1489using Control grandchild1 = new(); 1492using Control grandchild2 = new(); 1722using Control child1 = new(); 1723using Control child2 = new(); 1752using Control child1 = new(); 1753using Control child2 = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (3)
356using Control childControl = new(); 383using Control childControl = new(); 394using Control childControl = new();
System\Windows\Forms\VScrollBarTests.cs (3)
25Assert.Equal(Control.DefaultBackColor, control.BackColor); 72Assert.Equal(Control.DefaultFont, control.Font); 74Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\WebBrowserContainerTests.cs (4)
16using Control control = new() 33using Control control = new() 38HashSet<Control> containerCache = container.TestAccessor.Dynamic._containerCache; 98using Control control = new()
System\Windows\Forms\WebBrowserTests.cs (145)
28Assert.Equal(Control.DefaultBackColor, control.BackColor); 62Assert.Equal(Control.DefaultFont, control.Font); 64Assert.Equal(Control.DefaultForeColor, control.ForeColor); 161using Control parent = new(); 189using Control parent = new(); 228using Control parent = new(); 242using Control parent = new(); 254using Control parent = new(); 292using Control parent = new(); 328using Control parent = new(); 341using Control parent = new(); 353using Control parent = new(); 373using Control parent = new(); 398using Control parent = new(); 412using Control parent = new(); 440using Control parent = new(); 456using Control parent = new(); 478using Control parent = new(); 490using Control parent = new(); 511using Control parent = new(); 525using Control parent = new(); 546using Control parent = new(); 558using Control parent = new(); 570using Control parent = new(); 595using Control parent = new(); 607using Control parent = new(); 628using Control parent = new(); 642using Control parent = new(); 663using Control parent = new(); 675using Control parent = new(); 709using Control parent = new(); 732using Control parent = new(); 831using Control parent = new(); 843using Control parent = new(); 864using Control parent = new(); 881using Control parent = new(); 900using Control parent = new(); 912using Control parent = new(); 933using Control parent = new(); 947using Control parent = new(); 967using Control parent = new(); 979using Control parent = new(); 1000using Control parent = new(); 1014using Control parent = new(); 1033using Control parent = new(); 1045using Control parent = new(); 1066using Control parent = new(); 1085((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1109using Control parent = new(); 1123using Control parent = new(); 1142using Control parent = new(); 1154using Control parent = new(); 1175using Control parent = new(); 1189using Control parent = new(); 1201using Control parent = new(); 1239using Control parent = new(); 1292using Control parent = new(); 1342((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1419using Control parent = new(); 1438using Control parent = new() 1460using Control parent = new(); 1480using Control parent = new(); 1499using Control parent = new() 1521using Control parent = new(); 1596using Control parent = new(); 1610using Control parent = new(); 1629using Control parent = new(); 1641using Control parent = new(); 1662using Control parent = new(); 1676using Control parent = new(); 1688using Control parent = new(); 1726using Control parent = new(); 1760using Control parent = new(); 1773using Control parent = new(); 1811using Control parent = new(); 1847using Control parent = new(); 1861using Control parent = new(); 1880using Control parent = new(); 1892using Control parent = new(); 1913using Control parent = new(); 1927using Control parent = new(); 1946using Control parent = new(); 1958using Control parent = new(); 1970using Control parent = new(); 2065using Control parent = new(); 2096using Control parent = new(); 2108using Control parent = new(); 2120using Control parent = new(); 2278using Control parent = new(); 2358using Control parent = new(); 2385using Control parent = new(); 2443using Control parent = new(); 2463using Control parent = new(); 2487using Control parent = new(); 2574using Control parent = new(); 2677using Control parent = new(); 2721using Control parent = new(); 2866using Control parent = new(); 2887using Control parent = new(); 2967using Control parent = new(); 2989using Control parent = new(); 3004using Control parent = new(); 3082using Control parent = new(); 3104using Control parent = new(); 3119using Control parent = new(); 3131using Control parent = new(); 3153using Control parent = new(); 3168using Control parent = new(); 3180using Control parent = new(); 3192using Control parent = new(); 3281using Control parent = new(); 3304using Control parent = new(); 3399using Control parent = new(); 3422using Control parent = new(); 3470using Control parent = new(); 3486using Control parent = new(); 3604Control parent = new(); 3644using Control parent = new(); 3656using Control parent = new(); 3921using Control parent = new(); 3943using Control parent = new(); 3958using Control parent = new(); 4016using Control parent = new(); 4088using Control parent = new(); 4105using Control parent = new(); 4165using Control parent = new(); 4223using Control parent = new(); 4246using Control parent = new(); 4261using Control parent = new(); 4283using Control parent = new(); 4298using Control parent = new(); 4320using Control parent = new(); 4335using Control parent = new(); 4357using Control parent = new(); 4372using Control parent = new(); 4394using Control parent = new(); 4409using Control parent = new(); 4431using Control parent = new(); 4446using Control parent = new(); 4463((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 4468((Control)control).MouseHover += (sender, e) => 4525using Control control = new(); 4579((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 4599using Control control = new(); 4629((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
TextBoxBaseTests.cs (39)
18private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 287using Control parent = new(); 581using Control parent = new(); 877Assert.Equal(value ?? Control.DefaultFont, control.Font); 883Assert.Equal(value ?? Control.DefaultFont, control.Font); 897Assert.Equal(value ?? Control.DefaultFont, control.Font); 903Assert.Equal(value ?? Control.DefaultFont, control.Font); 919Assert.Equal(value ?? Control.DefaultFont, control.Font); 925Assert.Equal(value ?? Control.DefaultFont, control.Font); 942Assert.Equal(value ?? Control.DefaultFont, control.Font); 948Assert.Equal(value ?? Control.DefaultFont, control.Font); 979Assert.Equal(value ?? Control.DefaultFont, control.Font); 988Assert.Equal(value ?? Control.DefaultFont, control.Font); 1016Assert.Equal(value ?? Control.DefaultFont, control.Font); 1025Assert.Equal(value ?? Control.DefaultFont, control.Font); 1063Assert.Equal(value ?? Control.DefaultFont, control.Font); 1072Assert.Equal(value ?? Control.DefaultFont, control.Font); 1102Assert.Equal(value ?? Control.DefaultFont, control.Font); 1111Assert.Equal(value ?? Control.DefaultFont, control.Font); 1151Assert.Equal(Control.DefaultFont, control.Font); 2008using Control parent = new(); 2067using Control parent = new(); 2279yield return new object[] { BorderStyle.None, Control.DefaultFont.Height }; 3727using Control parent = new(); 3777using Control parent = new(); 5010yield return new object[] { multiline, wordWrap, BorderStyle.None, Size.Empty, new Size(0, Control.DefaultFont.Height) }; 5011yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(-1, -2), new Size(0, Control.DefaultFont.Height) }; 5012yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(10, 20), new Size(0, Control.DefaultFont.Height) }; 5013yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(30, 40), new Size(0, Control.DefaultFont.Height) }; 5014yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(int.MaxValue, int.MaxValue), new Size(0, Control.DefaultFont.Height) }; 5071yield return new object[] { BorderStyle.None, Size.Empty, 0, Control.DefaultFont.Height }; 5072yield return new object[] { BorderStyle.None, new Size(-1, -2), 0, Control.DefaultFont.Height }; 5073yield return new object[] { BorderStyle.None, new Size(10, 20), 0, Control.DefaultFont.Height }; 5074yield return new object[] { BorderStyle.None, new Size(30, 40), 0, Control.DefaultFont.Height }; 5075yield return new object[] { BorderStyle.None, new Size(int.MaxValue, int.MaxValue), 0, Control.DefaultFont.Height }; 5863using Control parent = new(); 6042using Control parent = new(); 6974using Control control = new(); 7055using Control control = new();
TextBoxTests.cs (4)
15private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 72Assert.Equal(Control.DefaultFont, control.Font); 462Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance()); 479Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance());
TrackBarTests.cs (5)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 65Assert.Equal(Control.DefaultFont, control.Font); 631Assert.Equal(value ?? Control.DefaultFont, control.Font); 637Assert.Equal(value ?? Control.DefaultFont, control.Font); 674Assert.Equal(Control.DefaultFont, control.Font);
WebBrowserBaseTests.cs (7)
38((Control)control).Layout += (sender, e) => 147((Control)control).Layout += (sender, e) => 188((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 239using Control parent = new(); 491((Control)control).Layout -= handler; 692((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 814using Control parent = new()
System.Windows.Forms.TestUtilities (6)
CommonTestHelperEx.cs (2)
18{ Color.Empty, Control.DefaultBackColor } 30{ Color.Empty, Control.DefaultForeColor }
ControlExtensions.cs (2)
13/// Creates a metafile for the specified <see cref="Control"/> by calling <see cref="PInvokeCore.WM_PRINT"/>. 16this Control control,
KeyboardSimulator.cs (2)
12public static void KeyDown(Control control, Keys key) 18public static void KeyPress(Control control, Keys key)
System.Windows.Forms.UI.IntegrationTests (11)
DesignBehaviorsTests.cs (5)
76((Control)e.Component!).Size = new Size(50, 50); 83Control rootView = (Control)designSurface.View; 101await InitiateDrangDropAsync(form, dndStartCoordinates, (Control)designSurface.View); 120async Task InitiateDrangDropAsync(Form form, Point startCoordinates, Control rootView)
Dpi\DpiMessageHelper.cs (1)
8public static void TriggerDpiMessage(MessageId message, Control control, int newDpi)
Infra\ControlTestBase.cs (5)
164protected async Task MoveMouseToControlAsync(Control control) 216where T : Control, new() 235where T : Control, new() 263where T1 : Control, new() 264where T2 : Control, new()
VisualBasicRuntimeTest (4)
Program.cs (4)
141var control = (Control)controlProperty.GetValue(dialog); 165var control = (Control)controlField.GetValue(form);
WindowsFormsIntegration (27)
System\Windows\Integration\ApplicationInterop.cs (2)
105SWF.Control control = SWF.Control.FromChildHandle(m.HWnd);
System\Windows\Integration\ElementHost.cs (8)
396internal void InvokePaintBackgroundAndPaint(SWF.Control control, SWF.PaintEventArgs args) 645ImeMode ehImeMode = this.ImeMode != ImeMode.NoControl ? this.ImeMode : SWF.Control.PropagatingImeMode; 1530private static SD.Color FindSolidColorParent(Control whichControl) 1532Control control = whichControl; 1607Control topMostParent = null; 1634Control currentControl = _hostControl; 1635Control parentControl = _hostControl.Parent; 1670private bool ShouldSearchWrapForParentControl(Control control)
System\Windows\Integration\ElementHostPropertyMap.cs (1)
66Control parent = host.Parent;
System\Windows\Integration\HostUtils.cs (4)
143internal static void SetBackgroundImage(WinFormsAdapter adapter, Control child, SD.Bitmap image) 171internal static SD.Bitmap GetBitmapOfControl(Control control, ElementHost host) 192internal static SD.Bitmap GetCoveredPortionOfBitmap(Control parentControl, ElementHost childElementHost) 276internal static SD.Bitmap GetBitmapFromRenderTargetBitmap(Control control, RenderTargetBitmap bmp, Point offset)
System\Windows\Integration\WindowsFormsHost.cs (8)
303public Control Child 311Control oldChild = Child; 340private void OnChildChanged(Control oldChild) 721private Control _child; 722public Control Child 915SWF.Control c = this.ActiveControl.Parent; 1084private void CallOnParentRightToLeftChanged(Control control) 1086MethodInfo methodInfo = typeof(SWF.Control).GetMethod("OnParentRightToLeftChanged", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EventArgs) }, null);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (4)
78SWF.Control child = windowsFormsHost.Child; 100SWF.Control childControl = GetChildControl(host, FlowDirectionPropertyTranslator, value); 247SWF.Control childControl = GetChildControl(host, PaddingPropertyTranslator, value); 292private SWF.Control GetChildControl(object host, PropertyTranslator translator, object value)
WinFormsControlsTest (11)
CustomComCtl32Button.cs (4)
21var controls = new Control[] 53foreach (Control control in controls) 55control.Paint += (sender, e) => DrawRoundBorder((Control)sender, e.Graphics); 75static void DrawRoundBorder(Control sender, Graphics g)
Dialogs.cs (1)
70foreach (Control control in propertyGrid1.Controls)
ListBoxes.cs (4)
19var control = (Control)sender; 27var control = (Control)sender;
MainForm.cs (1)
247foreach (Control control in overarchingFlowLayoutPanel.Controls)
MessageBoxes.cs (1)
50foreach (Control control in propertyGrid1.Controls)