112 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)
16internal 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)
18Control,
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)
618private 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)
17internal 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 173private class ContainerPlaceholder : Control 189private class ControlPlaceholder : Control 205private class SpringControl : Control
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (1)
14private partial class AdornerWindow : Control
System\Windows\Forms\Design\ComponentTray.cs (1)
1895internal 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)
164private class ToolStripAdornerWindow : Control
System.Windows.Forms.Design.Tests (3)
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.Tests (55)
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)
1112private class OnCreateControlCounter : Control 1123private class SubControl : Control
System\Windows\Forms\ControlTests.Methods.cs (7)
2951private class CustomLayoutEngineControl : Control 5465private class CustomIsInputControl : Control 5476private class CustomProcessControl : Control 5945private class CustomProcessKeyEventArgsControl : Control 10130private class BorderedControl : Control 14145private class CustomContainerControl : Control, IContainerControl 14379private class NoCreateControl : Control
System\Windows\Forms\ControlTests.Properties.cs (13)
98private class CustomCreateAccessibilityInstanceControl : Control 3665private class CustomCreateControlsInstanceControl : Control 3799private class CustomDefaultCursorControl : Control 6647private class RightToLeftControl : Control 7687private class NonZeroDefaultMarginControl : Control 7692private class ZeroDefaultMarginControl : Control 7896private class NonZeroWidthDefaultMaximumSizeControl : Control 7901private class NonZeroHeightDefaultMaximumSizeControl : Control 7906private class NonZeroWidthNonZeroHeightDefaultMaximumSizeControl : Control 8505private class NonZeroWidthDefaultMinimumSizeControl : Control 8510private class NonZeroHeightDefaultMinimumSizeControl : Control 8515private class NonZeroWidthNonZeroHeightDefaultMinimumSizeControl : Control 9398private class NonZeroDefaultPaddingControl : 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)
7439private 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)
317public class SampleControl : Control
WindowsFormsIntegration (2)
System\Windows\Integration\ElementHost.cs (1)
43public class ElementHost : Control
System\Windows\Integration\WindowsFormsHost.cs (1)
794private class FocusTargetControl : Control
2026 instantiations of Control
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
42control = new Control();
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
42control = 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 (49)
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\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\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\SelectionUIHandlerTests.cs (1)
23_control = new();
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (1)
66using Control control = new();
SystemDesignMetadataReader.cs (1)
19IDesigner designer = designSurface.CreateDesigner(new Control(), true);
TestControlDesigner.Mocks.cs (1)
12internal readonly Control _control = new();
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
490using Control control = new();
System.Windows.Forms.Tests (1966)
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)
992Control 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)
291yield return new object[] { new Control(), string.Empty, string.Empty }; 292yield return new object[] { new Control(), "text", "text" }; 387yield return new object[] { new Control(), string.Empty, 0, 0, 0, 0, string.Empty }; 388yield return new object[] { new Control(), "text", 1, 2, 3, 4, "text" }; 573using Control parent = new(); 598using 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(); 505using Control parent = new(); 566using Control control = new() 692using Control parent = new(); 780using Control parent = new(); 781using Control control = new() 785using Control child1 = new() 789using Control child2 = new() 793using Control grandchild1 = new() 797using Control otherParent = new(); 798using Control otherControl = new() 802using Control emptyControl = new(); 845using Control parent = new(); 975using Control control = new(); 1020using Control parent = new(); 1023using Control control = new() 1073using Control control = new(); 1074using Control child1 = new(); 1075using Control child2 = new(); 1151using Control control = new(); 1198using Control control = new(); 1818using Control control = new(); 1826using Control control = new(); 1935using Control control = new(); 1944using Control control = new(); 2062using Control control = new(); 2082using Control control = new(); 2096using Control control = new(); 2103using Control grandparent = new(); 2104using Control parent = new() 2108using Control control = new() 2125using Control parent = new() 2129using Control control = new() 2146using Control control = new() 2164using Control parent = new() 2168using Control control = new() 2186using Control parent = new() 2190using Control control = new() 2207using Control cont = new(); 2208using Control first = new() 2212using Control second = new() 2216using Control third = new() 2235using Control cont = new(); 2236using Control first = new() 2240using Control second = new() 2244using Control third = new() 2263using Control cont = new(); 2264using Control first = new() 2268using Control second = new() 2272using Control third = new() 2291using Control cont = new(); 2292using Control first = new() 2296using Control second = new() 2300using Control third = new() 2329using Control control = new(); 2342using Control control = new() 2381using Control control = new() 2530.Returns(new Control()); 2866using Control control = new() 2881using Control control = new() 2957_layoutEngine = new Control().LayoutEngine; 3756using Control control = new(); 3781using Control control = new(); 3807using Control control = new(); 3836using Control control = new(); 3870using Control control = new(); 3906using Control control = new(); 3939using Control control = new(); 3972using Control control = new(); 3998using Control control = new(); 4025using Control control = new(); 4060using Control control = new(); 4090using Control control = new(); 4132using Control control = new(); 4141using Control control = new(); 4153using Control otherControl = new(); 4277using Control otherControlParent = new(); 4329using Control otherControl = new(); 4732using Control control = new(); 4786using Control parent = new(); 4787using Control control = new() 4821using Control parent = new(); 4915control.PerformLayout(new Control(), "OtherAffectedProperty"); 4919control.PerformLayout(new Control(), "OtherAffectedProperty"); 4938using Control control = new(); 4977yield return new object[] { new Control(), string.Empty }; 4978yield return new object[] { new Control(), "AffectedProperty" }; 4985using Control control = new(); 5041using Control parent = new(); 5042using Control control = new() 5074yield return new object[] { true, new Control(), string.Empty, 1 }; 5075yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5078yield return new object[] { false, new Control(), string.Empty, 0 }; 5079yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5086using Control parent = new(); 5137yield return new object[] { true, new Control(), string.Empty, 1 }; 5138yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5141yield return new object[] { false, new Control(), string.Empty, 0 }; 5142yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5189control.PerformLayout(new Control(), "OtherAffectedProperty"); 5193control.PerformLayout(new Control(), "OtherAffectedProperty"); 5212using Control control = new(); 5239control.PerformLayout(new Control(), "AffectedProperty"); 5254Assert.Throws<NullReferenceException>(() => control.PerformLayout(new Control(), "AffectedProperty")); 5332using Control parent = new(); 5509using Control parent = new(); 5562using Control parent = new(); 5610using Control parent = new(); 5710using Control parent = new(); 6001using Control parent = new(); 6209using Control parent = new(); 6295using Control control = new(); 6307using Control control = new(); 6348using Control control = new(); 6406using Control control = new(); 6426using Control control = new(); 6540yield return new object[] { new Control(), string.Empty, true, 1 }; 6541yield return new object[] { new Control(), "AffectedProperty", true, 1 }; 6544yield return new object[] { new Control(), string.Empty, false, 0 }; 6545yield return new object[] { new Control(), "AffectedProperty", false, 0 }; 6552using Control control = new(); 6580using Control control = new(); 6594control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6610using Control control = new(); 6630using Control control = new(); 6660using Control control = new(); 6675control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6691using Control control = new(); 6714using Control child = new(); 6743using Control control = new(); 6762using Control child = new(); 6789using Control control = new(); 6990using Control parent = new(); 6991using Control child1 = new(); 6992using Control child2 = new(); 7032using Control parent = new(); 7033using Control child1 = new(); 7034using Control child2 = new(); 7087using Control parent = new(); 7088using Control child1 = new(); 7089using Control child2 = new(); 7154using Control parent = new(); 7156using Control child2 = new(); 7275using Control parent = new(); 7648using Control parent = new(); 7905using Control parent = new(); 8505using Control parent = new(); 8762using Control parent = new(); 9302using Control parent = new(); 9600using Control parent = new(); 10086using Control parent = new(); 10189using Control control = new() 10207using Control control = new() 10238using Control control = new(); 10255using Control control = new(); 10285using Control control = new(); 10292using Control control = new(); 10304using Control control = new(); 11205using Control parent = new(); 11443using Control parent = new(); 11691using Control parent = new(); 11941using Control parent = new(); 12150using Control parent = new(); 12169using Control parent = new(); 12201using Control parent = new(); 12234using Control parent = new(); 12278using Control parent = new(); 12279using Control child1 = new(); 12325using Control parent = new(); 12514using Control control = new(); 12588using Control control = new(); 14209using Control grandparent = new(); 14297using Control grandparent = new();
System\Windows\Forms\ControlTests.Properties.cs (362)
23using Control control = new(); 39using Control control = new(); 83using Control control1 = new(); 109using Control control = new() 126using Control control = new() 143using Control control = new() 160using Control control = new() 177using Control control = new(); 185using Control control = new() 207using Control control = new(); 244using Control control = new(); 284using Control control = new(); 339using Control control = new(); 361using Control control = new() 412using Control parent = new(); 413using Control control = new() 457using Control grandparent = new(); 458using Control parent = new() 462using Control control = new() 558using Control parent = new(); 559using Control control = new() 677using Control grandparent = new(); 678using Control parent = new() 682using Control control = new() 769using Control control = new() 823using Control parent = new(); 824using Control control = new() 871using Control control = new(); 906using Control control = new() 921using Control control = new(); 948using Control parent = new(); 949using Control control = new() 1003using Control control = new() 1066using Control control = new(); 1109using Control parent = new(); 1110using Control control = new() 1192using Control control = new() 1231using Control control = new() 1248using Control control = new() 1291using Control child1 = new(); 1292using Control child2 = new(); 1293using Control control = new(); 1315using Control child1 = new() 1319using Control child2 = new() 1323using Control control = new(); 1351using Control control = new(); 1379using Control control = new(); 1414using Control control = new(); 1439using Control child1 = new(); 1440using Control child2 = new(); 1441using Control control = new(); 1519using Control child1 = new() 1523using Control child2 = new() 1527using Control control = new(); 1599using Control control = new(); 1607using Control control = new(); 1623using Control control = new(); 1639using Control control = new() 1662using Control control = new(); 1691using Control child1 = new(); 1692using Control child2 = new(); 1693using Control control = new(); 1715using Control child1 = new() 1719using Control child2 = new() 1723using Control control = new(); 1742using Control control = new(); 1784using Control control = new(); 1810using Control child1 = new(); 1811using Control child2 = new(); 1812using Control control = new(); 1897using Control child1 = new() 1901using Control child2 = new() 1905using Control control = new(); 2075using Control control = new(); 2110using Control control = new(); 2136using Control control = new(); 2144using Control parent = new() 2148using Control control = new() 2163using Control control = new() 2180using Control control = new() 2197using Control control = new() 2215using Control control = new(); 2257using Control child1 = new(); 2258using Control child2 = new(); 2259using Control control = new(); 2344using Control child1 = new() 2348using Control child2 = new() 2352using Control control = new(); 2695using Control parent = new(); 2906using Control parent = new(); 3049using Control control = new() 3065using Control control = new() 3080using Control parent = new() 3085using Control control = new() 3099using Control control = new() 3115using Control parent = new() 3120using Control control = new() 3132using Control control = new() 3154using Control control = new(); 3191using Control control = new() 3213using Control control = new(); 3249using Control control = new() 3286yield return new object[] { new Control(), Size.Empty }; 3328using Control control = new(); 3486using Control control = new(); 3540using Control control = new() 3558using Control control = new() 3576using Control control = new() 3591using Control control = new() 3607using Control control = new(); 3649yield return new object[] { new Control.ControlCollection(new Control()) }; 3676using Control control = new(); 3682using Control child = new(); 3696using Control control = new(); 3702using Control child = new(); 3716using Control control = new() 3732using Control parent = new() 3736using Control control = new() 3756using Control control = new() 3784using Control parent = new() 3810using Control control = new() 3827using Control control = new(); 3856using Control child1 = new(); 3857using Control child2 = new(); 3858using Control control = new(); 3880using Control child1 = new() 3884using Control child2 = new() 3888using Control control = new(); 3907using Control control = new(); 3949using Control child1 = new(); 3950using Control child2 = new(); 3951using Control control = new(); 4036using Control child1 = new() 4040using Control child2 = new() 4044using Control control = new(); 4128using Control control = new(); 4150using Control control = new() 4185using Control parent = new(); 4186using Control control = new() 4275using Control parent = new(); 4276using Control control = new() 4332using Control control = new() 4351using Control control = new(); 4385using Control control = new() 4424using Control control = new(); 4506using Control control = new() 4569using Control control = new() 4607using Control child1 = new(); 4608using Control child2 = new(); 4609using Control control = new() 4684using Control child1 = new() 4688using Control child2 = new() 4692using Control control = new() 4768using Control control = new(); 4784using Control control = new(); 4801using Control parent = new() 4805using Control control = new() 4825using Control control = new() 5024using Control control = new(); 5066using Control child1 = new(); 5067using Control child2 = new(); 5068using Control control = new(); 5153using Control child1 = new() 5157using Control child2 = new() 5161using Control control = new(); 5245using Control control = new(); 5270using Control control = new(); 5295using Control control = new() 5312using Control control = new() 5331using Control child1 = new(); 5332using Control child2 = new(); 5333using Control control = new(); 5355using Control child1 = new() 5359using Control child2 = new() 5363using Control control = new(); 5392using Control control = new(); 5420using Control control = new(); 5455using Control control = new(); 5480using Control child1 = new(); 5481using Control child2 = new(); 5482using Control control = new(); 5560using Control child1 = new() 5564using Control child2 = new() 5568using Control control = new(); 5641using Control control = new(); 5657using Control control = new(); 5672using Control cont = new(); 5972using Control parent = new(); 6207using Control parent = new(); 6365using Control control = new() 6382using Control control = new(); 6410using Control control = new(); 6446using Control control = new(); 6560using Control control = new(); 6573using Control control = new(); 6587using Control control = new() 6608using Control control = new(); 6639using Control control = new(); 6742using Control parent = new(); 6936using Control parent = new(); 7089using Control control = new(); 7147using Control control = new(); 7221using Control parent = new(); 7419using Control parent = new(); 7575using Control control = new(); 7599using Control control = new(); 7622using Control control = new(); 7675yield return new object[] { new Control(), new Padding(3) }; 7709using Control control = new(); 7729using Control parent = new(); 7730using Control control = new() 7759using Control control = new(); 7798using Control parent = new(); 7799using Control control = new() 7853using Control control = new(); 7869using Control control = new(); 7883yield return new object[] { new Control(), Size.Empty }; 7931using Control control = new(); 7953using Control control = new() 7999using Control control = new() 8030using Control control = new() 8055using Control control = new() 8102using Control parent = new(); 8103using Control control = new() 8157using Control parent = new(); 8158using Control control = new() 8200using Control control = new(); 8235using Control control = new() 8273using Control control = new() 8311using Control parent = new(); 8312using Control control = new() 8378using Control parent = new(); 8379using Control control = new() 8446using Control control = new(); 8470using Control control = new(); 8492yield return new object[] { new Control(), Size.Empty }; 8540using Control control = new(); 8584using Control control = new() 8637using Control control = new() 8668using Control control = new() 8699using Control control = new() 8746using Control parent = new(); 8747using Control control = new() 8807using Control parent = new(); 8808using Control control = new() 8872using Control control = new(); 8929using Control control = new() 8995using Control control = new() 9054using Control parent = new(); 9055using Control control = new() 9142using Control parent = new(); 9143using Control control = new() 9216using Control control = new(); 9240using Control control = new(); 9302using Control control = new() 9318using Control control = new() 9335using Control control = new() 9370using Control control = new() 9387yield return new object[] { new Control(), Padding.Empty }; 9415using Control control = new(); 9441using Control parent = new(); 9442using Control control = new() 9539using Control parent = new(); 9610using Control control = new(); 9648using Control control = new(); 9664using Control control = new(); 9679yield return new object[] { new Control() }; 9687using Control control = new() 9704using Control oldParent = new(); 9705using Control control = new() 9725using Control parent = new(); 9726using Control control = new() 9745using Control control = new(); 9773using Control parent = new(); 9774using Control control = new(); 9809using Control control = new(); 9817using Control child = new(); 9818using Control control = new(); 9828using Control parent = new(); 9839using Control control = new(); 9840using Control child = new() 9858using Control child = new() 9880using Control control = new() 9898using Control control = new() 9920using Control control = new(); 9950using Control control = new() 9984using Control control = new(); 10059using Control control = new() 10076using Control control = new() 10095using Control child1 = new(); 10096using Control child2 = new(); 10097using Control control = new(); 10119using Control child1 = new() 10123using Control child2 = new() 10127using Control control = new(); 10151using Control control = new(); 10182using Control control = new() 10213using Control control = new(); 10248using Control control = new(); 10273using Control child1 = new(); 10274using Control child2 = new() 10278using Control control = new(); 10356using Control child1 = new() 10360using Control child2 = new() 10364using Control control = new(); 10437using Control control = new(); 10445using Control control = new(); 10473using Control control = new(); 10651using Control control = new() 10668using Control control = new(); 10704using Control control = new() 10781using Control control = new(); 10957using Control control = new() 11371using Control parent = new(); 11616using Control parent = new(); 11756using Control control = new(); 11780using Control control = new(); 11806using Control control = new() 11822using Control control = new() 11860using Control control = new(); 11868using Control control = new() 11890using Control control = new(); 11926using Control control = new() 11965using Control control = new() 11982using Control control = new(); 12010using Control control = new(); 12046using Control control = new(); 12073using Control control = new(); 12176using Control parent = new(); 12368using Control parent = new(); 12521using Control control = new(); 12569using Control grandparent = new(); 12570using Control parent = new() 12574using Control control = new() 12588using Control parent = new() 12592using Control control = new() 12605using Control control = new() 12627using Control control = new(); 12628using Control child1 = new(); 12629using Control child2 = new(); 12658using Control control = new(); 12698using Control parent = new() 12702using Control item = new() 12717using Control control = new() 12739using Control parent = new(); 12740using Control control = new() 12813using Control parent = new(); 12814using Control control = new() 12871using Control control = new() 12909using Control child1 = new(); 12910using Control child2 = new(); 12911using Control control = new() 12986using Control child1 = new() 12990using Control child2 = new() 12994using Control control = new() 13070using Control control = new(); 13086using Control control = new(); 13391using Control parent = new(); 13626using Control parent = new(); 13765using Control cont = new(); 13777using Control control = new() 13792using 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)
927yield return new object[] { new Control() }; 955using Control oldParent = new(); 1069yield return new object[] { new Control() }; 1101using Control parent = new(); 1155using Control parent = new(); 1206using Control parent = new(); 2603using 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\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(new Control(), "affectedProperty")
5341 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;
DesignSurface (1)
MainForm.cs (1)
391Control view = surface.GetView();
DesignSurfaceExt (15)
DesignerSerializationServiceImpl.cs (1)
36if (obj is Control)
DesignSurfaceExt.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; 227public Control GetView() 229Control ctrl = View as Control;
IDesignSurfaceExt.cs (3)
22where TControl : Control, IComponent; 25where TControl : Control; 37Control GetView();
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
37Control? control = null;
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
37Control? 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 (3)
Microsoft\VisualBasic\Devices\Keyboard.vb (3)
21Dim keys As Keys = Control.ModifierKeys 46Dim keys As Keys = Control.ModifierKeys 85Dim keys As Keys = Control.ModifierKeys
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)
140private void SetTextProperty(Control control, string text) 157private void SetTextProperty(Control control, DateTime? date)
MS\Internal\Documents\DialogBaseForm.cs (3)
94private void ApplyDialogFont(Control control) 97foreach (Control c in control.Controls) 135private void ApplyDialogFontToPropertyGrid(Control control)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
270System.Windows.Forms.Control rmPublishingDialog = 271System.Windows.Forms.Control.FromHandle(hWndParent) as RMPublishingDialog;
System.Windows.Forms (1011)
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)
1600Control? control = container?.ActiveControl; 1937/// The <see cref="ContainingControl"/> property value can be different from the <see cref="Control.Parent"/> 1941/// property value of the ActiveX control is the <see cref="Form"/>, and the <see cref="Control.Parent"/> 1995Control? control = this; 2078Control? richParent = ParentInternal; 2122Control? control = this; 2149Control? parent = ParentInternal; 3005public unsafe void ShowPropertyPages(Control? control) 3326Control? 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)
912/// Enables visual styles for all subsequent <see cref="Run()"/> and <see cref="Control.CreateHandle"/> calls. 1343Control.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)
43private Control? _marshallingControl; 53private WeakReference<Control>? _activatingControlRef; 166internal Control? ActivatingControl 168get => _activatingControlRef?.TryGetTarget(out Control? target) ?? false ? target : null; 175internal Control MarshallingControl 951Control? target = Control.FromChildHandle(msg.hwnd); 961if (Control.PreProcessControlMessageInternal(target, ref m) == PreProcessControlState.MessageProcessed) 970if (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 (125)
245private Control? _parent; 246private WeakReference<Control>? _reflectParent; 300/// Initializes a new instance of the <see cref="Control"/> class. 383/// Initializes a new instance of the <see cref="Control"/> class. 390/// Initializes a new instance of the <see cref="Control"/> class. 397/// Initializes a new instance of the <see cref="Control"/> class. 399public Control(Control? parent, string? text) : this() 406/// Initializes a new instance of the <see cref="Control"/> class. 408public Control(Control? parent, string? text, int left, int top, int width, int height) : this(parent, text) 780Control? parent = ParentInternal; 948Control? parent = ParentInternal; 1396if (container.ParentInternal is not Control parent 1619Control? control = ParentInternal; 2165Control topMost = TopMostParent; 2231Control? parent = ParentInternal; 2293Control control; 2300Control marshalingControl = FindMarshalingControl(); 2344private static ISite? GetSitedParentSite(Control control) 2612public Control? Parent 2618internal virtual Control? ParentInternal 2690private Control? ReflectParent 2692get => _reflectParent?.TryGetTarget(out Control? parent) ?? false ? parent : null; 2697Control? existing = ReflectParent; 3143for (Control? control = this; control is not null; control = control.ParentInternal) 3187public Control? TopLevelControl => TopLevelControlInternal; 3189internal Control? TopLevelControlInternal 3193Control? control = this; 3203internal Control TopMostParent 3207Control control = this; 4143internal virtual void AssignParent(Control? value) 4282Control marshaler = FindMarshalingControl(); 4336for (Control? ctl = this; ctl is not null; ctl = ctl._parent) 4351internal static void CheckParentingCycle(Control? bottom, Control? toFind) 4354Control? lastParent = null; 4356for (Control? ctl = bottom; ctl is not null; ctl = ctl.ParentInternal) 4389private void ChildGotFocus(Control child) 4402public bool Contains([NotNullWhen(true)] Control? ctl) 4581Control[] controlSnapshot = new Control[children.Count]; 4584foreach (Control control in controlSnapshot) 4679/// Disposes of the resources (other than memory) used by the <see cref="Control"/>. 4741Control child = children[i]; 4964Control marshaler = FindMarshalingControl(); 5010Control? current = this; 5025private Control FindMarshalingControl() 5029Control? c = this; 5033Control? p = c.ParentInternal; 5134public static Control? FromChildHandle(IntPtr handle) 5139Control? control = FromHandle(hwnd); 5153/// it with the first parent <see cref="Control"/> if possible. 5161public static Control? FromHandle(IntPtr handle) 5210public Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) 5221Control? control = FromChildHandle(hwnd); 5234public Control? GetChildAtPoint(Point pt) => GetChildAtPoint(pt, GetChildAtPointSkip.None); 5242Control? c = IsContainerControl ? ParentInternal : this; 5252private static bool IsFocusManagingContainerControl(Control ctl) 5351Control? control = this; 5382Control? ctl = FromHandle(hWndChild); 5404internal Control[] GetChildControlsInTabOrder(bool handleCreatedOnly) 5408foreach (Control c in Controls) 5418Control[] controls = new Control[holders.Count]; 5427internal virtual Control? GetFirstChildControlInTabOrder(bool forward) 5434Control? found = null; 5510public Control? GetNextControl(Control? ctl, bool forward) 5521Control? found = ctl.GetFirstChildControlInTabOrder(forward: true); 5532Control? found = null; 5533Control? p = ctl._parent; 5595Control? found = null; 5596Control? parent = ctl._parent ?? throw new InvalidOperationException( 5616Control sibling = siblings[c]; 5676Control? found = ctl.GetFirstChildControlInTabOrder(forward: false); 5693/// Return <see cref="Handle"/> if <paramref name="window"/> is a <see cref="Control"/>. 5699if (window is Control control) 5971Control marshaler = FindMarshalingControl(); 6165protected void InvokePaint(Control c, PaintEventArgs e) 6170protected void InvokePaintBackground(Control c, PaintEventArgs e) 6181/// Returns <see langword="true"/> if <paramref name="descendant"/> is a descendant of this <see cref="Control"/>. 6183internal bool IsDescendant(Control? descendant) 6185Control? control = descendant; 6327private static bool IsScaledByParent(Control control) 6329Control? parentControl = control.Parent; 6385private object MarshaledInvoke(Control caller, Delegate method, object?[]? args, bool synchronous) 6558protected void InvokeOnClick(Control? toInvoke, EventArgs e) 6688internal virtual void OnChildLayoutResuming(Control child, bool performLayout) 6993Control? parent = ParentInternal; 7169Control child = children[i]; 7554protected void InvokeGotFocus(Control? toInvoke, EventArgs e) 7715protected void InvokeLostFocus(Control? toInvoke, EventArgs e) 8045/// This is called in the <see cref="Control"/> constructor before calculating the initial <see cref="Size"/>. 8187Control? parent = ParentInternal; 8317for (Control? c = ParentInternal; c is not null; c = c.ParentInternal) 8355public void PerformLayout(Control? affectedControl, string? affectedProperty) 8471foreach (Control c in Controls) 8604/// on the <see cref="Control"/> referenced by the <paramref name="msg"/> <see cref="Message.HWnd"/>. It 8619internal static PreProcessControlState PreProcessControlMessageInternal(Control? target, ref Message message) 8766Control child = Controls[i]; 8969Control? topMostParent = null; 9165Control?[]? controlSnapshot = null; 9178controlSnapshot = new Control[children.Count]; 9181Control childControl = children[i]; 9240Control? childControl = controlSnapshot[i]; 9446Control child = children[i]; 9563internal virtual void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9599internal void ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9608Control child = children[i]; 9867public bool SelectNextControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9869Control? nextSelectableControl = GetNextSelectableControl(ctl, forward, tabStopOnly, nested, wrap); 9881private Control? GetNextSelectableControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9889Control? start = ctl; 9940((Control)c).SelectNextControl(this, true, true, true, true); 10432internal static AutoValidate GetAutoValidateForControl(Control control) 10833private void UpdateChildControlIndex(Control control) 10840if (this is TabControl || GetType() == typeof(Control)) 10850Control? previousControl = FromHandle(hWnd); 10909private void UpdateChildZOrder(Control control) 10919Control child = Controls[i]; 11094internal void WmContextMenu(ref Message m, Control sourceControl) 11134Control? control = FromHandle(m.LParamInternal); 12747Control? controlParent = ParentInternal; 12764void AddIfCreated(Control? control) 12823internal 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"/>. 152/// Raises the <see cref="Control.OnMouseEnter"/> event. 157/// Raises the <see cref="Control.OnMouseLeave"/> event. 265/// 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)
183/// method will be called when the <see cref="Control.Click"/> event gets invoked. 600/// or may have flicker. Returning <see cref="Control.ClientRectangle"/> is safe for correct painting but may 631/// or may have flicker. Returning <see cref="Control.ClientRectangle"/> is safe for correct painting but may 835/// Raises the <see cref="Control.OnMouseEnter"/> event. 851/// Raises the <see cref="Control.OnMouseLeave"/> event. 865/// Raises the <see cref="Control.OnMouseMove"/> event. 896/// 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\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)
487/// 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)
2818/// Raises the <see cref="Control.Resize"/> event.
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; 2222public 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)
568Control.MouseButtons == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
363internal 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)
1795bool 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)
661get => ((Control)this).RenderTransparent; 1364Control? parent = ParentInternal;
System\Windows\Forms\Controls\ListView\ListView.cs (2)
3507internal override unsafe ToolInfoWrapper<Control> GetToolInfoWrapper(TOOLTIP_FLAGS flags, string? caption, ToolTip tooltip) 3514ToolInfoWrapper<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)
1966private static void DrawXorBar(Control targetControl, Rectangle rcFrame) 2201internal Control? GetElementFromPoint(Point point) 2399if (ShouldForwardChildMouseMessage((Control?)sender, e, ref newPoint)) 2415if (ShouldForwardChildMouseMessage((Control?)sender, e, ref newPoint)) 4098private 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)
1487return 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)
83private Control? _currentEditor; 870private void CommonEditorSetup(Control control) 876private void CommonEditorUse(Control control, Rectangle targetRectangle) 1406public void DropDownControl(Control control) 1499Control? control = _dropDownHolder.Component; 2043private bool IsMyChild(Control? control) 2050Control? parent = control.ParentInternal; 2079internal static bool IsSiblingControl(Control control1, Control control2) 2081Control? parent1 = control1.ParentInternal; 2082Control? parent2 = control2.ParentInternal; 2610private bool OnEscape(Control sender) 3777internal static void PositionTooltip(Control parent, GridToolTip toolTip, Rectangle itemRect) 3833Control? focusedControl = FromHandle(PInvoke.GetFocus()); 4320Control button = needsDropDownButton ? DropDownButton : DialogButton; 4853Control 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; 556private Rectangle CalcSplitLine(Control splitTarget, int splitSize, int minWeight) 604Control? target = FindTarget(); 625Control? target = FindTarget(); 641Control? parent = ParentInternal; 652Control ctl = children[i]; 713private Control? FindTarget() 715Control? parent = ParentInternal; 726Control target = children[i]; 769private int GetSplitSize(Control splitTarget, int x, int y) 956private 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)
952protected override Control.ControlCollection CreateControlsInstance() 1051public Control GetControl(int index)
System\Windows\Forms\Controls\TabControl\TabPage.cs (4)
483internal override void AssignParent(Control? value) 499Control? c = comp as Control; 728Control? 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)
1842/// Raises the <see cref="Control.KeyDown"/> event. 1954/// Raises the <see cref="Control.KeyPress"/> event. 2023/// 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)
137private Control RTLGrip
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
2431internal virtual Control GetOwnerControl() 3850public new Control? GetChildAtPoint(Point point) => base.GetChildAtPoint(point); 3853public new Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) => base.GetChildAtPoint(pt, skipValue); 3858internal override Control? GetFirstChildControlInTabOrder(bool forward) => null; 4000Control? 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); 1478foreach (Control control in Controls) 1816public void Show(Control control, Point position) 1832public void Show(Control control, Point position, ToolStripDropDownDirection direction) 1841public 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)
515Control? parent = ParentInternal; 521return Control.DefaultBackColor; 869Control? parent = ParentInternal; 875return Control.DefaultForeColor; 2055if (Control.ModifierKeys == Keys.Alt) 3592=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3630internal 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) 585internal static ToolStripPanel? ToolStripPanelFromPoint(Control draggedControl, Point screenLocation) 763Control? activeControl = Control.FromChildHandle(m.HWnd); 764Control? activeControlInChain = activeControl; 853if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 896Control? intendedControl = Control.FromHandle(m.HWnd); 897Control? toplevelControl = null; 966internal static MenuStrip? GetMainMenuStrip(Control control) 985private static MenuStrip? GetFirstMenuStripRecursive(Control.ControlCollection controlsToLookIn)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (13)
83Control? control = null; 88control = Control.FromHandle(_activeHwnd.Handle); 98control = Control.FromHandle(_activeHwnd.Handle); 141ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive); 200Control? control = Control.FromHandle(ActiveHwnd.Handle); 263ActiveHwndInternal = new(sender as Control); 270if (Control.FromHandle(m.HWnd) is ToolStrip toolStrip && !toolStrip.IsDropDown) 417ActiveHwndInternal = new(Control.FromHandle(hwndActive), hwndActive); 540var activeWindowHandle = Control.GetHandleRef(PInvoke.GetActiveWindow()); 550else if (Control.FromChildHandle(activeWindowHandle.Handle) is not ToolStripDropDown 579Control? control = Control.FromChildHandle(m.HWnd);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
123_targetWindowHandle = Control.GetSafeHandle(targetWindow); 199if (Control.UseComponentModelRegisteredTypes) 1086_targetWindowHandle = Control.GetSafeHandle(window); 1104if (!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)
1118private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor) 1124private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation) 1138Control? 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)
1021internal 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)
2900internal override unsafe ToolInfoWrapper<Control> GetToolInfoWrapper(TOOLTIP_FLAGS flags, string? caption, ToolTip tooltip) 2907ToolInfoWrapper<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)
331/// Handles the <see cref="Control.KeyPress"/>
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (8)
590/// Raises the <see cref="Control.KeyDown"/> event. 620/// Raises the <see cref="Control.KeyPress"/> event. 626/// Raises the <see cref="Control.LostFocus"/> event. 637/// Raises the <see cref="Control.Resize"/> event. 677/// Raises the <see cref="Control.OnMouseDown"/> event. 690/// Raises the <see cref="Control.OnMouseUp"/> event. 718/// Raises the <see cref="Control.OnMouseWheel"/> event. 903private 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; 1146for (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; 161HashSet<Control>? components = GetComponents(); 167foreach (Control ctl in components.ToArray()) 187private HashSet<Control>? GetComponents() 217if (comp is Control ctrl && comp != _parent && comp.Site is not null) 230Control[] ctls = [.. _containerCache]; 251private void GetAllChildren(Control ctl) 265foreach (Control c in ctl.Controls) 294if (sender == _associatedContainer && e.Component is Control c) 303internal void AddControl(Control ctl) 324internal void RemoveControl(Control ctl) 354internal 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)
216if (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 = []; 428if (errBindings[j].Control is Control control) 473Dictionary<Control, string> controlError = new(bindingsCount); 478if (errBindings[j].Control is not Control control) 506foreach (KeyValuePair<Control, string> entry in controlError) 683return extendee is Control and not Form; 717private ControlItem EnsureControlItem(Control control) 733internal ErrorWindow EnsureErrorWindow(Control parent) 751public string GetError(Control control) => EnsureControlItem(control).Error; 760public ErrorIconAlignment GetIconAlignment(Control control) => EnsureControlItem(control).IconAlignment; 769public int GetIconPadding(Control control) => EnsureControlItem(control).IconPadding; 787public void SetError(Control control, string? value) 811public void SetIconAlignment(Control control, ErrorIconAlignment value) 819public 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)
546Control toLayout = DesignMode || ParentInternal is null ? this : ParentInternal; 1712internal override Control? ParentInternal 3095internal override void AssignParent(Control? value) 3244protected override Control.ControlCollection CreateControlsInstance() 3253internal override void AfterControlRemoved(Control control, Control oldParent) 3649Control? mdiclient = MdiParentInternal.MdiClient; 3821Control ctl = Controls[index]; 4082Control? activeControl = ActiveControl; 4268foreach (Control c in Controls) 4354Control button = (Control)AcceptButton; 4608foreach (Control c in Controls) 4703if (button is Control) 5090foreach (Control control in Controls) 5337/// Displays the form by setting its <see cref="Control.Visible"/> property to <see langword="true"/>. 5357/// This method makes the form visible by setting the <see cref="Control.Visible"/> property to <see langword="true"/>. 5400if (owner is Control ownerControl) 5431/// Displays the form asynchronously, by setting its <see cref="Control.Visible"/> property to <see langword="true"/>. 5441/// This method makes the form visible by setting the <see cref="Control.Visible"/> property to <see langword="true"/>. 5599if (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) 613private static void EnableRequiredScaling(Control start, bool enable) 616foreach (Control c in start.Controls) 646Control? parent = containerControl.ParentInternal; 666Control? parentControl = Parent; 800internal override void OnChildLayoutResuming(Control child, bool performLayout) 1031internal static void ResumeAllLayout(Control start, bool performLayout) 1049internal static void SuspendAllLayout(Control start) 1070internal override void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 1164Control? group = this; 1256Control? start = ActiveControl; 1273Control? ctl = start; 1325private static ScrollableControl? FindScrollableParent(Control ctl) 1327Control? current = ctl.ParentInternal; 1338Control? last = _activeControl; 1455internal void SetActiveControl(Control? value) 1544Control? pathControl = _focusedControl; 1551Control? nextControlDown = _activeControl; 1554Control? parent = nextControlDown!.ParentInternal; 1563Control? priorFocusedControl = _focusedControl = pathControl; 1593Control? stopControl = null; 1628Control leaveControl = pathControl; 1680private void EnsureUnvalidatedControl(Control? candidate) 1733private void EnterValidation(Control enterControl) 1757Control? commonAncestor = enterControl; 1820Control? controlToValidate = _unvalidatedControl ?? _focusedControl; 1868private bool ValidateThroughAncestor(Control? ancestorControl, bool preventFocusChangeOnError) 1893Control? currentActiveControl = _activeControl; 1894Control? 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)
133protected override Control.ControlCollection CreateControlsInstance() 167/// 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)
2532Control control, 2586Control 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)
343Control current = Controls[i]; 402Control current = Controls[i]; 410Control richCurrent = current; 805Control ctl = Controls[i]; 817public void ScrollControlIntoView(Control? activeControl) 846protected 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) 1783Control[] controls = [.. _owners.Values]; 1792Control? tool = window as Control; 1795ToolInfoWrapper<Control> toolInfo = new(tool); 1830if (window is Control windowAsControl) 1961ToolInfoWrapper<Control> toolInfo = default; 1970private Control? GetCurrentToolWindow() 1973return _owners.TryGetValue(hwnd, out Control? control) ? control : Control.FromHandle(hwnd); 1982if (window is not Control windowAsControl || !_tools.TryGetValue(windowAsControl, out TipInfo? tipInfo)) 2007PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 2043Control? toolControl = window as Control; 2157if (window is Control windowAsControl && !_tools.TryGetValue(windowAsControl, out tipInfo)) 2231if (window is not Control control || !_tools.TryGetValue(control, out TipInfo? tipInfo)) 2337font = Control.DefaultFont; 2340Control? 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 (723)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (8)
338Control ctrlSender = (Control)sender!; 918Control ctrlSender = (Control)sender!; 1007Control ctrlSender = (Control)sender!; 1120private readonly Control _control; 1125public 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)
881List<Control> newControlList = newLine.GetControls(); 882Control[] controls = [.. newControlList];
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (4)
336private void ShowDropDown(Control hostedControl, Color borderColor) 409void IWindowsFormsEditorService.DropDownControl(Control control) 447public 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!; 262Control? 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) 100=> _designerHost?.RootComponent is Control root 116if (_designerHost.RootComponent is Control root && _toolStripContainer.Parent is null) 135if (_designerHost?.RootComponent is not Control root 142Control newParent = _toolStripContainer.ContentPanel; 152Control[] childControls = new Control[root.Controls.Count]; 155foreach (Control control in childControls) 172Control? oldParent = control.Parent; 219private Control GetParent(Control control) 221Control newParent = _toolStripContainer.ContentPanel; 224foreach (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) 798if (comp is not Control)
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (8)
19private Control _containerControl; // our related control 34internal ContainerSelectorBehavior(Control containerControl, IServiceProvider serviceProvider) 43internal ContainerSelectorBehavior(Control containerControl, IServiceProvider serviceProvider, bool setInitialDragPoint) 49private void Init(Control containerControl, IServiceProvider serviceProvider) 64public Control ContainerControl 95if (selSvc is not null && !_containerControl.Equals(selSvc.PrimarySelection as Control)) 215Control requiredParent = _containerControl.Parent; 221if ((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 = []; 618Point mouseLoc = Control.MousePosition; 619bool altKeyPressed = Control.ModifierKeys == Keys.Alt; 638Control target = _data.Target as Control; 694Control dragControl = (Control)_dragObjects[i]; 820if (_dragComponents[_primaryComponentIndex].dragComponent is Control c) 871private void GetParentSnapInfo(Control parentControl, BehaviorService bhvSvc) 884if (_dragComponents[_primaryComponentIndex].dragComponent is Control) 935Control primaryControl = _dragObjects[0] as Control; 936Control primaryParent = primaryControl?.Parent; 945Control dragControl = (Control)_dragObjects[i]; 988if (primaryControl.Equals(_dragComponents[i].dragComponent as Control)) 1116if (_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) 264if (g.RelatedComponent is Control control && (dragComps.Contains(g.RelatedComponent) || !control.AllowDrop))
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
286Control ctl = body.RelatedComponent as Control; 304bool altKeyPressed = Control.ModifierKeys == Keys.Alt; 347Control 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; 120private static Control GetParent(ToolStripContainer container, ToolStrip c) 122Control newParent = container.ContentPanel; 129foreach (Control panel in container.Controls)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
160void IWindowsFormsEditorService.DropDownControl(Control control)
System\Windows\Forms\Design\CommandSet.cs (47)
487if (comp is Control) 793Control? primaryControl = comp as Control; // this can be null (when we are moving a component in the ComponentTray) 1140if (host.RootComponent is Control baseComponent) 1252Control? viewParent = null; 1275if (obj is Control comp) 1335if (obj is Control comp) 1464Control? commonParent = null; 1487if (obj == host.RootComponent || obj is not Control c) 1495Control? parent = c.Parent; 1521if (obj is Control selectedControl) 1616if (obj is Control c) 1618Control? parent = c.Parent; 1649if (obj is Control control) 1671if (obj is Control selectedControl && commonParent is Control controlCommonParent) 1682Control? parent = controlCommonParent; 1783else if (commonParent is Control controlCommonParent) 1788Control? parent = controlCommonParent.Controls[0]; 1904List<Control> controls = []; 2052Control designerControl = designer.GetControlForComponent(curComp); 2073if (curComp is Control c) 2105List<Control> compsWithControlDesigners = []; 2106foreach (Control c in controls) 2141List<Control> listOfTrayControls = []; 2156foreach (Control c in controls) 2253if (baseComponent is Control) 2402if (baseComponent is not null and Control) 2486if (baseComponent is Control) 2539if (baseComponent is Control) 2922if (obj is not Control) 2945Control? marshalControl = BehaviorService?.AdornerWindowControl; 3233private void UpdatePastePositions(List<Control> controls) 3244Control? parentControl = controls[0].Parent; 3247foreach (Control c in controls) 3307foreach (Control child in parentControl.Controls) 3331Control pasteControl = controls[0]; 3344if (baseComponent is Control) 3414foreach (Control c in controls) 3427private static void UpdatePasteTabIndex(Control componentControl, Control? parentControl) 3440foreach (Control c in parentControl.Controls) 3513if (p is not Control c1 || q is not Control c2) 3522private class TabIndexComparer : IComparer<Control> 3528public 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. 250Control c = TrayControl.FromComponent(component); 264Control c = TrayControl.FromComponent(comp); 369Control prevCtl = null; 371foreach (Control ctl in _controls) 540Control IOleDragClient.GetDesignerControl() => this; 542Control IOleDragClient.GetControlForComponent(object component) 760if (!compType.IsSubclassOf(typeof(Control))) 985Control c = TrayControl.FromComponent(receiver); 1022foreach (Control control in Controls) 1380Control child = Controls[i]; 1426foreach (Control ctl in _controls) 1454Control c = ((IOleDragClient)this).GetControlForComponent(o); 1703if (rd.GetView(techs[0]) is Control view) 1725internal void UpdatePastePositions(List<Control> components) 1736Control prevCtl = null; 1767Control prevCtl = null; 1792Control prevCtl = null; 1808internal void RearrangeInAutoSlots(Control c, Point pos) 1818private bool PositionInNextAutoSlot(TrayControl c, Control prevCtl, bool dirtyDesigner) 2769internal class AutoArrangeComparer : IComparer<Control> 2771int IComparer<Control>.Compare(Control o1, Control o2) 2844protected override Control GetControl() 2852protected override Control GetControl(IComponent component) 2949if (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) 378Control ctrl = component as Control; 381Control c = ctrl.Parent; 462private List<SnapLine> GenerateSnapLines(SelectionRules rules, Control primaryControl, int directionOffsetX, int directionOffsetY) 613Control primaryControl = comp as Control; 762Control control = component as Control; 976List<Control> layoutParentList = []; 977List<Control> parentList = []; 1015Control control = selectedComponents[i] as Control; 1028control = nestedContainer.Owner as Control; 1036Control parent = control.Parent; 1090Control otherControl = selectedComponents[len - i - 1] as Control; 1096Control control = selectedComponents[i] as Control; 1107foreach (Control parent in parentList) 1117foreach (Control parent in layoutParentList) 1255&& host.RootComponent is Control baseComponent 1272&& host.RootComponent is Control baseComponent 1319if (obj is Control && 1370if (selSvc is null || host is null || !(host.RootComponent is Control)) 1377Control component = selSvc.PrimarySelection as Control; 1378Control current; 1385current = (Control)host.RootComponent; 1407Control nextControl = next as Control; 1430Control ctl; 1431Control baseCtl; 1437if (selSvc is null || host is null || !(host.RootComponent is Control)) 1442baseCtl = (Control)host.RootComponent; 1452ctl = currentSelection as Control; 1505private static Control GetNextControlInTab(Control basectl, Control ctl, bool forward) 1509Control.ControlCollection ctlControls = ctl.Controls; 1513Control found = null; 1532Control found = null; 1533Control p = ctl.Parent; 1541Control.ControlCollection parentControls = p.Controls; 1601Control found = null; 1602Control p = ctl.Parent; 1609Control.ControlCollection parentControls = p.Controls; 1677Control.ControlCollection ctlControls = ctl.Controls; 1681Control found = null; 1728Control cX = x as Control; 1729Control cY = y as Control; 1734Control parent = cX.Parent;
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
61_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 (36)
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; 686Control? parent = Control.Parent; 860protected void HookChildControls(Control firstChild) 862foreach (Control child in firstChild.Controls) 896Control? child = sender as Control; 1042if (Component is Control ctl) 1116foreach (Control control in Control.Controls) 1156if (parent is Control parentControl) 1166foreach (Control c in parentControl.Controls) 1232Control control = Control; 1253Control control = Control; 1267Control control = Control; 1280Control control = Control; 1307_ctrlSelect = (Control.ModifierKeys & Keys.Control) != 0; 1332bool shiftSelect = (Control.ModifierKeys & Keys.Shift) != 0; 1413Control? requiredParent = null; 1416if (comp is Control control) 1453Control ctl = Control; 1454Control? parent = ctl; 1482Control ctl = Control; 1483Control? parent = ctl; 1511Control ctl = Control; 1512Control? parent = ctl; 1671protected void UnhookChildControls(Control firstChild) 1675foreach (Control child in firstChild.Controls) 2177if (rd.GetView(techs[0]) is Control view) 2399Control? child = Control.FromHandle(hwndChild); 2467internal void SetUnhandledException(Control? owner, Exception exception) 2495foreach (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)
703internal static void ShowErrorDialog(IUIService? uiService, Exception ex, Control? dataGridView) 722internal 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; 98public void Initialize(Control view) 119if (selSvc?.PrimarySelection is Control { IsDisposed: false } ctrl) 225int IOverlayService.PushOverlay(Control control) => _designerRegion.PushOverlay(control); 231void IOverlayService.RemoveOverlay(Control control) 239void IOverlayService.InsertOverlay(Control control, int index) 263void ISplitWindowService.AddSplitWindow(Control window) 301void ISplitWindowService.RemoveSplitWindow(Control window) 319foreach (Control c in Controls) 342private readonly List<Control> _overlayList; 375foreach (Control c in _overlayList) 394foreach (Control c in _overlayList) 404private void ParentOverlay(Control control) 418public int PushOverlay(Control control) 436public void RemoveOverlay(Control control) 447public void InsertOverlay(Control control, int index) 450Control c = _overlayList[index]; 465Control overlayControl = _overlayList[i]; 482Control overlayControl = _overlayList[i]; 503foreach (Control c in _overlayList) 514foreach (Control c in _overlayList) 547foreach (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; 242Control IOleDragClient.GetControlForComponent(object component) 244Control c = GetControl(component); 512Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 513Rectangle translatedBounds = new(loc, ((Control)Component).Size); 600if (sel is null || !(sel is Control)) 608if (obj is Control) 622Debug.Assert(sel is Control, "Our logic is flawed - sel should be a Control"); 623Control c = (Control)sel; 828foreach (Control c in _suspendedComponents) 849if (comp is Control control) 859if (host.RootComponent is Control root) 861Control rootParent = root.Parent; 939bool designableAsControl = ce.Component is Control 1090Control control = Control; 1122Control ctrl = e.Component as Control; 1158if (selObj is Control c) 1168if (svc.PrimarySelection is Control primary) 1193if (obj is Control) 1252properties["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)
188private 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)
95if (defaultValues["Parent"] is Control parentControl && host.GetDesigner(parentControl) is ParentControlDesigner parentControlDesigner) 102if (component is Control { Parent: null } childControl && childControl != parentControl) 111if (component is Control { Parent: null } childControl and not Form { TopLevel: true }) // Don't add top-level forms 124List<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; 1886List<Control> selection = GetComponentsInRect(offset, true, false /*component does not need to be fully contained*/); 2027Control control = Control; 2132private void ReParentControls(Control newParent, List<Control> controls, string transactionName, IDesignerHost host) 2151foreach (Control control in controls) 2153Control oldParent = control.Parent; 2274Control control = Control; 2283Control control = Control; 2392Control c = GetControl(component); 2397Control parent = GetParentForComponent(component); 2409Control cParent = c.Parent; 2531Control IOleDragClient.GetDesignerControl() 2541Control 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; 141Control 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)
112public override bool CanParent(Control control) => (control is TabPage && !Control.Contains(control)); 189if (!(comp is Control)) 194Control c = (Control)comp; 316Control focusWnd = eventSvc.FocusWindow; 511if (!(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; 727Control newControl = GetControl(component); 951private Control ExtractControlFromDragEvent(DragEventArgs de) 956return _dragComponents[0] as Control; 1048private Point GetControlPosition(Control control) 1264Point dropPoint = GetCellPosition(Control.MousePosition); 1277Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1284(_localDragControl is not null && existingControl is not null && Control.ModifierKeys == Keys.Control)) 1314Control dragControl = ExtractControlFromDragEvent(de); 1331_droppedCellPosition = GetCellPosition(Control.MousePosition); 1361foreach (Control dragControl in _dragComponents) 1431Control changingControl = e.Component as Control; 1453Control c = e.Component as Control; 1479Control c = comp as Control; 1539_droppedCellPosition = GetCellPosition(Control.MousePosition); 1716foreach (Control child in Table.Controls) 1786internal void FixUpControlsOnDelete(bool isRow, int index, List<Control> deleteList) 1791foreach (Control child in Table.Controls) 1885List<Control> deleteList = []; 1899foreach (Control control in deleteList) 2165public override void Add(Control c) => _realCollection.Add(c); 2167public override void AddRange(Control[] controls) => _realCollection.AddRange(controls); 2199public override void Add(Control control, int column, int row) => _realCollection.Add(control, column, row); 2201public override int GetChildIndex(Control child, bool throwException) => _realCollection.GetChildIndex(child, throwException); 2203public 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; 192private void DrawTabs(List<Control> tabs, Graphics graphics, bool fRegion) 213if (_ctlHover.Parent is Control hoverParent) 230foreach (Control control in tabs) 237Control? parent = control; 238Control baseControl = (Control)_host.RootComponent; 296Control rootControl = (Control)_host.RootComponent; 306private Control? GetControlAtPoint(List<Control> tabs, int x, int y) 309Control? ctlFound = null; 310Control? parent; 312foreach (Control control in tabs) 339private Rectangle GetConvertedBounds(Control? control) 341if (control is null || control.Parent is not Control parent) 357private int GetMaxControlCount(Control ctl) 377private Control? GetSitedParent(Control child) 379Control? parent = child.Parent; 406private void GetTabbing(Control control, IList tabs) 413Control ctlTab; 440private bool GetTabbable(Control control) 442for (Control? c = control; c is not null; c = c.Parent) 596Control? ctl = GetControlAtPoint(_tabControls, x, y); 612Control? ctl = null; 658GetTabbing((Control)_host.RootComponent, _tabControls); 727Control? control = _ctlHover; 728Control form = (Control)_host.RootComponent; 742private void SetNewHover(Control? ctl) 772private void SetNextTabIndex(Control ctl) 780Control? 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 103public Point ControlToAdornerWindow(Control c) 166private Control _designerFrame; // the designer's frame 168internal 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)
1321Control parent = ToolStrip.Parent; 1368Point loc = BehaviorService.ControlToAdornerWindow((Control)Component); 1369Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1473Control parent = defaultValues is not null ? defaultValues["Parent"] as Control : null; 1535foreach (Control c in parent.Controls) 1556foreach (Control c in parent.Controls) 2285de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (4)
270if (_host.RootComponent is Control form) 301if (_host.RootComponent is not Control) 389if (_host.RootComponent is Control form) 648Control 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; 450else if (shiftPressed || (Control.ModifierKeys & Keys.Control) > 0) 886e.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; 433if (designerHost.RootComponent is Control parent) 516Point loc = b.ControlToAdornerWindow((Control)ImmediateParent); 578Rectangle parentBounds = GetService<BehaviorService>().ControlRectInAdornerWindow((Control)ImmediateParent); 922Point location = behaviorService.ControlToAdornerWindow((Control)ImmediateParent);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (26)
319private static Control GetNextControlInTab(Control basectl, Control ctl, bool forward) 327Control found = null; 328Control p = ctl.Parent; 333Control.ControlCollection parentControls = p.Controls; 383Control found = null; 384Control p = ctl.Parent; 388Control.ControlCollection parentControls = p.Controls; 686bool shiftPressed = (Control.ModifierKeys & Keys.Shift) > 0; 731bool shiftPressed = (Control.ModifierKeys & Keys.Shift) > 0; 1189|| host.RootComponent is not Control) 1202if (currentSelection is Control) 1304|| host.RootComponent is not Control) 1329if (currentSelection is Control) 1668Control current = null; 1673if (selSvc is null || host is null || !(host.RootComponent is Control)) 1679if (selSvc.PrimarySelection is not Control component) 1681component = SelectedDesignerControl as Control; 1695current = (Control)host.RootComponent; 1715if (!(next is Control nextControl) || nextControl.Site is null || nextControl.Site.Container != container) 1758Control ctl; 1759Control baseCtl; 1764if (selSvc is null || host is null || !(host.RootComponent is Control)) 1770baseCtl = (Control)host.RootComponent; 1822ctl = currentSelection as Control;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
1128Control rootControl = ddi.DropDown; 2651e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2666e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
146public override bool CanParent(Control control) 303protected override Control? GetParentForComponent(IComponent component)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
912Control baseComponent = null; 915baseComponent = (Control)_designerHost.RootComponent; 995Control baseComponent = (Control)_designerHost.RootComponent;
System.Windows.Forms.Design.Tests (94)
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\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\ContentAlignmentEditorTests.cs (4)
29var contentUI = (Control)Activator.CreateInstance(type); 30var item = (Control)contentUI.GetType()
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\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\EventHandlerServiceTests.cs (1)
16using Control focusWnd = 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\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\TabControlDesignerTests.cs (2)
63Control? control = Activator.CreateInstance(controlType) as Control;
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
66using Control control = new(); 82var value = field?.GetValue(_designer) as Control[];
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.Interop.Tests (2)
AccessibleObjectTests.cs (2)
490using Control control = new(); 493ParentResult = new Control.ControlAccessibleObject(control)
System.Windows.Forms.Tests (3411)
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)
992Control 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)
26Assert.Equal(Control.DefaultBackColor, control.BackColor); 62Assert.Equal(Control.DefaultFont, control.Font); 64Assert.Equal(Control.DefaultForeColor, control.ForeColor); 115Assert.Equal(Control.DefaultBackColor, control.BackColor); 151Assert.Equal(Control.DefaultFont, control.Font); 153Assert.Equal(Control.DefaultForeColor, control.ForeColor); 211Assert.Equal(Control.DefaultBackColor, control.BackColor); 247Assert.Equal(Control.DefaultFont, control.Font); 249Assert.Equal(Control.DefaultForeColor, control.ForeColor); 297public void Control_Ctor_Control_String(Control parent, string text, string expectedText) 307Assert.Equal(Control.DefaultBackColor, control.BackColor); 343Assert.Equal(Control.DefaultFont, control.Font); 345Assert.Equal(Control.DefaultForeColor, control.ForeColor); 393public void Control_Ctor_Control_String_Int_Int_Int_Int(Control parent, string text, int left, int top, int width, int height, string expectedText) 403Assert.Equal(Control.DefaultBackColor, control.BackColor); 439Assert.Equal(Control.DefaultFont, control.Font); 441Assert.Equal(Control.DefaultForeColor, control.ForeColor); 483Assert.Equal(SystemColors.Control, Control.DefaultBackColor); 489Assert.Equal(SystemColors.ControlText, Control.DefaultForeColor); 495Font font = Control.DefaultFont; 496Assert.Equal(SystemFonts.MessageBoxFont, Control.DefaultFont); 497Assert.Same(font, Control.DefaultFont); 573using Control parent = new(); 598using Control parent = new(); 790Control nextControl1 = control.GetNextControl(button1, forward: true); 791Control nextControl2 = control.GetNextControl(button2, forward: true); 792Control nextControl3 = control.GetNextControl(button3, forward: true); 809Control previousControl1 = control.GetNextControl(button1, forward: false); 810Control previousControl2 = control.GetNextControl(button2, forward: false); 811Control previousControl3 = control.GetNextControl(button3, forward: false); 828Control nextControl1 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 829Control nextControl2 = control.GetNextSelectableControl(button2, forward: true, tabStopOnly: true, nested: true, wrap: true); 830Control nextControl3 = control.GetNextSelectableControl(button3, forward: true, tabStopOnly: true, nested: true, wrap: true); 831Control nextControl4 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 849Control previousControl1 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 850Control previousControl2 = control.GetNextSelectableControl(button3, forward: false, tabStopOnly: true, nested: true, wrap: true); 851Control previousControl3 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 852Control previousControl4 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 904Control previousControl1 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 905Control previousControl2 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 906Control previousControl3 = control.GetNextSelectableControl(checkBox2, forward: false, tabStopOnly: true, nested: true, wrap: true); 907Control previousControl4 = control.GetNextSelectableControl(checkBox1, forward: false, tabStopOnly: true, nested: true, wrap: true); 908Control previousControl5 = control.GetNextSelectableControl(radioButton1, forward: false, tabStopOnly: true, nested: true, wrap: true); 909Control previousControl6 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 1137public SubControl(Control parent, string text) : base(parent, text) 1141public SubControl(Control parent, string text, int left, int top, int width, int height) : base(parent, text, left, top, width, height) 1145public Control GetNextSelectableControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 1224public new void InvokeGotFocus(Control toInvoke, EventArgs e) => base.InvokeGotFocus(toInvoke, e); 1226public new void InvokeLostFocus(Control toInvoke, EventArgs e) => base.InvokeLostFocus(toInvoke, e); 1228public new void InvokePaint(Control c, PaintEventArgs e) => base.InvokePaint(c, e); 1230public 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()); 505using Control parent = new(); 566using Control control = new() 613Control.ControlCollection controls = Assert.IsType<Control.ControlCollection>(control.CreateControlsInstance()); 692using Control parent = new(); 780using Control parent = new(); 781using Control control = new() 785using Control child1 = new() 789using Control child2 = new() 793using Control grandchild1 = new() 797using Control otherParent = new(); 798using Control otherControl = new() 802using Control emptyControl = new(); 845using Control parent = new(); 975using Control control = new(); 1020using Control parent = new(); 1023using Control control = new() 1073using Control control = new(); 1074using Control child1 = new(); 1075using Control child2 = new(); 1151using Control control = new(); 1198using Control control = new(); 1551Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1572Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1818using Control control = new(); 1826using Control control = new(); 1935using Control control = new(); 1944using Control control = new(); 1954Assert.Same(control, Control.FromChildHandle(handle)); 1958Assert.Null(Control.FromChildHandle(handle)); 1968Assert.Null(Control.FromChildHandle(handle)); 1972Assert.Null(Control.FromChildHandle(handle)); 1989Assert.Same(parent, Control.FromChildHandle(window.Handle)); 1993Assert.Null(Control.FromChildHandle(window.Handle)); 1999Assert.Null(Control.FromChildHandle(IntPtr.Zero)); 2000Assert.Null(Control.FromChildHandle(1)); 2009Assert.Same(control, Control.FromHandle(handle)); 2013Assert.Null(Control.FromHandle(handle)); 2023Assert.Null(Control.FromHandle(handle)); 2027Assert.Null(Control.FromHandle(handle)); 2044Assert.Null(Control.FromHandle(window.Handle)); 2048Assert.Null(Control.FromHandle(window.Handle)); 2054Assert.Null(Control.FromHandle(IntPtr.Zero)); 2055Assert.Null(Control.FromHandle(1)); 2062using Control control = new(); 2082using Control control = new(); 2096using Control control = new(); 2103using Control grandparent = new(); 2104using Control parent = new() 2108using Control control = new() 2125using Control parent = new() 2129using Control control = new() 2146using Control control = new() 2164using Control parent = new() 2168using Control control = new() 2186using Control parent = new() 2190using Control control = new() 2207using Control cont = new(); 2208using Control first = new() 2212using Control second = new() 2216using Control third = new() 2220var tabOrder = new Control[] 2235using Control cont = new(); 2236using Control first = new() 2240using Control second = new() 2244using Control third = new() 2248var tabOrder = new Control[] 2263using Control cont = new(); 2264using Control first = new() 2268using Control second = new() 2272using Control third = new() 2276var tabOrder = new Control[] 2291using Control cont = new(); 2292using Control first = new() 2296using Control second = new() 2300using Control third = new() 2304var tabOrder = new Control[] 2329using Control control = new(); 2342using Control control = new() 2381using Control control = new() 2866using Control control = new() 2881using Control control = new() 3756using Control control = new(); 3781using Control control = new(); 3807using Control control = new(); 3836using Control control = new(); 3870using Control control = new(); 3906using Control control = new(); 3939using Control control = new(); 3972using Control control = new(); 3998using Control control = new(); 4025using Control control = new(); 4060using Control control = new(); 4090using Control control = new(); 4132using Control control = new(); 4141using Control control = new(); 4153using Control otherControl = new(); 4277using Control otherControlParent = new(); 4329using Control otherControl = new(); 4491Assert.Equal(expected, Control.IsMnemonic(charCode, text)); 4732using Control control = new(); 4786using Control parent = new(); 4787using Control control = new() 4821using Control parent = new(); 4938using Control control = new(); 4983public void Control_PerformLayout_InvokeControlString_Success(Control affectedControl, string affectedProperty) 4985using Control control = new(); 5007public void Control_PerformLayout_InvokeControlStringCustomLayoutEngine_Success(Control affectedControl, string affectedProperty) 5039public void Control_PerformLayout_InvokeControlStringWithParent_Success(Control affectedControl, string affectedProperty) 5041using Control parent = new(); 5042using Control control = new() 5084public void Control_PerformLayout_InvokeControlStringWithParentCustomLayoutEngine_Success(bool parentNeedsLayout, Control affectedControl, string affectedProperty, int expectedParentLayoutCallCount) 5086using Control parent = new(); 5147public void Control_PerformLayout_InvokeControlStringSuspended_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5173public void Control_PerformLayout_InvokeControlStringSuspendedMultipleTimes_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5212using Control control = new(); 5332using Control parent = new(); 5509using Control parent = new(); 5562using Control parent = new(); 5610using Control parent = new(); 5710using Control parent = new(); 6001using Control parent = new(); 6209using Control parent = new(); 6295using Control control = new(); 6307using Control control = new(); 6348using Control control = new(); 6352Assert.Equal(Control.DefaultBackColor, control.BackColor); 6357Assert.Equal(Control.DefaultBackColor, control.BackColor); 6361Assert.Equal(Control.DefaultBackColor, control.BackColor); 6406using Control control = new(); 6411Assert.Equal(Control.DefaultFont, control.Font); 6416Assert.Equal(Control.DefaultFont, control.Font); 6420Assert.Equal(Control.DefaultFont, control.Font); 6426using Control control = new(); 6430Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6435Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6439Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6550public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6552using Control control = new(); 6578public void Control_ResumeLayout_InvokeSuspendedWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6580using Control control = new(); 6610using Control control = new(); 6628public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6630using Control control = new(); 6658public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6660using Control control = new(); 6691using Control control = new(); 6714using Control child = new(); 6743using Control control = new(); 6762using Control child = new(); 6787public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequestWithHandle_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6789using Control control = new(); 6990using Control parent = new(); 6991using Control child1 = new(); 6992using Control child2 = new(); 6995Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7010Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7019Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7032using Control parent = new(); 7033using Control child1 = new(); 7034using Control child2 = new(); 7037Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7059Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7071Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7087using Control parent = new(); 7088using Control child1 = new(); 7089using Control child2 = new(); 7092Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7120Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7135Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7154using Control parent = new(); 7156using Control child2 = new(); 7159Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7182Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7194Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7275using Control parent = new(); 7648using Control parent = new(); 7905using Control parent = new(); 8505using Control parent = new(); 8762using Control parent = new(); 9302using Control parent = new(); 9600using Control parent = new(); 10086using Control parent = new(); 10189using Control control = new() 10207using Control control = new() 10238using Control control = new(); 10255using Control control = new(); 10285using Control control = new(); 10292using Control control = new(); 10304using Control control = new(); 11205using Control parent = new(); 11443using Control parent = new(); 11691using Control parent = new(); 11941using Control parent = new(); 12150using Control parent = new(); 12169using Control parent = new(); 12201using Control parent = new(); 12234using Control parent = new(); 12278using Control parent = new(); 12279using Control child1 = new(); 12325using Control parent = new(); 12514using Control control = new(); 12588using Control control = new(); 14152public Control ActiveControl { get; set; } 14154public Func<Control, bool> ActivateControlAction { get; set; } 14156public bool ActivateControl(Control active) => ActivateControlAction(active); 14209using Control grandparent = new(); 14297using 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); 109using Control control = new() 126using Control control = new() 143using Control control = new() 160using Control control = new() 177using Control control = new(); 185using Control control = new() 207using Control control = new(); 244using Control control = new(); 284using Control control = new(); 339using Control control = new(); 361using Control control = new() 412using Control parent = new(); 413using Control control = new() 457using Control grandparent = new(); 458using Control parent = new() 462using Control control = new() 558using Control parent = new(); 559using Control control = new() 677using Control grandparent = new(); 678using Control parent = new() 682using Control control = new() 769using Control control = new() 823using Control parent = new(); 824using Control control = new() 871using Control control = new(); 906using Control control = new() 921using Control control = new(); 948using Control parent = new(); 949using Control control = new() 1003using Control control = new() 1066using Control control = new(); 1109using Control parent = new(); 1110using Control control = new() 1192using Control control = new() 1231using Control control = new() 1248using Control control = new() 1267yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1291using Control child1 = new(); 1292using Control child2 = new(); 1293using Control control = new(); 1315using Control child1 = new() 1319using Control child2 = new() 1323using Control control = new(); 1344yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1351using Control control = new(); 1379using Control control = new(); 1401Assert.Equal(Control.DefaultBackColor, control.BackColor); 1414using Control control = new(); 1439using Control child1 = new(); 1440using Control child2 = new(); 1441using Control control = new(); 1496Assert.Equal(Control.DefaultBackColor, control.BackColor); 1497Assert.Equal(Control.DefaultBackColor, child1.BackColor); 1498Assert.Equal(Control.DefaultBackColor, child2.BackColor); 1519using Control child1 = new() 1523using Control child2 = new() 1527using Control control = new(); 1576Assert.Equal(Control.DefaultBackColor, control.BackColor); 1599using Control control = new(); 1606PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1607using Control control = new(); 1615Assert.Equal(Control.DefaultBackColor, control.BackColor); 1622PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1623using Control control = new(); 1631Assert.Equal(Control.DefaultBackColor, control.BackColor); 1639using Control control = new() 1662using Control control = new(); 1691using Control child1 = new(); 1692using Control child2 = new(); 1693using Control control = new(); 1715using Control child1 = new() 1719using Control child2 = new() 1723using Control control = new(); 1742using Control control = new(); 1784using Control control = new(); 1810using Control child1 = new(); 1811using Control child2 = new(); 1812using Control control = new(); 1897using Control child1 = new() 1901using Control child2 = new() 1905using Control control = new(); 2075using Control control = new(); 2110using Control control = new(); 2136using Control control = new(); 2144using Control parent = new() 2148using Control control = new() 2163using Control control = new() 2180using Control control = new() 2197using Control control = new() 2215using Control control = new(); 2257using Control child1 = new(); 2258using Control child2 = new(); 2259using Control control = new(); 2344using Control child1 = new() 2348using Control child2 = new() 2352using Control control = new(); 2695using Control parent = new(); 2906using Control parent = new(); 3049using Control control = new() 3065using Control control = new() 3080using Control parent = new() 3085using Control control = new() 3099using Control control = new() 3115using Control parent = new() 3120using Control control = new() 3132using Control control = new() 3154using Control control = new(); 3191using Control control = new() 3213using Control control = new(); 3249using Control control = new() 3294public void Control_ClientSize_Get_ReturnsExpected(Control control, Size expected) 3328using Control control = new(); 3486using Control control = new(); 3540using Control control = new() 3558using Control control = new() 3576using Control control = new() 3591using Control control = new() 3607using Control control = new(); 3649yield return new object[] { new Control.ControlCollection(new Control()) }; 3654public void Control_Controls_GetCustomCreateControlsInstance_ReturnsExpected(Control.ControlCollection result) 3675PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3676using Control control = new(); 3682using Control child = new(); 3695PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3696using Control control = new(); 3702using Control child = new(); 3716using Control control = new() 3732using Control parent = new() 3736using Control control = new() 3756using Control control = new() 3784using Control parent = new() 3810using Control control = new() 3827using Control control = new(); 3856using Control child1 = new(); 3857using Control child2 = new(); 3858using Control control = new(); 3880using Control child1 = new() 3884using Control child2 = new() 3888using Control control = new(); 3907using Control control = new(); 3949using Control child1 = new(); 3950using Control child2 = new(); 3951using Control control = new(); 4036using Control child1 = new() 4040using Control child2 = new() 4044using Control control = new(); 4128using Control control = new(); 4150using Control control = new() 4185using Control parent = new(); 4186using Control control = new() 4275using Control parent = new(); 4276using Control control = new() 4332using Control control = new() 4351using Control control = new(); 4385using Control control = new() 4424using Control control = new(); 4506using Control control = new() 4569using Control control = new() 4607using Control child1 = new(); 4608using Control child2 = new(); 4609using Control control = new() 4684using Control child1 = new() 4688using Control child2 = new() 4692using Control control = new() 4767PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4768using Control control = new(); 4783PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4784using Control control = new(); 4801using Control parent = new() 4805using Control control = new() 4825using Control control = new() 4829Assert.Equal(Control.DefaultFont, control.Font); 4844Assert.Equal(value ?? Control.DefaultFont, control.Font); 4850Assert.Equal(value ?? Control.DefaultFont, control.Font); 4871Assert.Equal(value ?? Control.DefaultFont, control.Font); 4877Assert.Equal(value ?? Control.DefaultFont, control.Font); 4885yield return new object[] { null, Control.DefaultFont.Height }; 4900Assert.Equal(value ?? Control.DefaultFont, control.Font); 4906Assert.Equal(value ?? Control.DefaultFont, control.Font); 4921Assert.Equal(value ?? Control.DefaultFont, control.Font); 4927Assert.Equal(value ?? Control.DefaultFont, control.Font); 4958Assert.Equal(value ?? Control.DefaultFont, control.Font); 4967Assert.Equal(value ?? Control.DefaultFont, control.Font); 5004Assert.Equal(value ?? Control.DefaultFont, control.Font); 5013Assert.Equal(value ?? Control.DefaultFont, control.Font); 5024using Control control = new(); 5053Assert.Equal(Control.DefaultFont, control.Font); 5066using Control child1 = new(); 5067using Control child2 = new(); 5068using Control control = new(); 5128Assert.Equal(Control.DefaultFont, control.Font); 5129Assert.Equal(Control.DefaultFont, child1.Font); 5130Assert.Equal(Control.DefaultFont, child2.Font); 5153using Control child1 = new() 5157using Control child2 = new() 5161using Control control = new(); 5221Assert.Equal(Control.DefaultFont, control.Font); 5244PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5245using Control control = new(); 5254Assert.Equal(Control.DefaultFont, control.Font); 5262Assert.Equal(Control.DefaultFont, control.Font); 5269PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5270using Control control = new(); 5279Assert.Equal(Control.DefaultFont, control.Font); 5287Assert.Equal(Control.DefaultFont, control.Font); 5295using Control control = new() 5312using Control control = new() 5331using Control child1 = new(); 5332using Control child2 = new(); 5333using Control control = new(); 5355using Control child1 = new() 5359using Control child2 = new() 5363using Control control = new(); 5385yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 5392using Control control = new(); 5420using Control control = new(); 5442Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5455using Control control = new(); 5480using Control child1 = new(); 5481using Control child2 = new(); 5482using Control control = new(); 5537Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5538Assert.Equal(Control.DefaultForeColor, child1.ForeColor); 5539Assert.Equal(Control.DefaultForeColor, child2.ForeColor); 5560using Control child1 = new() 5564using Control child2 = new() 5568using Control control = new(); 5617Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5640PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5641using Control control = new(); 5649Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5656PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5657using Control control = new(); 5665Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5672using Control cont = new(); 5972using Control parent = new(); 6207using Control parent = new(); 6365using Control control = new() 6382using Control control = new(); 6410using Control control = new(); 6446using Control control = new(); 6560using Control control = new(); 6573using Control control = new(); 6587using Control control = new() 6608using Control control = new(); 6639using Control control = new(); 6742using Control parent = new(); 6936using Control parent = new(); 7089using Control control = new(); 7147using Control control = new(); 7221using Control parent = new(); 7419using Control parent = new(); 7574PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7575using Control control = new(); 7598PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7599using Control control = new(); 7622using Control control = new(); 7682public void Control_Margin_GetWithCustomDefaultMargin_ReturnsExpected(Control control, Padding expected) 7709using Control control = new(); 7729using Control parent = new(); 7730using Control control = new() 7759using Control control = new(); 7798using Control parent = new(); 7799using Control control = new() 7852PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7853using Control control = new(); 7868PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7869using Control control = new(); 7891public void Control_MaximumSize_GetWithCustomDefaultMaximumSize_ReturnsExpected(Control control, Size expected) 7931using Control control = new(); 7953using Control control = new() 7999using Control control = new() 8030using Control control = new() 8055using Control control = new() 8102using Control parent = new(); 8103using Control control = new() 8157using Control parent = new(); 8158using Control control = new() 8200using Control control = new(); 8235using Control control = new() 8273using Control control = new() 8311using Control parent = new(); 8312using Control control = new() 8378using Control parent = new(); 8379using Control control = new() 8445PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8446using Control control = new(); 8469PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8470using Control control = new(); 8500public void Control_MinimumSize_GetWithCustomDefaultMinimumSize_ReturnsExpected(Control control, Size expected) 8540using Control control = new(); 8584using Control control = new() 8637using Control control = new() 8668using Control control = new() 8699using Control control = new() 8746using Control parent = new(); 8747using Control control = new() 8807using Control parent = new(); 8808using Control control = new() 8872using Control control = new(); 8929using Control control = new() 8995using Control control = new() 9054using Control parent = new(); 9055using Control control = new() 9142using Control parent = new(); 9143using Control control = new() 9215PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9216using Control control = new(); 9239PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9240using Control control = new(); 9285Assert.Equal(expected, Control.MouseButtons); 9302using Control control = new() 9318using Control control = new() 9335using Control control = new() 9370using Control control = new() 9393public void Control_Padding_GetWithCustomDefaultPadding_ReturnsExpected(Control control, Padding expected) 9415using Control control = new(); 9441using Control parent = new(); 9442using Control control = new() 9539using Control parent = new(); 9610using Control control = new(); 9647PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9648using Control control = new(); 9663PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9664using Control control = new(); 9685public void Control_Parent_Set_GetReturnsExpected(Control value) 9687using Control control = new() 9702public void Control_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 9704using Control oldParent = new(); 9705using Control control = new() 9725using Control parent = new(); 9726using Control control = new() 9743public void Control_Parent_SetWithHandle_GetReturnsExpected(Control value) 9745using Control control = new(); 9773using Control parent = new(); 9774using Control control = new(); 9809using Control control = new(); 9817using Control child = new(); 9818using Control control = new(); 9828using Control parent = new(); 9839using Control control = new(); 9840using Control child = new() 9858using Control child = new() 9880using Control control = new() 9898using Control control = new() 9920using Control control = new(); 9950using Control control = new() 9984using Control control = new(); 10059using Control control = new() 10076using Control control = new() 10095using Control child1 = new(); 10096using Control child2 = new(); 10097using Control control = new(); 10119using Control child1 = new() 10123using Control child2 = new() 10127using Control control = new(); 10151using Control control = new(); 10182using Control control = new() 10213using Control control = new(); 10248using Control control = new(); 10273using Control child1 = new(); 10274using Control child2 = new() 10278using Control control = new(); 10356using Control child1 = new() 10360using Control child2 = new() 10364using Control control = new(); 10437using Control control = new(); 10444PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10445using Control control = new(); 10472PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10473using Control control = new(); 10651using Control control = new() 10668using Control control = new(); 10704using Control control = new() 10781using Control control = new(); 10877Assert.Equal(Control.DefaultBackColor, control.BackColor); 10879Assert.Equal(Control.DefaultForeColor, control.ForeColor); 10880Assert.Equal(Control.DefaultFont, control.Font); 10957using Control control = new() 11371using Control parent = new(); 11616using Control parent = new(); 11755PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11756using Control control = new(); 11779PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11780using Control control = new(); 11806using Control control = new() 11822using Control control = new() 11860using Control control = new(); 11868using Control control = new() 11890using Control control = new(); 11926using Control control = new() 11965using Control control = new() 11982using Control control = new(); 12010using Control control = new(); 12045PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12046using Control control = new(); 12072PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12073using Control control = new(); 12176using Control parent = new(); 12368using Control parent = new(); 12521using Control control = new(); 12569using Control grandparent = new(); 12570using Control parent = new() 12574using Control control = new() 12588using Control parent = new() 12592using Control control = new() 12605using Control control = new() 12627using Control control = new(); 12628using Control child1 = new(); 12629using Control child2 = new(); 12658using Control control = new(); 12698using Control parent = new() 12702using Control item = new() 12717using Control control = new() 12739using Control parent = new(); 12740using Control control = new() 12813using Control parent = new(); 12814using Control control = new() 12871using Control control = new() 12909using Control child1 = new(); 12910using Control child2 = new(); 12911using Control control = new() 12986using Control child1 = new() 12990using Control child2 = new() 12994using Control control = new() 13069PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13070using Control control = new(); 13085PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13086using Control control = new(); 13391using Control parent = new(); 13626using Control parent = new(); 13765using Control cont = new(); 13777using Control control = new() 13792using 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); 933public void Form_Parent_Set_GetReturnsExpected(Control value) 953public void Form_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 955using Control oldParent = new(); 1074public void Form_Parent_SetMdiChild_GetReturnsExpected(Control value) 1101using Control parent = new(); 1120public void Form_Parent_SetWithHandle_GetReturnsExpected(Control value) 1155using Control parent = new(); 1206using Control parent = new(); 2576yield return new Action<Form, Control>[] 2578(Form form, Control control) => form.Show(owner: control) 2580yield return new Action<Form, Control>[] 2582(Form form, Control control) => form.ShowDialog(owner: control) 2586yield return new Action<Form, Control>[] 2588(Form form, Control control) => form.Show(owner: control.FindForm()) 2590yield return new Action<Form, Control>[] 2592(Form form, Control control) => form.ShowDialog(owner: control.FindForm()) 2598public void Form_Show_SetsOwnerToTopLevelForm_WhenShownWithOwner(Action<Form, Control> showAction) 2603using 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\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\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\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)
77((Control)e.Component!).Size = new Size(50, 50); 84Control rootView = (Control)designSurface.View; 102await InitiateDrangDropAsync(form, dndStartCoordinates, (Control)designSurface.View); 121async 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)
173protected async Task MoveMouseToControlAsync(Control control) 225where T : Control, new() 244where T : Control, new() 272where T1 : Control, new() 273where 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)
106SWF.Control control = SWF.Control.FromChildHandle(m.HWnd);
System\Windows\Integration\ElementHost.cs (8)
397internal void InvokePaintBackgroundAndPaint(SWF.Control control, SWF.PaintEventArgs args) 648ImeMode ehImeMode = this.ImeMode != ImeMode.NoControl ? this.ImeMode : SWF.Control.PropagatingImeMode; 1536private static SD.Color FindSolidColorParent(Control whichControl) 1538Control control = whichControl; 1613Control topMostParent = null; 1640Control currentControl = _hostControl; 1641Control parentControl = _hostControl.Parent; 1676private bool ShouldSearchWrapForParentControl(Control control)
System\Windows\Integration\ElementHostPropertyMap.cs (1)
67Control parent = host.Parent;
System\Windows\Integration\HostUtils.cs (4)
144internal static void SetBackgroundImage(WinFormsAdapter adapter, Control child, SD.Bitmap image) 172internal static SD.Bitmap GetBitmapOfControl(Control control, ElementHost host) 193internal static SD.Bitmap GetCoveredPortionOfBitmap(Control parentControl, ElementHost childElementHost) 277internal static SD.Bitmap GetBitmapFromRenderTargetBitmap(Control control, RenderTargetBitmap bmp, Point offset)
System\Windows\Integration\WindowsFormsHost.cs (8)
304public Control Child 312Control oldChild = Child; 341private void OnChildChanged(Control oldChild) 729private Control _child; 730public Control Child 923SWF.Control c = this.ActiveControl.Parent; 1092private void CallOnParentRightToLeftChanged(Control control) 1094MethodInfo methodInfo = typeof(SWF.Control).GetMethod("OnParentRightToLeftChanged", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EventArgs) }, null);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (4)
79SWF.Control child = windowsFormsHost.Child; 101SWF.Control childControl = GetChildControl(host, FlowDirectionPropertyTranslator, value); 251SWF.Control childControl = GetChildControl(host, PaddingPropertyTranslator, value); 296private 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)