105 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 (30)
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)
23public 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)
610private class RightToLeftLayoutGrip : Control
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
25public partial class TrackBar : Control, ISupportInitialize
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
27public partial class TreeView : 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.Tests (54)
ExceptionHandlingTests.cs (1)
22public class ThrowControl : Control
KeyboardTooltipStateMachineTests.cs (1)
110private class TestControl : Control
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
1735private class AutomationLiveRegionControl : Control, IAutomationLiveRegion 1740private class SubControl : Control
System\Windows\Forms\ButtonTests.cs (1)
388private class CustomLayoutEngineControl : Control
System\Windows\Forms\ContainerControlTests.cs (1)
1394private class SubControl : Control
System\Windows\Forms\Control.ActiveXImplTests.cs (2)
77private class MyControl : Control 82private class BinaryFormatterPropertiesControl : Control
System\Windows\Forms\ControlBindingsCollectionTests.cs (1)
418private class SubControl : Control
System\Windows\Forms\ControlTests.ControlCollection.cs (2)
3582private class CustomLayoutEngineControl : Control 3601private class SubControl : Control
System\Windows\Forms\ControlTests.cs (2)
1110private class OnCreateControlCounter : Control 1121private class SubControl : Control
System\Windows\Forms\ControlTests.Methods.cs (7)
2991private class CustomLayoutEngineControl : Control 5505private class CustomIsInputControl : Control 5516private class CustomProcessControl : Control 5985private class CustomProcessKeyEventArgsControl : Control 10170private class BorderedControl : Control 14185private class CustomContainerControl : Control, IContainerControl 14419private class NoCreateControl : Control
System\Windows\Forms\ControlTests.Properties.cs (13)
96private class CustomCreateAccessibilityInstanceControl : Control 3663private class CustomCreateControlsInstanceControl : Control 3797private class CustomDefaultCursorControl : Control 6645private class RightToLeftControl : Control 7685private class NonZeroDefaultMarginControl : Control 7690private class ZeroDefaultMarginControl : Control 7894private class NonZeroWidthDefaultMaximumSizeControl : Control 7899private class NonZeroHeightDefaultMaximumSizeControl : Control 7904private class NonZeroWidthNonZeroHeightDefaultMaximumSizeControl : Control 8503private class NonZeroWidthDefaultMinimumSizeControl : Control 8508private class NonZeroHeightDefaultMinimumSizeControl : Control 8513private class NonZeroWidthNonZeroHeightDefaultMinimumSizeControl : Control 9396private class NonZeroDefaultPaddingControl : Control
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
1822private class CustomProcessKeyEventArgsControl : Control 2075private class CustomProcessControl : Control
System\Windows\Forms\ErrorProviderTests.cs (1)
1388public class SubControl : Control
System\Windows\Forms\FontDialogTests.cs (1)
691private class CustomClass : Control
System\Windows\Forms\GroupBoxTests.cs (1)
358private class CustomLayoutEngineControl : Control
System\Windows\Forms\HelpProviderTests.cs (1)
571private class SubControl : Control
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
303private class ControlWithNullName : Control
System\Windows\Forms\MenuStripTests.cs (1)
823private class CustomProcessControl : Control
System\Windows\Forms\PanelTests.cs (1)
346private class CustomLayoutEngineControl : Control
System\Windows\Forms\PropertyManagerTests.cs (1)
417private class SubControl : Control, INotifyPropertyChanged
System\Windows\Forms\ScrollableControlTests.cs (2)
2548private class LargeControl : Control 2555private class SmallControl : Control
System\Windows\Forms\TableLayoutPanelTests.cs (1)
2139private class ControlWithNullName : Control
System\Windows\Forms\ToolStripControlHostTests.cs (2)
4370private class CustomProcessControl : Control 4558private class SubControl : Control
System\Windows\Forms\ToolStripTests.cs (1)
7468private class CustomProcessControl : Control
System\Windows\Forms\ToolTipTests.cs (1)
924private class SubControl : Control
System\Windows\Forms\UserControlTests.cs (2)
461private class CustomLayoutEngineControl : Control 1778private class SubControl : Control
TextBoxBaseTests.cs (1)
5925private class CustomProcessControl : Control
WebBrowserBaseTests.cs (1)
859private 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)
815private class FocusTargetControl : Control
2017 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 (44)
ControlDesignerTests.cs (4)
201using Control childControl = new(); 218using Control childControl = new(); 340{ "Parent", new Control() } 360{ nameof(mockParentDesigner.Object.Component), new Control() }
SplitContainerDesignerTests.cs (1)
43using Control control = new();
System\ComponentModel\Design\ByteViewerTests.cs (14)
310yield return new object[] { new LayoutEventArgs(new Control(), null) }; 311yield return new object[] { new LayoutEventArgs(new Control(), string.Empty) }; 312yield return new object[] { new LayoutEventArgs(new Control(), "ChildIndex") }; 313yield return new object[] { new LayoutEventArgs(new Control(), "Visible") }; 314yield return new object[] { new LayoutEventArgs(new Control(), "Items") }; 315yield return new object[] { new LayoutEventArgs(new Control(), "Rows") }; 316yield return new object[] { new LayoutEventArgs(new Control(), "Columns") }; 317yield return new object[] { new LayoutEventArgs(new Control(), "RowStyles") }; 318yield return new object[] { new LayoutEventArgs(new Control(), "ColumnStyles") }; 319yield return new object[] { new LayoutEventArgs(new Control(), "TableIndex") }; 320yield return new object[] { new LayoutEventArgs(new Control(), "GrowStyle") }; 321yield return new object[] { new LayoutEventArgs(new Control(), "CellBorderStyle") }; 322yield return new object[] { new LayoutEventArgs(new Control(), "LayoutSettings") }; 323yield return new object[] { new LayoutEventArgs(new Control(), "NoSuchProperty") };
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (13)
18_control = new(); 62using Control control = new(); 70using Control control1 = new(); 71using Control control2 = new(); 80using Control control = new(); 107using Control control = new(); 115using Control control = new(); 116using Control anotherControl = new(); 126using Control control = new(); 135using Control control = new(); 144using Control control = new(); 152using Control control = new(); 161using Control control = new();
System\Windows\Forms\Design\DesignerToolStripControlHostTests.cs (1)
13using Control control = new();
System\Windows\Forms\Design\EventHandlerServiceTests.cs (1)
14using 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)
14using Control control = new(); 28using Control control = new(); 46using Control control = new(); 60using Control control = new();
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (1)
68using Control control = new();
SystemDesignMetadataReader.cs (1)
17IDesigner designer = designSurface.CreateDesigner(new Control(), true);
TestControlDesigner.Mocks.cs (1)
14internal readonly Control _control = new();
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
490using Control control = new();
System.Windows.Forms.Tests (1962)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (8)
544using Control first = new(); 545using Control second = new(); 572using Control control = new(); 631using Control control = new(); 697using Control control = new(); 716using Control control = new(); 735using Control control = new(); 2161using Control control = new();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (54)
50using Control ownerControl = new(); 74using Control ownerControl = new(); 115using Control ownerControl = new(); 134using Control ownerControl = new(); 153using Control ownerControl = new(); 168using Control ownerControl = new(); 187using Control ownerControl = new() 199using Control ownerControl = new() 218using Control ownerControl = new() 245using Control control = new(); 253using Control ownerControl = new(); 272using Control ownerControl = new(); 342using Control parent = new(); 423using Control previousControl = new() 448using Control previousControl = new() 473using Control previousControl = new() 542using Control parent = new(); 663using Control previousControl = new() 689using Control previousControl = new() 715using Control previousControl = new() 734using Control ownerControl = new(); 823using Control ownerControl = new() 835using Control ownerControl = new(); 853using Control ownerControl = new(); 869using Control ownerControl = new(); 877using Control ownerControl = new(); 885using Control child = new(); 886using Control ownerControl = new(); 898using Control ownerControl = new(); 906using Control ownerControl = new(); 935using Control ownerControl = new(); 980using Control ownerControl = new(); 991using Control ownerControl = new(); 1000using Control ownerControl = new(); 1009using Control ownerControl = new(); 1020using Control ownerControl = new(); 1031using Control ownerControl = new(); 1047using Control ownerControl = new(); 1057using Control ownerControl = new(); 1076using Control ownerControl = new(); 1094using Control ownerControl = new(); 1102using Control ownerControl = new(); 1117using Control ownerControl = new(); 1136using Control ownerControl = new(); 1153using Control ownerControl = new(); 1164using Control ownerControl = new(); 1173using Control ownerControl = new(); 1184using Control child = new(); 1185using Control ownerControl = new(); 1204using Control ownerControl = new(); 1213using Control control = new(); 1395using Control control = new(); 1599using Control ownerControl = new() { Name = "test name" }; 1617using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (11)
31using Control control = new(); 43using Control parentControl = new(); 44using Control control = new(); 63using Control control = new(); 78using Control control = new(); 117using Control control = new(); 144using Control control = new(); 184using Control control = new(); 211using Control control = new(); 226using Control control = new(); 259using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObjectTests.cs (6)
90using Control control = new(); 104using Control control = new(); 121using Control control = new(); 143using Control control = new(); 161using Control control = new(); 180using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (2)
27_control1 = new Control(); 31_control2 = new Control();
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (5)
20using Control control = new(); 32using Control control = new(); 44using Control control = new(); 57using Control control = new(); 70using Control control = new();
System\Windows\Forms\Application.ParkingWindowTests.cs (5)
75using Control control = new(); 110using Control control = new(); 143using Control control = new(); 176using Control control = new(); 187using Control systemControl = new();
System\Windows\Forms\ApplicationTests.cs (1)
247using Control control = new();
System\Windows\Forms\AxHostTests.cs (11)
349Control parent = new() 388Control parent = new(); 466Control child1 = new(); 467Control child2 = new(); 490Control child1 = new() 494Control child2 = new() 1304using Control parent = new(); 1321using Control parent = new(); 1350using Control parent = new(); 1821using Control parent = new(); 2118using Control parent = new();
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
258{ new Control(), new string[] { "DataContext: Object", "Tag: Object" } },
System\Windows\Forms\BindingContextTests.cs (1)
990Control control = new();
System\Windows\Forms\ButtonBaseTests.cs (22)
1137using Control parent = new(); 1308using Control parent = new(); 1548using Control parent = new(); 1715using Control parent = new(); 1885using Control parent = new(); 1989using Control parent = new(); 2801yield return new object[] { enabled, visible, image, new Control() }; 2865using Control oldParent = new(); 2889using Control parent = new(); 2990using Control parent = new(); 3075using Control parent = new(); 3170using Control parent = new(); 3315using Control parent = new(); 3431using Control parent = new(); 3549using Control parent = new(); 3658using Control parent = new(); 3759using Control parent = new(); 3856using Control parent = new(); 3969using Control parent = new(); 4085using Control parent = new(); 7188using Control parent = new(); 7290using Control parent = new();
System\Windows\Forms\ButtonTests.cs (10)
297using Control parent = new(); 445using Control parent = new(); 791using Control parent = new(); 886using Control parent = new(); 1935using Control parent = new() 2017using Control parent = new() 2922using Control parent = new(); 3024using Control parent = new(); 3119using Control parent = new() 3197using Control parent = new()
System\Windows\Forms\CommonDialogTests.cs (4)
153using Control owner = new(); 174using Control owner = new(); 188using Control owner = new(); 210using Control owner = new();
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (1)
157using Control control = new();
System\Windows\Forms\ContainerControlTests.cs (20)
150using Control child = new(); 151Control grandchild = new(); 176Assert.Throws<ArgumentException>("value", () => control.ActiveControl = new Control()); 200using Control child = new(); 562using Control child = new(); 613using Control child = new(); 794using Control child1 = new(); 795using Control grandchild1 = new(); 798using Control grandchild2 = new(); 1020using Control child1 = new(); 1021using Control grandchild1 = new(); 1024using Control grandchild2 = new(); 1254using Control child1 = new(); 1255using Control child2 = new(); 1284using Control child1 = new(); 1285using Control child2 = new(); 1315using Control control = new(); 1340using Control control = new(); 1365using Control control = new(); 1381using Control control = new();
System\Windows\Forms\Control.ActiveXImplTests.cs (1)
19using Control control = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (26)
17Control control = new(); 38using Control control = new(); 57using Control control = new(); 69using Control control = new(); 124using Control control = new(); 141using Control control = new(); 158using Control control = new(); 175using Control control = new(); 192using Control control = new(); 209using Control control = new(); 226using Control control = new(); 239using Control control = new(); 253using Control control = new(); 270using Control control = new(); 278using Control control = new(); 289using Control control1 = new(); 290using Control control2 = new(); 302using Control control = new(); 322using Control control = new(); 338using Control control = new(); 350using Control control = new(); 363using Control control1 = new(); 364using Control control2 = new(); 380using Control control = new(); 398using Control control = new(); 411using Control control = new();
System\Windows\Forms\ControlTests.ControlCollection.cs (202)
17using Control owner = new(); 34using Control owner = new(); 35using Control control1 = new(); 36using Control control2 = new(); 108using Control owner = new(); 109using Control control1 = new(); 110using Control control2 = new(); 185using Control owner1 = new(); 186using Control owner2 = new(); 187using Control control = new(); 224using Control owner = new(); 329using Control owner = new(); 330using Control control = new() 358using Control owner = new(); 359using Control control = new() 387using Control owner = new(); 388using Control control = new() 426using Control owner = new(); 427using Control control = new() 465using Control owner = new(); 466using Control child1 = new(); 467using Control child2 = new(); 543using Control owner = new(); 544using Control control = new(); 586using Control owner = new(); 587using Control control = new(); 641using Control owner = new(); 642using Control control = new(); 791using Control owner = new(); 792using Control control = new(); 944using Control owner = new(); 1017using Control owner = new(); 1111using Control owner = new(); 1126owner = new Control(); 1132using Control control = new(); 1150control = new Control(); 1156using Control owner = new(); 1169using Control owner = new(); 1177using Control parent = new(); 1178using Control owner = new() 1189using Control grandparent = new(); 1190using Control parent = new() 1194using Control owner = new() 1205using Control owner = new(); 1206using Control child1 = new(); 1207using Control child2 = new(); 1208using Control child3 = new(); 1277using Control owner = new(); 1285using Control owner = new(); 1286using Control child1 = new(); 1287using Control child2 = new(); 1288using Control child3 = new(); 1335using Control owner = new(); 1336using Control child1 = new(); 1337using Control child2 = new(); 1338using Control child3 = new(); 1378using Control owner = new(); 1380using Control child1 = new(); 1381using Control child2 = new(); 1387Assert.False(collection.Contains(new Control())); 1403using Control owner = new(); 1404using Control child1 = new() 1408using Control child2 = new() 1412using Control child3 = new() 1435using Control owner = new(); 1436using Control child1 = new() 1440using Control child2 = new() 1444using Control child3 = new() 1448using Control grandchild1 = new() 1452using Control grandchild2 = new() 1456using Control grandchild3 = new() 1488using Control owner = new(); 1489using Control child1 = new() 1493using Control child2 = new() 1497using Control child3 = new() 1514using Control owner = new(); 1523using Control owner = new(); 1525using Control child1 = new(); 1526using Control child2 = new(); 1537using Control owner = new(); 1539using Control child1 = new(); 1540using Control child2 = new(); 1551using Control owner = new(); 1553using Control child1 = new(); 1554using Control child2 = new(); 1560Assert.Equal(-1, collection.GetChildIndex(new Control(), throwException: false)); 1566yield return new object[] { new Control() }; 1574using Control owner = new(); 1576using Control child1 = new(); 1577using Control child2 = new(); 1588using Control owner = new(); 1609using Control owner = new(); 1610using Control child1 = new(); 1611using Control child2 = new(); 1612using Control child3 = new(); 1648using Control owner = new(); 1649using Control child = new(); 1671using Control owner = new(); 1672using Control child1 = new(); 1673using Control child2 = new(); 1674using Control child3 = new(); 1704using Control owner = new(); 1705using Control child1 = new(); 1706using Control child2 = new(); 1707using Control child3 = new(); 1744using Control owner = new(); 1746using Control child1 = new(); 1747using Control child2 = new(); 1753Assert.Equal(-1, collection.IndexOf(new Control())); 1769using Control owner = new(); 1770using Control child1 = new() 1774using Control child2 = new() 1778using Control child3 = new() 1802using Control owner = new(); 1803using Control child1 = new() 1807using Control child2 = new() 1811using Control child3 = new() 1838using Control owner = new(); 1839using Control child1 = new() 1843using Control child2 = new() 1847using Control child3 = new() 1868using Control owner = new(); 1869using Control child1 = new(); 1870using Control child2 = new(); 1871using Control child3 = new(); 1890using Control owner = new(); 1901using Control owner = new(); 1902using Control child = new(); 1913using Control owner = new(); 1914using Control child1 = new(); 1915using Control child2 = new(); 1976using Control child1 = new(); 1977using Control child2 = new(); 2042using Control owner = new(); 2043using Control child1 = new(); 2044using Control child2 = new(); 2118using Control owner = new(); 2119using Control child1 = new(); 2120using Control child2 = new(); 2209using Control owner1 = new(); 2210using Control owner2 = new(); 2211using Control control1 = new(); 2212using Control control2 = new(); 2213using Control control3 = new(); 2237using Control owner = new(); 2238using Control control = new(); 2283using Control owner = new(); 2284using Control control = new(); 2341using Control owner = new(); 2342using Control control = new(); 2485using Control owner = new(); 2486using Control control = new(); 2617using Control owner = new(); 2681using Control owner = new(); 2767using Control owner = new(); 2768using Control child1 = new(); 2769using Control child2 = new(); 2845using Control owner = new(); 2846using Control child1 = new(); 2847using Control child2 = new(); 2903using Control owner = new(); 2914using Control owner = new(); 2915using Control child = new(); 2928using Control owner = new(); 2929using Control child1 = new() 2933using Control child2 = new() 2937using Control child3 = new() 3004using Control owner = new(); 3005using Control child1 = new() 3009using Control child2 = new() 3013using Control child3 = new() 3035using Control owner = new(); 3036using Control child1 = new(); 3037using Control child2 = new(); 3038using Control child3 = new(); 3103using Control owner = new(); 3104using Control child1 = new(); 3105using Control child2 = new(); 3106using Control child3 = new(); 3158using Control owner = new(); 3159using Control child1 = new(); 3160using Control child2 = new(); 3161using Control child3 = new(); 3237using Control owner = new(); 3238using Control child1 = new(); 3239using Control child2 = new(); 3240using Control child3 = new(); 3331using Control owner = new(); 3333using Control child2 = new(); 3334using Control child3 = new(); 3411using Control owner = new(); 3419using Control owner = new(); 3420using Control child = new(); 3431using Control owner = new(); 3432using Control control1 = new(); 3433using Control control2 = new(); 3505using Control owner = new(); 3514using Control owner = new(); 3515using Control child1 = new(); 3516using Control child2 = new(); 3576using Control owner = new(); 3588_layoutEngine = new Control().LayoutEngine;
System\Windows\Forms\ControlTests.cs (6)
289yield return new object[] { new Control(), string.Empty, string.Empty }; 290yield return new object[] { new Control(), "text", "text" }; 385yield return new object[] { new Control(), string.Empty, 0, 0, 0, 0, string.Empty }; 386yield return new object[] { new Control(), "text", 1, 2, 3, 4, "text" }; 571using Control parent = new(); 596using Control parent = new();
System\Windows\Forms\ControlTests.Handlers.cs (53)
131using Control child1 = new(); 132using Control child2 = new(); 178using Control child1 = new() 182using Control child2 = new() 326using Control child1 = new(); 327using Control child2 = new(); 377using Control child1 = new() 381using Control child2 = new() 507using Control child1 = new(); 508using Control child2 = new(); 554using Control child1 = new() 558using Control child2 = new() 655using Control child1 = new(); 656using Control child2 = new(); 704using Control child1 = new() 708using Control child2 = new() 1013yield return new object[] { new ControlEventArgs(new Control()) }; 1105using Control child1 = new(); 1106using Control child2 = new(); 1154using Control child1 = new() 1158using Control child2 = new() 1502using Control child1 = new(); 1503using Control child2 = new(); 1549using Control child1 = new() 1553using Control child2 = new() 1737using Control child1 = new(); 1738using Control child2 = new(); 1786using Control child1 = new() 1790using Control child2 = new() 1958using Control child1 = new(); 1959using Control child2 = new(); 2005using Control child1 = new() 2009using Control child2 = new() 2617Control parent = new(); 2677Control parent = new(); 3135using Control parent = new(); 3889Control control = new() 3930Control control = new() 4107using Control parent = new() 5029using Control child1 = new(); 5030using Control child2 = new() 5079using Control child1 = new() 5083using Control child2 = new() 5360using Control child1 = new(); 5361using Control child2 = new(); 5578using Control parent = new(); 5665using Control parent = new(); 5719using Control grandchild1 = new(); 5720using Control child1 = new(); 5721using Control child2 = new(); 5795using Control grandchild1 = new(); 5796using Control child1 = new() 5800using Control child2 = new()
System\Windows\Forms\ControlTests.Internals.cs (39)
14using Control control = new(); 26using Control control = new() 38using Control control = new() 53using Control control = new() 72using Control control = new() 91using Control control = new(); 109using Control control = new() 150using Control control = new() 162using Control control = new() 174using Control control = new(); 186using Control control = new(); 198using Control control = new(); 206using Control control = new(); 207Control parent = new(); 218using Control control = new(); 220Control parent = new(); 230using Control control = new(); 239using Control control = new() 251using Control control = new() 263using Control control = new(); 264Control parent = new(); 275using Control control = new(); 285using Control control = new(); 286Control first = new() 290Control second = new() 294Control third = new() 320using Control control = new(); 321Control first = new() 325Control second = new() 329Control third = new() 349using Control control = new(); 350Control first = new() 354Control second = new() 358Control third = new() 377using Control control = new(); 378Control first = new() 382Control second = new() 386Control third = new() 405using Control control = new();
System\Windows\Forms\ControlTests.Methods.cs (185)
135using Control parent = new(); 136using Control child1 = new(); 137using Control child2 = new(); 177using Control parent = new(); 178using Control child1 = new(); 179using Control child2 = new(); 232using Control parent = new(); 233using Control child1 = new(); 234using Control child2 = new(); 299using Control parent = new(); 301using Control child2 = new(); 504using Control parent = new(); 565using Control control = new() 691using Control parent = new(); 779using Control parent = new(); 780using Control control = new() 784using Control child1 = new() 788using Control child2 = new() 792using Control grandchild1 = new() 796using Control otherParent = new(); 797using Control otherControl = new() 801using Control emptyControl = new(); 844using Control parent = new(); 974using Control control = new(); 1019using Control parent = new(); 1022using Control control = new() 1072using Control control = new(); 1073using Control child1 = new(); 1074using Control child2 = new(); 1150using Control control = new(); 1197using Control control = new(); 1829using Control control = new(); 1839using Control control = new(); 1858using Control control = new(); 1866using Control control = new(); 1975using Control control = new(); 1984using Control control = new(); 2102using Control control = new(); 2122using Control control = new(); 2136using Control control = new(); 2143using Control grandparent = new(); 2144using Control parent = new() 2148using Control control = new() 2165using Control parent = new() 2169using Control control = new() 2186using Control control = new() 2204using Control parent = new() 2208using Control control = new() 2226using Control parent = new() 2230using Control control = new() 2247using Control cont = new(); 2248using Control first = new() 2252using Control second = new() 2256using Control third = new() 2275using Control cont = new(); 2276using Control first = new() 2280using Control second = new() 2284using Control third = new() 2303using Control cont = new(); 2304using Control first = new() 2308using Control second = new() 2312using Control third = new() 2331using Control cont = new(); 2332using Control first = new() 2336using Control second = new() 2340using Control third = new() 2369using Control control = new(); 2382using Control control = new() 2421using Control control = new() 2570.Returns(new Control()); 2906using Control control = new() 2921using Control control = new() 2997_layoutEngine = new Control().LayoutEngine; 3796using Control control = new(); 3821using Control control = new(); 3847using Control control = new(); 3876using Control control = new(); 3910using Control control = new(); 3946using Control control = new(); 3979using Control control = new(); 4012using Control control = new(); 4038using Control control = new(); 4065using Control control = new(); 4100using Control control = new(); 4130using Control control = new(); 4172using Control control = new(); 4181using Control control = new(); 4193using Control otherControl = new(); 4317using Control otherControlParent = new(); 4369using Control otherControl = new(); 4772using Control control = new(); 4826using Control parent = new(); 4827using Control control = new() 4861using Control parent = new(); 4955control.PerformLayout(new Control(), "OtherAffectedProperty"); 4959control.PerformLayout(new Control(), "OtherAffectedProperty"); 4978using Control control = new(); 5017yield return new object[] { new Control(), string.Empty }; 5018yield return new object[] { new Control(), "AffectedProperty" }; 5025using Control control = new(); 5081using Control parent = new(); 5082using Control control = new() 5114yield return new object[] { true, new Control(), string.Empty, 1 }; 5115yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5118yield return new object[] { false, new Control(), string.Empty, 0 }; 5119yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5126using Control parent = new(); 5177yield return new object[] { true, new Control(), string.Empty, 1 }; 5178yield return new object[] { true, new Control(), "AffectedProperty", 1 }; 5181yield return new object[] { false, new Control(), string.Empty, 0 }; 5182yield return new object[] { false, new Control(), "AffectedProperty", 0 }; 5229control.PerformLayout(new Control(), "OtherAffectedProperty"); 5233control.PerformLayout(new Control(), "OtherAffectedProperty"); 5252using Control control = new(); 5279control.PerformLayout(new Control(), "AffectedProperty"); 5294Assert.Throws<NullReferenceException>(() => control.PerformLayout(new Control(), "AffectedProperty")); 5372using Control parent = new(); 5549using Control parent = new(); 5602using Control parent = new(); 5650using Control parent = new(); 5750using Control parent = new(); 6041using Control parent = new(); 6249using Control parent = new(); 6335using Control control = new(); 6347using Control control = new(); 6388using Control control = new(); 6446using Control control = new(); 6466using Control control = new(); 6580yield return new object[] { new Control(), string.Empty, true, 1 }; 6581yield return new object[] { new Control(), "AffectedProperty", true, 1 }; 6584yield return new object[] { new Control(), string.Empty, false, 0 }; 6585yield return new object[] { new Control(), "AffectedProperty", false, 0 }; 6592using Control control = new(); 6620using Control control = new(); 6634control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6650using Control control = new(); 6670using Control control = new(); 6700using Control control = new(); 6715control.PerformLayout(new Control(), "AnotherAffectedProperty"); 6731using Control control = new(); 6754using Control child = new(); 6783using Control control = new(); 6802using Control child = new(); 6829using Control control = new(); 7030using Control parent = new(); 7031using Control child1 = new(); 7032using Control child2 = new(); 7072using Control parent = new(); 7073using Control child1 = new(); 7074using Control child2 = new(); 7127using Control parent = new(); 7128using Control child1 = new(); 7129using Control child2 = new(); 7194using Control parent = new(); 7196using Control child2 = new(); 7315using Control parent = new(); 7688using Control parent = new(); 7945using Control parent = new(); 8545using Control parent = new(); 8802using Control parent = new(); 9342using Control parent = new(); 9640using Control parent = new(); 10126using Control parent = new(); 10229using Control control = new() 10247using Control control = new() 10278using Control control = new(); 10295using Control control = new(); 10325using Control control = new(); 10332using Control control = new(); 10344using Control control = new(); 11245using Control parent = new(); 11483using Control parent = new(); 11731using Control parent = new(); 11981using Control parent = new(); 12190using Control parent = new(); 12209using Control parent = new(); 12241using Control parent = new(); 12274using Control parent = new(); 12318using Control parent = new(); 12319using Control child1 = new(); 12365using Control parent = new(); 12554using Control control = new(); 12628using Control control = new(); 14249using Control grandparent = new(); 14337using Control grandparent = new();
System\Windows\Forms\ControlTests.Properties.cs (362)
21using Control control = new(); 37using Control control = new(); 81using Control control1 = new(); 107using Control control = new() 124using Control control = new() 141using Control control = new() 158using Control control = new() 175using Control control = new(); 183using Control control = new() 205using Control control = new(); 242using Control control = new(); 282using Control control = new(); 337using Control control = new(); 359using Control control = new() 410using Control parent = new(); 411using Control control = new() 455using Control grandparent = new(); 456using Control parent = new() 460using Control control = new() 556using Control parent = new(); 557using Control control = new() 675using Control grandparent = new(); 676using Control parent = new() 680using Control control = new() 767using Control control = new() 821using Control parent = new(); 822using Control control = new() 869using Control control = new(); 904using Control control = new() 919using Control control = new(); 946using Control parent = new(); 947using Control control = new() 1001using Control control = new() 1064using Control control = new(); 1107using Control parent = new(); 1108using Control control = new() 1190using Control control = new() 1229using Control control = new() 1246using Control control = new() 1289using Control child1 = new(); 1290using Control child2 = new(); 1291using Control control = new(); 1313using Control child1 = new() 1317using Control child2 = new() 1321using Control control = new(); 1349using Control control = new(); 1377using Control control = new(); 1412using Control control = new(); 1437using Control child1 = new(); 1438using Control child2 = new(); 1439using Control control = new(); 1517using Control child1 = new() 1521using Control child2 = new() 1525using Control control = new(); 1597using Control control = new(); 1605using Control control = new(); 1621using Control control = new(); 1637using Control control = new() 1660using Control control = new(); 1689using Control child1 = new(); 1690using Control child2 = new(); 1691using Control control = new(); 1713using Control child1 = new() 1717using Control child2 = new() 1721using Control control = new(); 1740using Control control = new(); 1782using Control control = new(); 1808using Control child1 = new(); 1809using Control child2 = new(); 1810using Control control = new(); 1895using Control child1 = new() 1899using Control child2 = new() 1903using Control control = new(); 2073using Control control = new(); 2108using Control control = new(); 2134using Control control = new(); 2142using Control parent = new() 2146using Control control = new() 2161using Control control = new() 2178using Control control = new() 2195using Control control = new() 2213using Control control = new(); 2255using Control child1 = new(); 2256using Control child2 = new(); 2257using Control control = new(); 2342using Control child1 = new() 2346using Control child2 = new() 2350using Control control = new(); 2693using Control parent = new(); 2904using Control parent = new(); 3047using Control control = new() 3063using Control control = new() 3078using Control parent = new() 3083using Control control = new() 3097using Control control = new() 3113using Control parent = new() 3118using Control control = new() 3130using Control control = new() 3152using Control control = new(); 3189using Control control = new() 3211using Control control = new(); 3247using Control control = new() 3284yield return new object[] { new Control(), Size.Empty }; 3326using Control control = new(); 3484using Control control = new(); 3538using Control control = new() 3556using Control control = new() 3574using Control control = new() 3589using Control control = new() 3605using Control control = new(); 3647yield return new object[] { new Control.ControlCollection(new Control()) }; 3674using Control control = new(); 3680using Control child = new(); 3694using Control control = new(); 3700using Control child = new(); 3714using Control control = new() 3730using Control parent = new() 3734using Control control = new() 3754using Control control = new() 3782using Control parent = new() 3808using Control control = new() 3825using Control control = new(); 3854using Control child1 = new(); 3855using Control child2 = new(); 3856using Control control = new(); 3878using Control child1 = new() 3882using Control child2 = new() 3886using Control control = new(); 3905using Control control = new(); 3947using Control child1 = new(); 3948using Control child2 = new(); 3949using Control control = new(); 4034using Control child1 = new() 4038using Control child2 = new() 4042using Control control = new(); 4126using Control control = new(); 4148using Control control = new() 4183using Control parent = new(); 4184using Control control = new() 4273using Control parent = new(); 4274using Control control = new() 4330using Control control = new() 4349using Control control = new(); 4383using Control control = new() 4422using Control control = new(); 4504using Control control = new() 4567using Control control = new() 4605using Control child1 = new(); 4606using Control child2 = new(); 4607using Control control = new() 4682using Control child1 = new() 4686using Control child2 = new() 4690using Control control = new() 4766using Control control = new(); 4782using Control control = new(); 4799using Control parent = new() 4803using Control control = new() 4823using Control control = new() 5022using Control control = new(); 5064using Control child1 = new(); 5065using Control child2 = new(); 5066using Control control = new(); 5151using Control child1 = new() 5155using Control child2 = new() 5159using Control control = new(); 5243using Control control = new(); 5268using Control control = new(); 5293using Control control = new() 5310using Control control = new() 5329using Control child1 = new(); 5330using Control child2 = new(); 5331using Control control = new(); 5353using Control child1 = new() 5357using Control child2 = new() 5361using Control control = new(); 5390using Control control = new(); 5418using Control control = new(); 5453using Control control = new(); 5478using Control child1 = new(); 5479using Control child2 = new(); 5480using Control control = new(); 5558using Control child1 = new() 5562using Control child2 = new() 5566using Control control = new(); 5639using Control control = new(); 5655using Control control = new(); 5670using Control cont = new(); 5970using Control parent = new(); 6205using Control parent = new(); 6363using Control control = new() 6380using Control control = new(); 6408using Control control = new(); 6444using Control control = new(); 6558using Control control = new(); 6571using Control control = new(); 6585using Control control = new() 6606using Control control = new(); 6637using Control control = new(); 6740using Control parent = new(); 6934using Control parent = new(); 7087using Control control = new(); 7145using Control control = new(); 7219using Control parent = new(); 7417using Control parent = new(); 7573using Control control = new(); 7597using Control control = new(); 7620using Control control = new(); 7673yield return new object[] { new Control(), new Padding(3) }; 7707using Control control = new(); 7727using Control parent = new(); 7728using Control control = new() 7757using Control control = new(); 7796using Control parent = new(); 7797using Control control = new() 7851using Control control = new(); 7867using Control control = new(); 7881yield return new object[] { new Control(), Size.Empty }; 7929using Control control = new(); 7951using Control control = new() 7997using Control control = new() 8028using Control control = new() 8053using Control control = new() 8100using Control parent = new(); 8101using Control control = new() 8155using Control parent = new(); 8156using Control control = new() 8198using Control control = new(); 8233using Control control = new() 8271using Control control = new() 8309using Control parent = new(); 8310using Control control = new() 8376using Control parent = new(); 8377using Control control = new() 8444using Control control = new(); 8468using Control control = new(); 8490yield return new object[] { new Control(), Size.Empty }; 8538using Control control = new(); 8582using Control control = new() 8635using Control control = new() 8666using Control control = new() 8697using Control control = new() 8744using Control parent = new(); 8745using Control control = new() 8805using Control parent = new(); 8806using Control control = new() 8870using Control control = new(); 8927using Control control = new() 8993using Control control = new() 9052using Control parent = new(); 9053using Control control = new() 9140using Control parent = new(); 9141using Control control = new() 9214using Control control = new(); 9238using Control control = new(); 9300using Control control = new() 9316using Control control = new() 9333using Control control = new() 9368using Control control = new() 9385yield return new object[] { new Control(), Padding.Empty }; 9413using Control control = new(); 9439using Control parent = new(); 9440using Control control = new() 9537using Control parent = new(); 9608using Control control = new(); 9646using Control control = new(); 9662using Control control = new(); 9677yield return new object[] { new Control() }; 9685using Control control = new() 9702using Control oldParent = new(); 9703using Control control = new() 9723using Control parent = new(); 9724using Control control = new() 9743using Control control = new(); 9771using Control parent = new(); 9772using Control control = new(); 9807using Control control = new(); 9815using Control child = new(); 9816using Control control = new(); 9826using Control parent = new(); 9837using Control control = new(); 9838using Control child = new() 9856using Control child = new() 9878using Control control = new() 9896using Control control = new() 9918using Control control = new(); 9948using Control control = new() 9982using Control control = new(); 10057using Control control = new() 10074using Control control = new() 10093using Control child1 = new(); 10094using Control child2 = new(); 10095using Control control = new(); 10117using Control child1 = new() 10121using Control child2 = new() 10125using Control control = new(); 10149using Control control = new(); 10180using Control control = new() 10211using Control control = new(); 10246using Control control = new(); 10271using Control child1 = new(); 10272using Control child2 = new() 10276using Control control = new(); 10354using Control child1 = new() 10358using Control child2 = new() 10362using Control control = new(); 10435using Control control = new(); 10443using Control control = new(); 10471using Control control = new(); 10649using Control control = new() 10666using Control control = new(); 10702using Control control = new() 10779using Control control = new(); 10955using Control control = new() 11369using Control parent = new(); 11614using Control parent = new(); 11754using Control control = new(); 11778using Control control = new(); 11804using Control control = new() 11820using Control control = new() 11858using Control control = new(); 11866using Control control = new() 11888using Control control = new(); 11924using Control control = new() 11963using Control control = new() 11980using Control control = new(); 12008using Control control = new(); 12044using Control control = new(); 12071using Control control = new(); 12174using Control parent = new(); 12366using Control parent = new(); 12519using Control control = new(); 12567using Control grandparent = new(); 12568using Control parent = new() 12572using Control control = new() 12586using Control parent = new() 12590using Control control = new() 12603using Control control = new() 12625using Control control = new(); 12626using Control child1 = new(); 12627using Control child2 = new(); 12656using Control control = new(); 12696using Control parent = new() 12700using Control item = new() 12715using Control control = new() 12737using Control parent = new(); 12738using Control control = new() 12811using Control parent = new(); 12812using Control control = new() 12869using Control control = new() 12907using Control child1 = new(); 12908using Control child2 = new(); 12909using Control control = new() 12984using Control child1 = new() 12988using Control child2 = new() 12992using Control control = new() 13068using Control control = new(); 13084using Control control = new(); 13389using Control parent = new(); 13624using Control parent = new(); 13763using Control cont = new(); 13775using Control control = new() 13790using Control control = new();
System\Windows\Forms\DataGridViewTests.cs (8)
113using Control parent = new(); 255using Control parent = new(); 817yield return new object[] { new Control() }; 842using Control oldParent = new(); 863using Control parent = new(); 909using Control parent = new(); 1030using Control parent = new(); 1179using Control parent = new();
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
1587using Control parent = new(); 1878using Control parent = new();
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
803using Control result = new();
System\Windows\Forms\ErrorProviderTests.cs (21)
856yield return new object[] { new Control(), true }; 871using Control control = new(); 894using Control control = new(); 924using Control control = new(); 953using Control control = new(); 971using Control control = new(); 989using Control control = new(); 1045using Control control = new(); 1072using Control control = new(); 1096using Control control = new(); 1105using Control control = new(); 1130yield return new object[] { blinkStyle, new SubControl { Parent = new() }, error, error ?? string.Empty }; 1140using Control originalParent = new(); 1141using Control newParent = new(); 1227using Control control1 = new(); 1238using Control control1 = new(); 1251using Control control1 = new(); 1264using Control control1 = new(); 1277using Control control1 = new(); 1293using Control control1 = new(); 1306using Control control1 = new();
System\Windows\Forms\FlowLayoutPanelTests.cs (8)
215using Control extendee = new() 227yield return new object[] { new Control() }; 228yield return new object[] { new Control { Parent = new() } }; 250using Control child = new(); 318using Control child = new(); 354using Control parent = new(); 355using Control child = new()
System\Windows\Forms\FlowLayoutSettingsTests.cs (4)
100Assert.False(settings.GetFlowBreak(new Control())); 134using Control child = new(); 174using Control parent = new(); 175using Control child = new()
System\Windows\Forms\FormTests.cs (7)
925yield return new object[] { new Control() }; 953using Control oldParent = new(); 1067yield return new object[] { new Control() }; 1099using Control parent = new(); 1153using Control parent = new(); 1204using Control parent = new(); 2601using Control control = new();
System\Windows\Forms\GroupBoxTests.cs (8)
267using Control parent = new(); 415using Control parent = new(); 925using Control child = new() 1218using Control parent = new(); 1315using Control parent = new(); 1982using Control parent = new(); 2027using Control parent = new() 2043using Control parent = new()
System\Windows\Forms\HelpProviderTests.cs (21)
50using Control control = new(); 75yield return new object[] { new Control(), true }; 90Assert.Null(provider.GetHelpKeyword(new Control())); 104Assert.Equal(HelpNavigator.AssociateIndex, provider.GetHelpNavigator(new Control())); 118Assert.Null(provider.GetHelpString(new Control())); 132Assert.False(provider.GetShowHelp(new Control())); 147using Control control = new(); 158using Control control = new(); 187using Control control = new(); 221using Control control = new(); 253using Control control = new(); 288using Control control = new(); 305using Control control = new(); 323using Control control = new(); 350Assert.Throws<InvalidEnumArgumentException>("navigator", () => provider.SetHelpNavigator(new Control(), navigator)); 358using Control control = new(); 377using Control control = new(); 397using Control control = new(); 424using Control control = new(); 450using Control control = new(); 490Assert.False(provider.ShouldSerializeShowHelp(new Control()));
System\Windows\Forms\HtmlDocumentTests.cs (96)
18using Control parent = new(); 50using Control parent = new(); 82using Control parent = new(); 106using Control parent = new(); 136using Control parent = new(); 156using Control parent = new(); 176using Control parent = new(); 193using Control parent = new(); 210using Control parent = new(); 235using Control parent = new(); 267using Control parent = new(); 299using Control parent = new(); 329using Control parent = new(); 359using Control parent = new(); 376using Control parent = new(); 393using Control parent = new(); 418using Control parent = new(); 435using Control parent = new(); 470using Control parent = new(); 485using Control parent = new(); 500using Control parent = new(); 522using Control parent = new(); 537using Control parent = new(); 553using Control parent = new(); 575using Control parent = new(); 590using Control parent = new(); 604using Control parent = new(); 628using Control parent = new(); 662using Control parent = new(); 676using Control parent = new(); 691using Control parent = new(); 715using Control parent = new(); 747using Control parent = new(); 779using Control parent = new(); 801using Control parent = new(); 832using Control parent = new(); 852using Control parent = new(); 868using Control parent = new(); 888using Control parent = new(); 904using Control parent = new(); 936using Control parent = new(); 968using Control parent = new(); 990using Control parent = new(); 1020using Control parent = new(); 1040using Control parent = new(); 1056using Control parent = new(); 1081using Control parent = new(); 1104using Control parent = new(); 1128using Control parent = new(); 1165using Control parent = new(); 1179using Control parent = new(); 1194using Control parent = new(); 1216using Control parent = new(); 1246using Control parent = new(); 1267using Control parent = new(); 1299using Control parent = new(); 1331using Control parent = new(); 1353using Control parent = new(); 1383using Control parent = new(); 1402using Control parent = new(); 1464using Control parent = new(); 1502using Control parent = new(); 1520using Control parent = new(); 1540using Control parent = new(); 1557using Control parent = new(); 1573using Control parent = new(); 1601using Control parent = new(); 1618using Control parent = new(); 1635using Control parent = new(); 1658using Control parent = new(); 1676using Control parent = new(); 1691using Control parent = new(); 1710using Control parent = new(); 1728using Control parent = new(); 1742using Control parent = new(); 1759using Control parent = new(); 1784using Control parent = new(); 1804using Control parent = new(); 1818using Control parent = new(); 1836using Control parent = new(); 1875using Control parent = new(); 1902using Control parent = new(); 1919using Control parent = new(); 1936using Control parent = new(); 1954using Control parent = new(); 1974using Control parent = new(); 1995using Control parent = new(); 2033using Control parent = new(); 2071using Control parent = new(); 2109using Control parent = new(); 2147using Control parent = new(); 2185using Control parent = new(); 2223using Control parent = new(); 2261using Control parent = new(); 2299using Control parent = new(); 2337using Control parent = new();
System\Windows\Forms\HtmlElementTests.cs (127)
18using Control parent = new(); 38using Control parent = new(); 55using Control parent = new(); 74using Control parent = new(); 89using Control parent = new(); 104using Control parent = new(); 120using Control parent = new(); 139using Control parent = new(); 156using Control parent = new(); 178using Control parent = new(); 196using Control parent = new(); 212using Control parent = new(); 234using Control parent = new(); 273using Control parent = new(); 288using Control parent = new(); 306using Control parent = new(); 321using Control parent = new(); 339using Control parent = new(); 364using Control parent = new(); 395using Control parent = new(); 410using Control parent = new(); 429using Control parent = new(); 455using Control parent = new(); 486using Control parent = new(); 501using Control parent = new(); 516using Control parent = new(); 531using Control parent = new(); 550using Control parent = new(); 576using Control parent = new(); 607using Control parent = new(); 622using Control parent = new(); 637using Control parent = new(); 652using Control parent = new(); 668using Control parent = new(); 694using Control parent = new(); 727using Control parent = new(); 742using Control parent = new(); 760using Control parent = new(); 778using Control parent = new(); 796using Control parent = new(); 812using Control parent = new(); 827using Control parent = new(); 851using Control parent = new(); 882using Control parent = new(); 913using Control parent = new(); 928using Control parent = new(); 943using Control parent = new(); 962using Control parent = new(); 988using Control parent = new(); 1019using Control parent = new(); 1034using Control parent = new(); 1055using Control parent = new(); 1073using Control parent = new(); 1091using Control parent = new(); 1115using Control parent = new(); 1145using Control parent = new(); 1163using Control parent = new(); 1181using Control parent = new(); 1205using Control parent = new(); 1235using Control parent = new(); 1254using Control parent = new(); 1273using Control parent = new(); 1302using Control parent = new(); 1335using Control parent = new(); 1353using Control parent = new(); 1377using Control parent = new(); 1407using Control parent = new(); 1422using Control parent = new(); 1454using Control parent = new(); 1492using Control parent = new(); 1509using Control parent = new(); 1574using Control parent = new(); 1615using Control parent = new(); 1657using Control parent = new(); 1696using Control parent = new(); 1715using Control parent = new(); 1735using Control parent = new(); 1764using Control parent = new(); 1782using Control parent = new(); 1800using Control parent = new(); 1822using Control parent = new(); 1840using Control parent = new(); 1856using Control parent = new(); 1888using Control parent = new(); 1908using Control parent = new(); 1923using Control parent = new(); 1948using Control parent = new(); 1963using Control parent = new(); 1986using Control parent = new(); 2024using Control parent = new(); 2068using Control parent = new(); 2106using Control parent = new(); 2150using Control parent = new(); 2186using Control parent = new(); 2230using Control parent = new(); 2265using Control parent = new(); 2309using Control parent = new(); 2325using Control parent = new(); 2341using Control parent = new(); 2361using Control parent = new(); 2380using Control parent = new(); 2398using Control parent = new(); 2419using Control parent = new(); 2438using Control parent = new(); 2463using Control parent = new(); 2478using Control parent = new(); 2495using Control parent = new(); 2518using Control parent = new(); 2542using Control parent = new(); 2583using Control parent = new(); 2624using Control parent = new(); 2665using Control parent = new(); 2706using Control parent = new(); 2747using Control parent = new(); 2788using Control parent = new(); 2829using Control parent = new(); 2870using Control parent = new(); 2911using Control parent = new(); 2952using Control parent = new(); 2993using Control parent = new(); 3034using Control parent = new(); 3075using Control parent = new(); 3116using Control parent = new(); 3157using Control parent = new(); 3198using Control parent = new(); 3239using Control parent = new(); 3280using Control parent = new();
System\Windows\Forms\HtmlWindowTests.cs (4)
15using Control parent = new(); 31using Control parent = new(); 47using Control parent = new(); 68using Control parent = new();
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
40using Control child1 = new() 45using Control child2 = new() 50using Control largeChild = new() 55using Control emptyChild = new() 59using Control emptyChildWithMargin = new() 64using Control child3 = new() 69using Control child4 = new() 101using Control child1 = new() 106using Control child2 = new() 111using Control largeChild = new() 116using Control emptyChild = new() 120using Control emptyChildWithMargin = new() 125using Control child3 = new() 130using Control child4 = new() 162using Control child1 = new() 167using Control child2 = new() 172using Control largeChild = new() 177using Control emptyChild = new() 181using Control emptyChildWithMargin = new() 186using Control child3 = new() 191using Control child4 = new() 223using Control child1 = new() 228using Control child2 = new() 233using Control largeChild = new() 238using Control emptyChild = new() 242using Control emptyChildWithMargin = new() 247using Control child3 = new() 252using Control child4 = new()
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (58)
159using Control child = new(); 168using Control child = new(); 209using Control child = new(); 219using Control child = new(); 229using Control child = new(); 239using Control child = new(); 251using Control child = new(); 258using Control child = new(); 299using Control child = new(); 308using Control child = new(); 317using Control child = new(); 352using Control child = new(); 359using Control child = new(); 400using Control child = new(); 409using Control child = new(); 460using Control child = new(); 497using Control parent = new(); 498using Control child = new() 550using Control child = new(); 572using Control parent = new(); 573using Control child = new() 621using Control child = new(); 635using Control child = new(); 684using Control child = new(); 716using Control parent = new(); 717using Control child = new() 773using Control child = new(); 799using Control parent = new(); 800using Control child = new() 841using Control child = new(); 855using Control child = new(); 922using Control child = new(); 951using Control parent = new(); 952using Control child = new() 1006using Control child = new(); 1030using Control parent = new(); 1031using Control child = new() 1072using Control child = new(); 1086using Control child = new(); 1160using Control child = new(); 1192using Control parent = new(); 1193using Control child = new() 1249using Control child = new(); 1275using Control parent = new(); 1276using Control child = new() 1317using Control child = new(); 1331using Control child = new(); 1398using Control child = new(); 1427using Control parent = new(); 1428using Control child = new() 1482using Control child = new(); 1506using Control parent = new(); 1507using Control child = new() 1548using Control child = new(); 1562using Control child = new(); 1660using Control controlWithName = new() 1664using Control controlWithDefaultName = new(); 1777using Control controlWithName = new() { Name = "name" };
System\Windows\Forms\LayoutEventArgsTests.cs (3)
14yield return new object[] { new Control(), "" }; 31yield return new object[] { new Control(), "" }; 32yield return new object[] { new Control(), "affectedProperty" };
System\Windows\Forms\ListBoxTests.cs (1)
928using Control parent = new();
System\Windows\Forms\MdiClientTests.cs (7)
179using Control parent = new() 258using Control parent = new() 374using Control parent = new() 418using Control parent = new() 696using Control parent = new(); 845using Control parent = new() 1007using Control parent = new()
System\Windows\Forms\MenuStripTests.cs (1)
697using Control parent = new();
System\Windows\Forms\MixedDpiHostingTests.cs (1)
27using Control control = new();
System\Windows\Forms\NativeWindowTests.cs (12)
20using Control control = new(); 49using Control control = new(); 86using Control control = new(); 143using Control control = new(); 172using Control control = new(); 236using Control control = new(); 293using Control control = new(); 338using Control control = new(); 404using Control control = new(); 414using Control control = new(); 426using Control control = new(); 472using Control control = new();
System\Windows\Forms\PanelTests.cs (5)
255using Control parent = new(); 352_layoutEngine = new Control().LayoutEngine; 403using Control parent = new(); 612using Control child = new() 627using Control child = new()
System\Windows\Forms\PictureBoxTests.cs (7)
238using Control control = new() 257using Control control = new(); 275using Control control = new() 1117yield return new object[] { new Control() }; 1140using Control oldParent = new(); 1159using Control parent = new(); 1176using Control parent = new();
System\Windows\Forms\ReadOnlyControlCollectionTests.cs (1)
11using Control owner = new();
System\Windows\Forms\RichTextBoxTests.cs (8)
460using Control parent = new(); 677using Control control = new(); 2131using Control parent = new(); 2187using Control parent = new(); 2962using Control parent = new(); 3085using Control parent = new(); 7100using Control parent = new(); 7328using Control parent = new();
System\Windows\Forms\ScreenTests.cs (3)
66yield return new object[] { new Control() }; 68Control createdControl = new(); 99using Control control = new();
System\Windows\Forms\ScrollableControlTests.cs (6)
1392yield return new object[] { true, new LayoutEventArgs(affectedControl = new Control(), "affectedProperty"), 2, affectedControl }; 1396yield return new object[] { false, new LayoutEventArgs(affectedControl = new Control(), "affectedProperty"), 1, affectedControl }; 1568Func<Control> controlFactory = () => new Control 1663static Control CreateControl() => new() 1821using Control parent = new() 2484yield return new object[] { true, true, true, new Size(70, 80), new Control(), new Rectangle(0, 0, 70, 80) };
System\Windows\Forms\SplitterPanelTests.cs (4)
214using Control parent = new(); 275using Control parent = new(); 713yield return new object[] { new Control() }; 737using Control parent = new();
System\Windows\Forms\SplitterTests.cs (12)
1140using Control parent = new() 1195using Control parent = new() 1200using Control child = new() 1240using Control parent = new() 1245using Control child = new() 1312using Control parent = new() 1359using Control parent = new() 1364using Control child = new() 2007using Control parent = new() 2012using Control child = new() 2108using Control parent = new() 2113using Control child = new()
System\Windows\Forms\StatusStripTests.cs (1)
1132yield return new object[] { layoutStyle, dock, new LayoutEventArgs(new Control(), "AffectedProperty") };
System\Windows\Forms\TabControl.ControlCollectionTests.cs (3)
875using Control value = new(); 1455using Control value1 = new(); 1456using Control value2 = new();
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (8)
1084yield return new object[] { new Control() }; 1588Assert.False(iList.Contains(new Control())); 1600Assert.False(iList.Contains(new Control())); 1893Assert.Equal(-1, iList.IndexOf(new Control())); 1905Assert.Equal(-1, iList.IndexOf(new Control())); 3133yield return new object[] { new Control() }; 3930yield return new object[] { new Control() }; 4795yield return new object[] { new Control() };
System\Windows\Forms\TableLayoutControlCollectionTests.cs (3)
32using Control child = new(); 44using Control child = new(); 56using Control child = new();
System\Windows\Forms\TableLayoutPanelTests.cs (62)
343using Control child = new(); 363using Control child = new(); 497using Control controlWithName = new() { Name = "name" }; 498using Control controlWithDefaultName = new(); 646using Control child = new(); 661using Control child = new(); 670using Control child = new(); 679using Control child = new(); 694using Control child = new(); 735using Control child = new(); 775using Control child = new(); 795using Control child = new() 818using Control child = new() 840using Control otherChild = new(); 841using Control child = new() 888using Control child = new(); 902using Control child = new(); 914using Control child = new(); 932using Control child = new(); 1140using Control child = new(); 1320yield return new object[] { new LayoutEventArgs(new Control(), null) }; 1321yield return new object[] { new LayoutEventArgs(new Control(), string.Empty) }; 1322yield return new object[] { new LayoutEventArgs(new Control(), "ChildIndex") }; 1323yield return new object[] { new LayoutEventArgs(new Control(), "Visible") }; 1324yield return new object[] { new LayoutEventArgs(new Control(), "Items") }; 1325yield return new object[] { new LayoutEventArgs(new Control(), "Rows") }; 1326yield return new object[] { new LayoutEventArgs(new Control(), "Columns") }; 1327yield return new object[] { new LayoutEventArgs(new Control(), "RowStyles") }; 1328yield return new object[] { new LayoutEventArgs(new Control(), "ColumnStyles") }; 1329yield return new object[] { new LayoutEventArgs(new Control(), "TableIndex") }; 1330yield return new object[] { new LayoutEventArgs(new Control(), "GrowStyle") }; 1331yield return new object[] { new LayoutEventArgs(new Control(), "CellBorderStyle") }; 1332yield return new object[] { new LayoutEventArgs(new Control(), "LayoutSettings") }; 1333yield return new object[] { new LayoutEventArgs(new Control(), "NoSuchProperty") }; 1505using Control child1 = new(); 1510using Control child2 = new(); 1555using Control child = new(); 1591using Control parent = new(); 1592using Control child = new() 1642using Control child = new(); 1666using Control child = new(); 1697using Control parent = new(); 1698using Control child = new() 1748using Control child = new(); 1768Assert.Throws<ArgumentOutOfRangeException>("column", () => control.SetColumn(new Control(), -2)); 1777using Control child = new(); 1806using Control parent = new(); 1807using Control child = new() 1857using Control child = new(); 1882Assert.Throws<ArgumentOutOfRangeException>("value", () => control.SetColumnSpan(new Control(), value)); 1893using Control child = new(); 1924using Control parent = new(); 1925using Control child = new() 1975using Control child = new(); 1995Assert.Throws<ArgumentOutOfRangeException>("row", () => control.SetRow(new Control(), -2)); 2004using Control child = new(); 2033using Control parent = new(); 2034using Control child = new() 2084using Control child = new(); 2108Assert.Throws<ArgumentOutOfRangeException>("value", () => control.SetRowSpan(new Control(), value)); 2114using Control extendee = new(); 2126yield return new object[] { new Control() };
System\Windows\Forms\TabPageTests.cs (6)
2613using Control parent = new(); 3814using Control parent = new() 3818using Control control = new() 3830using Control grandparent = new(); 3831using Control parent = new() 3835using Control control = new()
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (2)
28using Control control1 = new(); 29using Control control2 = new();
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
100using Control control = new();
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
494using Control parent = new(); 555using Control parent = new(); 634using Control parent = new()
System\Windows\Forms\ToolStripControlHostTests.cs (167)
18yield return new object[] { new Control() }; 21new Control 39yield return new object[] { new Control { Enabled = false } }; 40yield return new object[] { new Control { Visible = false } }; 137using Control c = new(); 156using Control c = new(); 167using Control c = new(); 186using Control c = new(); 197using Control c = new(); 216using Control c = new(); 227using Control c = new(); 247using Control c = new(); 255using Control c = new(); 266using Control c = new(); 285using Control c = new(); 321using Control c = new(); 332using Control c = new(); 349using Control c = new(); 363using Control c = new(); 380using Control c = new(); 389using Control c = new(); 408using Control c = new(); 427using Control c = new(); 438using Control c = new(); 449using Control c = new(); 468using Control c = new(); 492using Control c = new() 506using Control c = new(); 516using Control c = new(); 541using Control c = new(); 555using Control c = new(); 567using Control c = new(); 578using Control c = new(); 593using Control c = new(); 612using Control c = new(); 624using Control c = new(); 638using Control c = new(); 652using Control c = new(); 662using Control c = new(); 676using Control c = new(); 698using Control c = new() 723using Control c = new(); 743using Control c = new(); 751using Control c = new(); 762using Control c = new(); 779using Control c = new(); 815using Control c = new(); 824using Control c = new(); 841using Control c = new(); 864using Control c = new(); 891using Control c = new(); 926using Control c = new(); 936using Control c = new(); 946using Control c = new(); 966using Control c = new(); 987using Control c = new(); 999using Control c = new(); 1025using Control c = new(); 1039using Control c = new(); 1065using Control c = new(); 1074using Control c = new(); 1085using Control c = new(); 1104using Control c = new(); 1140using Control c = new(); 1151using Control c = new(); 1168using Control c = new(); 1182using Control c = new(); 1199using Control c = new(); 1220using Control c = new(); 1242using Control c = new(); 1262using Control c = new(); 1273using Control c = new(); 1295using Control c = new(); 1317using Control c = new(); 1346using Control c = new(); 1387using Control c = new(); 1455using Control c = new(); 1530using Control c = new(); 1546using Control c = new(); 1557using Control c = new(); 1577using Control c = new(); 1596using Control c = new(); 1633using Control c = new(); 1642using Control c = new(); 1671using Control c = new(); 1685using Control c = new(); 1714using Control c = new(); 1725using Control c = new(); 1747using Control c = new(); 1770using Control c = new(); 1816using Control c = new(); 1837using Control c = new(); 1858using Control c = new(); 1880using Control c = new(); 1916using Control c = new(); 1945using Control c = new(); 1968using Control c = new(); 1986using Control c = new(); 2007using Control c = new(); 2026using Control c = new(); 2046using Control c = new(); 2068using Control c = new(); 2087using Control c = new(); 2107using Control c = new(); 2127using Control c = new(); 2159using Control c = new(); 2178using Control c = new(); 2204using Control c = new() 2228using Control c = new(); 2249using Control c = new(); 2268using Control c = new(); 2305using Control c = new(); 2323using Control c = new(); 2340using Control c = new(); 2356using Control c = new(); 2365using Control c = new(); 2385using Control c = new(); 2406using Control c = new(); 2436using Control c = new(); 2472using Control c = new(); 2510using Control c = new(); 2530using Control c = new(); 2548using Control c = new(); 2563using Control c = new(); 2575using Control c = new(); 2617using Control c = new(); 2659using Control c = new(); 2691using Control c = new(); 2701using Control c = new(); 2721using Control c = new() 2736using Control c = new() 2754using Control c = new(); 2768using Control c = new() 2792using Control c = new(); 2806using Control c = new(); 2831using Control c = new(); 2856using Control c = new() 2874using Control c = new(); 2899using Control c = new(); 2924using Control c = new(); 2949using Control c = new(); 2962using Control c = new(); 2987using Control c = new(); 3012using Control c = new(); 3057using Control c = new(); 3076using Control c = new(); 3100using Control c = new(); 3169using Control controlParent = new(); 3170using Control c = new() 3244using Control c = new(); 3265using Control c = new(); 4136using Control c = new(); 4145using Control c = new(); 4170using Control c = new(); 4199using Control c = new(); 4240using Control c = new(); 4256using Control c = new(); 4300using Control c = new(); 4315using Control c = new(); 4356using Control c = new(); 4388using Control c = new(); 4411using Control c = new(); 4421using Control c = new(); 4444using Control c = new(); 4455using Control c = new(); 4489using Control c = new(); 4525using Control c = new();
System\Windows\Forms\ToolStripDropDownTests.cs (19)
701using Control parent = new(); 1323using Control parent = new() 1355using Control parent = new() 1485using Control parent = new() 2327using Control sourceControl = new() 2359using Control sourceControl = new() 2910using Control parent = new(); 3090using Control sourceControl = new() 3371using Control sourceControl = new() 3430using Control sourceControl = new() 4136yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2 }; 4140yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1 }; 4186yield return new object[] { autoSize, new LayoutEventArgs(new Control(), "affectedProperty") }; 4329yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2, 3 }; 4333yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1, 1 }; 4494yield return new object[] { true, new LayoutEventArgs(new Control(), "affectedProperty"), 2, 3 }; 4498yield return new object[] { false, new LayoutEventArgs(new Control(), "affectedProperty"), 1, 1 }; 4989using Control control = new(); 5021using Control control = new();
System\Windows\Forms\ToolStripTests.cs (12)
912using Control parent = new(); 1084using Control parent = new() 1401using Control parent = new() 1874using Control parent = new() 1905using Control parent = new() 2455using Control parent = new(); 2919using Control parent = new(); 5031yield return new object[] { new ControlEventArgs(new Control()) }; 5910Control control = new() 5958Control control = new() 6160using Control parent = new() 6919using Control parent = new();
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
34Control control = new();
System\Windows\Forms\ToolTipTests.cs (8)
622yield return new object[] { new Control(), true }; 636yield return new object[] { new Control() }; 650using Control control = new(); 673using Control control = new(); 694using Control control = new(); 721using Control control = new(); 749using Control control = new(); 807using Control topLevelControl = new();
System\Windows\Forms\UpDownBaseTests.cs (1)
1964yield return new object[] { borderStyle, rightToLeft, upDownAlign, new LayoutEventArgs(new Control(), "affectedProperty") };
System\Windows\Forms\UserControlTests.cs (14)
312using Control parent = new(); 360using Control parent = new(); 467_layoutEngine = new Control().LayoutEngine; 518using Control parent = new(); 1260using Control child1 = new(); 1261using Control grandchild1 = new(); 1264using Control grandchild2 = new(); 1486using Control child1 = new(); 1487using Control grandchild1 = new(); 1490using Control grandchild2 = new(); 1720using Control child1 = new(); 1721using Control child2 = new(); 1750using Control child1 = new(); 1751using Control child2 = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (3)
354using Control childControl = new(); 381using Control childControl = new(); 392using Control childControl = new();
System\Windows\Forms\WebBrowserTests.cs (136)
159using Control parent = new(); 187using Control parent = new(); 226using Control parent = new(); 240using Control parent = new(); 252using Control parent = new(); 290using Control parent = new(); 326using Control parent = new(); 339using Control parent = new(); 351using Control parent = new(); 371using Control parent = new(); 396using Control parent = new(); 410using Control parent = new(); 438using Control parent = new(); 454using Control parent = new(); 476using Control parent = new(); 488using Control parent = new(); 509using Control parent = new(); 523using Control parent = new(); 544using Control parent = new(); 556using Control parent = new(); 568using Control parent = new(); 593using Control parent = new(); 605using Control parent = new(); 626using Control parent = new(); 640using Control parent = new(); 661using Control parent = new(); 673using Control parent = new(); 707using Control parent = new(); 730using Control parent = new(); 829using Control parent = new(); 841using Control parent = new(); 862using Control parent = new(); 879using Control parent = new(); 898using Control parent = new(); 910using Control parent = new(); 931using Control parent = new(); 945using Control parent = new(); 965using Control parent = new(); 977using Control parent = new(); 998using Control parent = new(); 1012using Control parent = new(); 1031using Control parent = new(); 1043using Control parent = new(); 1064using Control parent = new(); 1107using Control parent = new(); 1121using Control parent = new(); 1140using Control parent = new(); 1152using Control parent = new(); 1173using Control parent = new(); 1187using Control parent = new(); 1199using Control parent = new(); 1237using Control parent = new(); 1290using Control parent = new(); 1417using Control parent = new(); 1436using Control parent = new() 1458using Control parent = new(); 1478using Control parent = new(); 1497using Control parent = new() 1519using Control parent = new(); 1594using Control parent = new(); 1608using Control parent = new(); 1627using Control parent = new(); 1639using Control parent = new(); 1660using Control parent = new(); 1674using Control parent = new(); 1686using Control parent = new(); 1724using Control parent = new(); 1758using Control parent = new(); 1771using Control parent = new(); 1809using Control parent = new(); 1845using Control parent = new(); 1859using Control parent = new(); 1878using Control parent = new(); 1890using Control parent = new(); 1911using Control parent = new(); 1925using Control parent = new(); 1944using Control parent = new(); 1956using Control parent = new(); 1968using Control parent = new(); 2063using Control parent = new(); 2094using Control parent = new(); 2106using Control parent = new(); 2118using Control parent = new(); 2276using Control parent = new(); 2356using Control parent = new(); 2383using Control parent = new(); 2441using Control parent = new(); 2461using Control parent = new(); 2485using Control parent = new(); 2572using Control parent = new(); 2675using Control parent = new(); 2719using Control parent = new(); 2864using Control parent = new(); 2885using Control parent = new(); 2965using Control parent = new(); 2987using Control parent = new(); 3002using Control parent = new(); 3080using Control parent = new(); 3102using Control parent = new(); 3117using Control parent = new(); 3129using Control parent = new(); 3151using Control parent = new(); 3166using Control parent = new(); 3178using Control parent = new(); 3190using Control parent = new(); 3279using Control parent = new(); 3302using Control parent = new(); 3397using Control parent = new(); 3420using Control parent = new(); 3468using Control parent = new(); 3484using Control parent = new(); 3602Control parent = new(); 3642using Control parent = new(); 3654using Control parent = new(); 3919using Control parent = new(); 3941using Control parent = new(); 3956using Control parent = new(); 4014using Control parent = new(); 4086using Control parent = new(); 4103using Control parent = new(); 4163using Control parent = new(); 4221using Control parent = new(); 4244using Control parent = new(); 4259using Control parent = new(); 4281using Control parent = new(); 4296using Control parent = new(); 4318using Control parent = new(); 4333using Control parent = new(); 4355using Control parent = new(); 4370using Control parent = new(); 4392using Control parent = new(); 4407using Control parent = new(); 4429using Control parent = new(); 4444using Control parent = new(); 4523using Control control = new(); 4597using Control control = new();
TextBoxBaseTests.cs (10)
285using Control parent = new(); 579using Control parent = new(); 2006using Control parent = new(); 2065using Control parent = new(); 3725using Control parent = new(); 3775using Control parent = new(); 5861using Control parent = new(); 6040using Control parent = new(); 6972using Control control = new(); 7053using Control control = new();
WebBrowserBaseTests.cs (2)
237using Control parent = new(); 812using Control parent = new()
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
145new(new Control(), "affectedProperty")
5324 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)
383Control view = surface.GetView();
DesignSurfaceExt (15)
DesignerSerializationServiceImpl.cs (1)
40if (obj is Control)
DesignSurfaceExt.cs (11)
89where TControl : Control, IComponent 120Control ctrl = null; 124ctrl = View as Control; 134ctrl = View as Control; 144ctrl = View as Control; 162where TControl : Control 187((Control)newComp).Parent = host.RootComponent as Control; 234public Control GetView() 236Control ctrl = View as Control;
IDesignSurfaceExt.cs (3)
27where TControl : Control, IComponent; 30where TControl : Control; 42Control 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)
92private void ApplyDialogFont(Control control) 95foreach (Control c in control.Controls) 133private void ApplyDialogFontToPropertyGrid(Control control)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
266System.Windows.Forms.Control rmPublishingDialog = 267System.Windows.Forms.Control.FromHandle(hWndParent) as RMPublishingDialog;
System.Windows.Forms (1005)
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)
275/// Note that the default behavior for <see cref="Control"/> is that it calls base from its override in 276/// <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)
18public class ControlAccessibleObject : AccessibleObject, IOwnedObject<Control> 30private readonly WeakReference<Control> _ownerControl; 32public ControlAccessibleObject(Control ownerControl) 37internal ControlAccessibleObject(Control ownerControl, int accObjId) 58=> this.TryGetOwnerAs(out Control? owner) ? owner.Name : string.Empty; 65if (!this.TryGetOwnerAs(out Control? owner) || owner.ToolStripControlHost is not ToolStripControlHost host) 85=> this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.ContainerControl) 122if (!this.TryGetOwnerAs(out Control? owner)) 131Control? parentControl = owner.ParentInternal; 135Control[]? ctrls = null; 232/// the <see cref="Control.Handle"/> property of the <see cref="Owner"/> it is associated with. 275if (this.TryGetOwnerAs(out Control? owner) 289&& (!this.TryGetOwnerAs(out Control? owner) 312if (this.TryGetOwnerAs(out Control? owner) && owner.AccessibleName is { } name) 325if (this.TryGetOwnerAs(out Control? owner)) 349if (this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.UseTextForAccessibility)) 382public Control? Owner => _ownerControl.TryGetTarget(out Control? owner) ? owner : null; 394if (!this.TryGetOwnerAs(out Control? owner) || owner.ParentInternal is not { } parent) 406for (Control? previous = container.GetNextControl(owner, false); 438if (!this.TryGetOwnerAs(out Control? owner) 455&& (!this.TryGetOwnerAs(out Control? owner) 491if (this.TryGetOwnerAs(out Control? owner)) 502=> (this.TryGetOwnerAs(out Control? owner) && owner.SupportsUiaProviders && patternId == UIA_PATTERN_ID.UIA_LegacyIAccessiblePatternId) 530=> this.IsOwnerHandleCreated(out Control? _) && base.RaiseAutomationEvent(eventId); 533=> 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)
247private Control? _parent; 248private WeakReference<Control>? _reflectParent; 302/// Initializes a new instance of the <see cref="Control"/> class. 385/// Initializes a new instance of the <see cref="Control"/> class. 392/// Initializes a new instance of the <see cref="Control"/> class. 399/// Initializes a new instance of the <see cref="Control"/> class. 401public Control(Control? parent, string? text) : this() 408/// Initializes a new instance of the <see cref="Control"/> class. 410public Control(Control? parent, string? text, int left, int top, int width, int height) : this(parent, text) 782Control? parent = ParentInternal; 950Control? parent = ParentInternal; 1398if (container.ParentInternal is not Control parent 1621Control? control = ParentInternal; 2167Control topMost = TopMostParent; 2233Control? parent = ParentInternal; 2295Control control; 2302Control marshalingControl = FindMarshalingControl(); 2346private static ISite? GetSitedParentSite(Control control) 2614public Control? Parent 2620internal virtual Control? ParentInternal 2692private Control? ReflectParent 2694get => _reflectParent?.TryGetTarget(out Control? parent) ?? false ? parent : null; 2699Control? existing = ReflectParent; 3145for (Control? control = this; control is not null; control = control.ParentInternal) 3189public Control? TopLevelControl => TopLevelControlInternal; 3191internal Control? TopLevelControlInternal 3195Control? control = this; 3205internal Control TopMostParent 3209Control control = this; 4145internal virtual void AssignParent(Control? value) 4284Control marshaler = FindMarshalingControl(); 4338for (Control? ctl = this; ctl is not null; ctl = ctl._parent) 4353internal static void CheckParentingCycle(Control? bottom, Control? toFind) 4356Control? lastParent = null; 4358for (Control? ctl = bottom; ctl is not null; ctl = ctl.ParentInternal) 4391private void ChildGotFocus(Control child) 4404public bool Contains([NotNullWhen(true)] Control? ctl) 4583Control[] controlSnapshot = new Control[children.Count]; 4586foreach (Control control in controlSnapshot) 4681/// Disposes of the resources (other than memory) used by the <see cref="Control"/>. 4743Control child = children[i]; 4966Control marshaler = FindMarshalingControl(); 5012Control? current = this; 5027private Control FindMarshalingControl() 5031Control? c = this; 5035Control? p = c.ParentInternal; 5136public static Control? FromChildHandle(IntPtr handle) 5141Control? control = FromHandle(hwnd); 5155/// it with the first parent <see cref="Control"/> if possible. 5163public static Control? FromHandle(IntPtr handle) 5212public Control? GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue) 5223Control? control = FromChildHandle(hwnd); 5236public Control? GetChildAtPoint(Point pt) => GetChildAtPoint(pt, GetChildAtPointSkip.None); 5244Control? c = IsContainerControl ? ParentInternal : this; 5254private static bool IsFocusManagingContainerControl(Control ctl) 5353Control? control = this; 5384Control? ctl = FromHandle(hWndChild); 5406internal Control[] GetChildControlsInTabOrder(bool handleCreatedOnly) 5410foreach (Control c in Controls) 5420Control[] controls = new Control[holders.Count]; 5429internal virtual Control? GetFirstChildControlInTabOrder(bool forward) 5436Control? found = null; 5512public Control? GetNextControl(Control? ctl, bool forward) 5523Control? found = ctl.GetFirstChildControlInTabOrder(forward: true); 5534Control? found = null; 5535Control? p = ctl._parent; 5597Control? found = null; 5598Control? parent = ctl._parent ?? throw new InvalidOperationException( 5618Control sibling = siblings[c]; 5678Control? found = ctl.GetFirstChildControlInTabOrder(forward: false); 5695/// Return <see cref="Handle"/> if <paramref name="window"/> is a <see cref="Control"/>. 5701if (window is Control control) 5973Control marshaler = FindMarshalingControl(); 6167protected void InvokePaint(Control c, PaintEventArgs e) 6172protected void InvokePaintBackground(Control c, PaintEventArgs e) 6183/// Returns <see langword="true"/> if <paramref name="descendant"/> is a descendant of this <see cref="Control"/>. 6185internal bool IsDescendant(Control? descendant) 6187Control? control = descendant; 6329private static bool IsScaledByParent(Control control) 6331Control? parentControl = control.Parent; 6387private object MarshaledInvoke(Control caller, Delegate method, object?[]? args, bool synchronous) 6560protected void InvokeOnClick(Control? toInvoke, EventArgs e) 6690internal virtual void OnChildLayoutResuming(Control child, bool performLayout) 6995Control? parent = ParentInternal; 7171Control child = children[i]; 7556protected void InvokeGotFocus(Control? toInvoke, EventArgs e) 7717protected void InvokeLostFocus(Control? toInvoke, EventArgs e) 8047/// This is called in the <see cref="Control"/> constructor before calculating the initial <see cref="Size"/>. 8189Control? parent = ParentInternal; 8319for (Control? c = ParentInternal; c is not null; c = c.ParentInternal) 8357public void PerformLayout(Control? affectedControl, string? affectedProperty) 8473foreach (Control c in Controls) 8606/// on the <see cref="Control"/> referenced by the <paramref name="msg"/> <see cref="Message.HWnd"/>. It 8621internal static PreProcessControlState PreProcessControlMessageInternal(Control? target, ref Message message) 8768Control child = Controls[i]; 8971Control? topMostParent = null; 9167Control?[]? controlSnapshot = null; 9180controlSnapshot = new Control[children.Count]; 9183Control childControl = children[i]; 9242Control? childControl = controlSnapshot[i]; 9448Control child = children[i]; 9565internal virtual void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9601internal void ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9610Control child = children[i]; 9869public bool SelectNextControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9871Control? nextSelectableControl = GetNextSelectableControl(ctl, forward, tabStopOnly, nested, wrap); 9883private Control? GetNextSelectableControl(Control? ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 9891Control? start = ctl; 9942((Control)c).SelectNextControl(this, true, true, true, true); 10434internal static AutoValidate GetAutoValidateForControl(Control control) 10835private void UpdateChildControlIndex(Control control) 10842if (this is TabControl || GetType() == typeof(Control)) 10852Control? previousControl = FromHandle(hWnd); 10911private void UpdateChildZOrder(Control control) 10921Control child = Controls[i]; 11096internal void WmContextMenu(ref Message m, Control sourceControl) 11136Control? control = FromHandle(m.LParamInternal); 12749Control? controlParent = ParentInternal; 12766void AddIfCreated(Control? control) 12825internal 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)
1512internal override void AssignParent(Control? value) 2667EditingControl = (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) 986if (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)
140private Control RTLGrip
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
2432internal 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) 3588=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3626internal 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)
57return Control.DefaultFont; 106sysFont ??= Control.DefaultFont; 261private static bool IsOnSameWindow(Control control1, Control control2) 586internal static ToolStripPanel? ToolStripPanelFromPoint(Control draggedControl, Point screenLocation) 764Control? activeControl = Control.FromChildHandle(m.HWnd); 765Control? activeControlInChain = activeControl; 854if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 897Control? intendedControl = Control.FromHandle(m.HWnd); 898Control? toplevelControl = null; 967internal static MenuStrip? GetMainMenuStrip(Control control) 986private 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)
33public ToolStripPanelCell(Control control) 38public ToolStripPanelCell(ToolStripPanelRow? parent, Control control) 70public 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\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)
97Rectangle screen = Screen.GetWorkingArea(Control.MousePosition); 184ownerHwnd = Control.GetSafeHandle(owner); 189ownerHwnd = 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)
460handle = 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) 677return extendee is Control and not Form; 711private ControlItem EnsureControlItem(Control control) 727internal ErrorWindow EnsureErrorWindow(Control parent) 745public string GetError(Control control) => EnsureControlItem(control).Error; 754public ErrorIconAlignment GetIconAlignment(Control control) => EnsureControlItem(control).IconAlignment; 763public int GetIconPadding(Control control) => EnsureControlItem(control).IconPadding; 781public void SetError(Control control, string? value) 805public void SetIconAlignment(Control control, ErrorIconAlignment value) 813public 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)
9/// 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)
140if (!Control.UseComponentModelRegisteredTypes) 156if (!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)
17private Control? _activeControl; 22private Control? _focusedControl; 27private Control? _unvalidatedControl; 284public Control? ActiveControl 385bool IContainerControl.ActivateControl(Control control) 390internal bool ActivateControl(Control control) 395internal bool ActivateControl(Control? control, bool originator) 401Control? parent = ParentInternal; 437Control? ctl = null; 465internal virtual void AfterControlRemoved(Control control, Control oldParent) 507Control? parent = cc.ParentInternal; 531private bool AssignActiveControlInternal(Control? value) 614private static void EnableRequiredScaling(Control start, bool enable) 617foreach (Control c in start.Controls) 647Control? parent = containerControl.ParentInternal; 667Control? parentControl = Parent; 801internal override void OnChildLayoutResuming(Control child, bool performLayout) 1032internal static void ResumeAllLayout(Control start, bool performLayout) 1050internal static void SuspendAllLayout(Control start) 1071internal override void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 1165Control? group = this; 1257Control? start = ActiveControl; 1274Control? ctl = start; 1326private static ScrollableControl? FindScrollableParent(Control ctl) 1328Control? current = ctl.ParentInternal; 1339Control? last = _activeControl; 1456internal void SetActiveControl(Control? value) 1545Control? pathControl = _focusedControl; 1552Control? nextControlDown = _activeControl; 1555Control? parent = nextControlDown!.ParentInternal; 1564Control? priorFocusedControl = _focusedControl = pathControl; 1594Control? stopControl = null; 1629Control leaveControl = pathControl; 1681private void EnsureUnvalidatedControl(Control? candidate) 1734private void EnterValidation(Control enterControl) 1758Control? commonAncestor = enterControl; 1821Control? controlToValidate = _unvalidatedControl ?? _focusedControl; 1869private bool ValidateThroughAncestor(Control? ancestorControl, bool preventFocusChangeOnError) 1894Control? currentActiveControl = _activeControl; 1895Control? 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)
8using static System.Windows.Forms.Control; 347return LocalAppContextSwitches.AnchorLayoutV2 && element is Control; 520Control control = (Control)element; 666if (container is Control control) 687private static void UpdateAnchorsIteratively(Control control) 722UpdateAnchorsIteratively((Control)element); 827internal static void UpdateAnchorInfoV2(Control control) 835Control? parent = control.Parent; 944using (new LayoutTransaction(element.Container as Control, element, PropertyNames.Dock)) 1097(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\DragDropHelper.cs (1)
520if (Control.CheckForIllegalCrossThreadCalls && Application.OleRequired() != ApartmentState.STA)
System\Windows\Forms\OLE\DragEventArgs.cs (3)
7/// Provides data for the <see cref="Control.DragDrop"/>, <see cref="Control.DragEnter"/>, 8/// 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)
24if (_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)
2533Control control, 2587Control 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)
349Control current = Controls[i]; 408Control current = Controls[i]; 416Control richCurrent = current; 811Control ctl = Controls[i]; 823public void ScrollControlIntoView(Control? activeControl) 852protected 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 (724)
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\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\CompositionDesigner.cs (3)
22public Control Control => throw new NotImplementedException(SR.NotImplementedByDesign); 57Control IOleDragClient.GetDesignerControl() 62Control IOleDragClient.GetControlForComponent(object component)
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>().ToList();
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 (12)
22private Control[]? _dragControls; // the set of controls we're dragging 43_dragControls = new Control[components.Length]; 69Control containerControl = GetControl(); 88private static void CancelControlMove(Control[] controls, BoundsInfo[] bounds) 98Control? parent = controls[i].Parent; 117Control? parent = controls[i].Parent; 165protected abstract Control GetControl(); 170protected abstract Control GetControl(IComponent component); 213Control[] controls = _dragControls!; 274Control? parent = controls[i].Parent; 521Control? parent = controls[i].Parent; 619public 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 (77)
ControlDesignerTests.cs (5)
35Control _ = controlDesigner.Control; 157using Control control = _designer.Control; 201using Control childControl = new(); 218using Control childControl = new(); 345PropertyDescriptor? dockPropDescriptor = TypeDescriptor.GetProperties(_designer._control)[nameof(Control.Dock)];
SplitContainerDesignerTests.cs (2)
20.Setup(s => s.GetDesigner(It.IsAny<Control>())) 43using Control control = new();
System\ComponentModel\Design\ByteViewerTests.cs (3)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 78Assert.Equal(Control.DefaultFont, control.Font); 80Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\ComponentModel\Design\MultilineStringEditorTests.cs (2)
39.Setup(e => e.DropDownControl(It.IsAny<Control>())) 43mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\ComponentModel\Design\ObjectSelectorEditorTests.cs (2)
49.Setup(e => e.DropDownControl(It.IsAny<Control>())) 53mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Drawing\Design\ColorEditorTests.cs (2)
41.Setup(e => e.DropDownControl(It.IsAny<Control>())) 45mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Drawing\Design\CursorEditorTests.cs (2)
40.Setup(e => e.DropDownControl(It.IsAny<Control>())) 44mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\AnchorEditorTests.cs (6)
42.Setup(e => e.DropDownControl(It.IsAny<Control>())) 46mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once()); 87var anchorUI = (Control)Activator.CreateInstance(type); 88var item = (Control)anchorUI.GetType()
System\Windows\Forms\Design\BorderSidesEditorTests.cs (2)
40.Setup(e => e.DropDownControl(It.IsAny<Control>())) 44mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\ContentAlignmentEditorTests.cs (4)
27var contentUI = (Control)Activator.CreateInstance(type); 28var item = (Control)contentUI.GetType()
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (16)
13private readonly Control _control; 62using Control control = new(); 64_control.Controls.Cast<Control>().Should().Contain(control); 70using Control control1 = new(); 71using Control control2 = new(); 72Control[] controls = [control1, control2]; 74_control.Controls.Cast<Control>().Should().Contain(controls); 80using Control control = new(); 107using Control control = new(); 115using Control control = new(); 116using Control anotherControl = new(); 126using Control control = new(); 135using Control control = new(); 144using Control control = new(); 152using Control control = new(); 161using Control control = new();
System\Windows\Forms\Design\DesignerToolStripControlHostTests.cs (1)
13using Control control = new();
System\Windows\Forms\Design\DockEditorTests.cs (2)
40.Setup(e => e.DropDownControl(It.IsAny<Control>())) 44mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\EventHandlerServiceTests.cs (1)
14using Control focusWnd = new();
System\Windows\Forms\Design\FormatControlTests.cs (1)
17_formatControl.Should().BeAssignableTo<Control>();
System\Windows\Forms\Design\FormatStringDialogTests.cs (2)
88static int GetRightSideOffset(Control ctl) 91Control? 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)
11public static InheritedPropertyDescriptor GetInheritedPropertyDescriptor(this Control control, string property)
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (8)
14using Control control = new(); 15InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Size)); 28using Control control = new(); 29InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Anchor)); 46using Control control = new(); 47InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.BackColor)); 60using Control control = new(); 61InheritedPropertyDescriptor inheritedPropertyDescriptor = control.GetInheritedPropertyDescriptor(nameof(Control.Visible));
System\Windows\Forms\Design\ShortcutKeysEditorTests.cs (2)
40.Setup(e => e.DropDownControl(It.IsAny<Control>())) 44mockEditorService.Verify(e => e.DropDownControl(It.IsAny<Control>()), Times.Once());
System\Windows\Forms\Design\TabControlDesignerTests.cs (2)
65Control? control = Activator.CreateInstance(controlType) as Control;
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
68using Control control = new(); 84var value = field?.GetValue(_designer) as Control[];
TestControlDesigner.cs (2)
59internal bool EnableDesignModeMethod(Control child, string name) 79internal void HookChildControlsMethod(Control firstChild)
TestControlDesigner.Mocks.cs (2)
14internal readonly Control _control = new(); 24.Setup(s => s.GetDesigner(It.IsAny<Control>()))
ToolStripMenuItemDesignerTest.cs (2)
104.Setup(s => s.GetDesigner(It.IsAny<Control>())) 133.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 (3415)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (8)
544using Control first = new(); 545using Control second = new(); 572using Control control = new(); 631using Control control = new(); 697using Control control = new(); 716using Control control = new(); 735using Control control = new(); 2161using Control control = new();
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (2)
290private class ControlAccessibleObjectWithNotificationCounter : Control.ControlAccessibleObject 294public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (164)
50using Control ownerControl = new(); 51var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 74using Control ownerControl = new(); 83var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 109Assert.Throws<ArgumentNullException>("ownerControl", () => new Control.ControlAccessibleObject(null)); 115using Control ownerControl = new(); 118Assert.IsType<Control.ControlAccessibleObject>(accessibleObject); 120Control.ControlAccessibleObject controlAccessibleObject = (Control.ControlAccessibleObject)accessibleObject; 134using Control ownerControl = new(); 138Assert.IsType<Control.ControlAccessibleObject>(accessibleObject); 140Control.ControlAccessibleObject controlAccessibleObject = (Control.ControlAccessibleObject)accessibleObject; 153using Control ownerControl = new(); 154var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 168using Control ownerControl = new(); 169var controlAccessibleObject = new Control.ControlAccessibleObject(ownerControl); 187using Control ownerControl = new() 191var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 199using Control ownerControl = new() 203var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 218using Control ownerControl = new() 222var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 245using Control control = new(); 253using Control ownerControl = new(); 256var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 272using Control ownerControl = new(); 273var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 334var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 342using Control parent = new(); 349var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 364var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 423using Control previousControl = new() 434var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 448using Control previousControl = new() 459var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 473using Control previousControl = new() 483var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 534var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 542using Control parent = new(); 550var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 566var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 663using Control previousControl = new() 675var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 689using Control previousControl = new() 701var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 715using Control previousControl = new() 726var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 734using Control ownerControl = new(); 735var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 823using Control ownerControl = new() 827var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 835using Control ownerControl = new(); 837var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 853using Control ownerControl = new(); 854var accessibleObject = new Control.ControlAccessibleObject(ownerControl) 869using Control ownerControl = new(); 870var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 877using Control ownerControl = new(); 878var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 885using Control child = new(); 886using Control ownerControl = new(); 888var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 898using Control ownerControl = new(); 899var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 906using Control ownerControl = new(); 907var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 935using Control ownerControl = new(); 942var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 980using Control ownerControl = new(); 981var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 991using Control ownerControl = new(); 992var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1000using Control ownerControl = new(); 1001var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1009using Control ownerControl = new(); 1010var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1020using Control ownerControl = new(); 1021var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1031using Control ownerControl = new(); 1032var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1040var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1047using Control ownerControl = new(); 1048var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1057using Control ownerControl = new(); 1058var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1076using Control ownerControl = new(); 1077var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1094using Control ownerControl = new(); 1095var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1102using Control ownerControl = new(); 1103var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1117using Control ownerControl = new(); 1125var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1136using Control ownerControl = new(); 1144var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1153using Control ownerControl = new(); 1154var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1164using Control ownerControl = new(); 1165var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1173using Control ownerControl = new(); 1174var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1184using Control child = new(); 1185using Control ownerControl = new(); 1193var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1204using Control ownerControl = new(); 1205var accessibleObject = new Control.ControlAccessibleObject(ownerControl); 1213using Control control = new(); 1227var accessibleObject = new Control.ControlAccessibleObject(control); 1236return ReflectionHelper.GetPublicNotAbstractClasses<Control>().Select(type => new object[] { type }); 1243using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1262using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1284using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1302using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1321using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1349foreach (Type type in ReflectionHelper.GetPublicNotAbstractClasses<Control>()) 1363using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1395using Control control = new(); 1411using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1414Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1427using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1443Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1458using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1460Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1474using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1476Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1494using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1512Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1528using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1550Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1566using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1586Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject); 1599using Control ownerControl = new() { Name = "test name" }; 1610Control.ControlAccessibleObject accessibleObject = CreateAndDisposeControl(); 1612Assert.False(accessibleObject.TryGetOwnerAs(out Control _)); 1615static Control.ControlAccessibleObject CreateAndDisposeControl() 1617using Control control = new(); 1618var accessibleObject = (Control.ControlAccessibleObject)control.AccessibilityObject; 1620Assert.True(accessibleObject.TryGetOwnerAs(out Control _)); 1630Control.ControlAccessibleObject accessibleObject = CreateAndDisposeControl(type); 1632Assert.False(accessibleObject.TryGetOwnerAs(out Control _)); 1635static Control.ControlAccessibleObject CreateAndDisposeControl(Type type) 1637using Control control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1638var accessibleObject = (Control.ControlAccessibleObject)control.AccessibilityObject; 1640Assert.True(accessibleObject.TryGetOwnerAs(out Control _)); 1661using var control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1705using var control = ReflectionHelper.InvokePublicConstructor<Control>(type); 1728private static bool CanBeAddedToToolStrip(Control control)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (2)
454Control.ControlAccessibleObject accessibleObject = (Control.ControlAccessibleObject)dataGridView.AccessibilityObject;
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxEditingControlAccessibleObjectTests.cs (1)
115Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject);
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
139Assert.True(control.AccessibilityObject is Control.ControlAccessibleObject);
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (11)
31using Control control = new(); 43using Control parentControl = new(); 44using Control control = new(); 63using Control control = new(); 78using Control control = new(); 117using Control control = new(); 144using Control control = new(); 184using Control control = new(); 211using Control control = new(); 226using Control control = new(); 259using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObjectTests.cs (6)
90using Control control = new(); 104using Control control = new(); 121using Control control = new(); 143using Control control = new(); 161using Control control = new(); 180using Control control = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (2)
12private readonly Control _control1; 13private readonly Control _control2;
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (1)
121using Control control = controlCase switch
System\Windows\Forms\AccessibleObjects\LabelAccessibleObjectTests.cs (2)
195private class ControlAccessibleObjectWithNotificationCounter : Control.ControlAccessibleObject 199public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (1)
274Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (8)
22Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 47Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 85Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 104Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (7)
8using static System.Windows.Forms.Control; 308Control.ControlAccessibleObject gridViewAccessibleObject = (Control.ControlAccessibleObject)propertyGrid.GridViewAccessibleObject; 320Control.ControlAccessibleObject gridViewAccessibleObject = (Control.ControlAccessibleObject)propertyGrid.GridViewAccessibleObject; 331Control.ControlAccessibleObject gridViewAccessibleObject = (Control.ControlAccessibleObject)propertyGrid.GridViewAccessibleObject;
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (5)
20using Control control = new(); 32using Control control = new(); 44using Control control = new(); 57using Control control = new(); 70using Control control = new();
System\Windows\Forms\AccessibleObjects\ToolStripNumericUpDown.ToolStripNumericUpDownAccessibleObjectTests.cs (1)
40Control control = toolStripNumericUpDown.Control;
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxControlAccessibleObjectTests.cs (2)
6using static System.Windows.Forms.Control; 30Assert.Throws<TargetInvocationException>(() => Activator.CreateInstance(type, (Control)null));
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (10)
23Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 48Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 86Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 114Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject); 132Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
System\Windows\Forms\Application.ParkingWindowTests.cs (6)
16Control.CheckForIllegalCrossThreadCalls = true; 75using Control control = new(); 110using Control control = new(); 143using Control control = new(); 176using Control control = new(); 187using Control systemControl = new();
System\Windows\Forms\ApplicationTests.cs (1)
247using Control control = new();
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (20)
160((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 408((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 431((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 457((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 560((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 596((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 627((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 675((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 723((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 841((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 872((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 901((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 933((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 962((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1005((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1049((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1101((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1149((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1197((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1251((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
System\Windows\Forms\AxHostTests.cs (43)
37Assert.Equal(Control.DefaultBackColor, control.BackColor); 75Assert.Equal(Control.DefaultFont, control.Font); 77Assert.Equal(Control.DefaultForeColor, control.ForeColor); 102Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 131Assert.Equal(Control.DefaultBackColor, control.BackColor); 169Assert.Equal(Control.DefaultFont, control.Font); 171Assert.Equal(Control.DefaultForeColor, control.ForeColor); 196Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 349Control parent = new() 388Control parent = new(); 466Control child1 = new(); 467Control child2 = new(); 490Control child1 = new() 494Control child2 = new() 522Assert.Equal(value ?? Control.DefaultFont, control.Font); 528Assert.Equal(value ?? Control.DefaultFont, control.Font); 812((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 906((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1304using Control parent = new(); 1321using Control parent = new(); 1350using Control parent = new(); 1419((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1821using Control parent = new(); 2094((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2118using Control parent = new(); 2160((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2230((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2349((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2391((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2431((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2471((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2513((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2557((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2607((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2651((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2708((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2756((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2804((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2850((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2907((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2955((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 3003((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 3057((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (3)
462RoundTripOfType<Control>(value).Should().BeNull(); 473ReadRestrictedObjectFromStream<Control>(NotSupportedResolver).Should().BeNull(); 476ReadRestrictedObjectFromStream<Control>(NotSupportedResolver).Should().BeNull();
System\Windows\Forms\BindingContextTests.cs (1)
990Control control = new();
System\Windows\Forms\ButtonBaseTests.cs (31)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 68Assert.Equal(Control.DefaultFont, control.Font); 70Assert.Equal(Control.DefaultForeColor, control.ForeColor); 695yield return new object[] { Color.Empty, Control.DefaultBackColor, 1 }; 752Assert.Equal(Control.DefaultBackColor, control.BackColor); 1137using Control parent = new(); 1308using Control parent = new(); 1548using Control parent = new(); 1715using Control parent = new(); 1885using Control parent = new(); 1989using Control parent = new(); 2809public void ButtonBase_Parent_Set_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2829public void ButtonBase_Parent_SetDesignMode_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2863public void ButtonBase_Parent_SetWithNonNullOldParent_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2865using Control oldParent = new(); 2889using Control parent = new(); 2907public void ButtonBase_Parent_SetWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2941public void ButtonBase_Parent_SetDesignModeWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2990using Control parent = new(); 3075using Control parent = new(); 3170using Control parent = new(); 3315using Control parent = new(); 3431using Control parent = new(); 3549using Control parent = new(); 3658using Control parent = new(); 3759using Control parent = new(); 3856using Control parent = new(); 3969using Control parent = new(); 4085using Control parent = new(); 7188using Control parent = new(); 7290using Control parent = new();
System\Windows\Forms\ButtonTests.cs (16)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 71Assert.Equal(Control.DefaultFont, control.Font); 73Assert.Equal(Control.DefaultForeColor, control.ForeColor); 297using Control parent = new(); 445using Control parent = new(); 674Assert.Equal(value ?? Control.DefaultFont, control.Font); 680Assert.Equal(value ?? Control.DefaultFont, control.Font); 737Assert.Equal(Control.DefaultFont, control.Font); 791using Control parent = new(); 886using Control parent = new(); 1935using Control parent = new() 2017using Control parent = new() 2922using Control parent = new(); 3024using Control parent = new(); 3119using Control parent = new() 3197using Control parent = new()
System\Windows\Forms\CheckBoxTests.cs (3)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 72Assert.Equal(Control.DefaultFont, control.Font); 74Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ComboBoxTests.cs (6)
79Assert.Equal(Control.DefaultFont, control.Font); 90Assert.Equal(Control.DefaultFont.Height + 2, control.ItemHeight); 992Assert.Equal(value ?? Control.DefaultFont, control.Font); 998Assert.Equal(value ?? Control.DefaultFont, control.Font); 1035Assert.Equal(Control.DefaultFont, control.Font); 2779private class AutomationEventCountingComboBoxAccessibleObject : Control.ControlAccessibleObject
System\Windows\Forms\CommonDialogTests.cs (4)
153using Control owner = new(); 174using Control owner = new(); 188using Control owner = new(); 210using Control owner = new();
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (1)
46Assert.NotEqual(font, Control.DefaultFont);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (1)
157using Control control = new();
System\Windows\Forms\ContainerControlTests.cs (27)
35Assert.Equal(Control.DefaultBackColor, control.BackColor); 79Assert.Equal(Control.DefaultFont, control.Font); 81Assert.Equal(Control.DefaultForeColor, control.ForeColor); 150using Control child = new(); 151Control grandchild = new(); 200using Control child = new(); 412Assert.Equal(value ?? Control.DefaultFont, control.Font); 418Assert.Equal(value ?? Control.DefaultFont, control.Font); 433Assert.Equal(value ?? Control.DefaultFont, control.Font); 440Assert.Equal(value ?? Control.DefaultFont, control.Font); 478Assert.Equal(Control.DefaultFont, control.Font); 562using Control child = new(); 613using Control child = new(); 794using Control child1 = new(); 795using Control grandchild1 = new(); 798using Control grandchild2 = new(); 1020using Control child1 = new(); 1021using Control grandchild1 = new(); 1024using Control grandchild2 = new(); 1254using Control child1 = new(); 1255using Control child2 = new(); 1284using Control child1 = new(); 1285using Control child2 = new(); 1315using Control control = new(); 1340using Control control = new(); 1365using Control control = new(); 1381using Control control = new();
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (1)
16typeof(Control).Assembly.GetType("System.Windows.Forms.Control+ActiveXFontMarshaler")!,
System\Windows\Forms\Control.ActiveXImplTests.cs (1)
19using Control control = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (53)
17Control control = new(); 24public void Ctor_IBindableComponent(IBindableComponent control, Control expectedControl) 38using Control control = new(); 50yield return new object[] { new Binding(nameof(Control.Text), new object(), "dataMember") }; 57using Control control = new(); 69using Control control = new(); 73Binding binding3 = new(nameof(Control.Text), 1, "dataMember"); 78Binding binding4 = new(nameof(Control.Text), 1, "dataMember"); 92Binding binding = new(nameof(Control.Text), 1, "dataMember"); 124using Control control = new(); 126Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember"); 129Assert.Equal(nameof(Control.Text), binding.PropertyName); 141using Control control = new(); 143Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true); 146Assert.Equal(nameof(Control.Text), binding.PropertyName); 158using Control control = new(); 160Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged); 163Assert.Equal(nameof(Control.Text), binding.PropertyName); 175using Control control = new(); 177Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"); 180Assert.Equal(nameof(Control.Text), binding.PropertyName); 192using Control control = new(); 194Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"); 197Assert.Equal(nameof(Control.Text), binding.PropertyName); 209using Control control = new(); 211Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture); 214Assert.Equal(nameof(Control.Text), binding.PropertyName); 226using Control control = new(); 239using Control control = new(); 253using Control control = new(); 255Binding binding = new(nameof(Control.Text), new object(), "dataMember"); 258Assert.Throws<ArgumentException>("binding", () => collection.Add(new Binding(nameof(Control.Text), new object(), "dataMember"))); 259Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember")); 260Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true)); 261Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged)); 262Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null")); 263Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString")); 264Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 270using Control control = new(); 278using Control control = new(); 289using Control control1 = new(); 290using Control control2 = new(); 302using Control control = new(); 322using Control control = new(); 338using Control control = new(); 350using Control control = new(); 363using Control control1 = new(); 364using Control control2 = new(); 380using Control control = new(); 398using Control control = new(); 400Binding binding = new(nameof(Control.Text), new object(), "member"); 411using Control control = new(); 413Binding binding = new(nameof(Control.Text), new object(), "member");
System\Windows\Forms\ControlEventArgsTests.cs (1)
16public void Ctor_Control(Control control)
System\Windows\Forms\ControlTests.ControlCollection.cs (470)
17using Control owner = new(); 18Control.ControlCollection collection = new(owner); 28Assert.Throws<ArgumentNullException>("owner", () => new Control.ControlCollection(null)); 34using Control owner = new(); 35using Control control1 = new(); 36using Control control2 = new(); 37var collection = new Control.ControlCollection(owner); 42Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 67Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 82Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 97Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 108using Control owner = new(); 109using Control control1 = new(); 110using Control control2 = new(); 111Control.ControlCollection collection = owner.Controls; 117Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 143Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 148Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 159Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 164Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 174Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 185using Control owner1 = new(); 186using Control owner2 = new(); 187using Control control = new(); 188Control.ControlCollection collection1 = owner1.Controls; 189Control.ControlCollection collection2 = owner2.Controls; 195Assert.Same(collection2.Cast<Control>().Last(), e.AffectedControl); 224using Control owner = new(); 225Control.ControlCollection collection = owner.Controls; 231Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 280Control.ControlCollection collection = owner.Controls; 289Assert.Equal(new Control[] { control1 }, collection.Cast<Control>()); 299Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 313Assert.Equal(new Control[] { control1, control2, control3 }, collection.Cast<Control>()); 329using Control owner = new(); 330using Control control = new() 334Control.ControlCollection collection = owner.Controls; 358using Control owner = new(); 359using Control control = new() 363Control.ControlCollection collection = owner.Controls; 387using Control owner = new(); 388using Control control = new() 392var collection = new Control.ControlCollection(owner); 426using Control owner = new(); 427using Control control = new() 431Control.ControlCollection collection = owner.Controls; 465using Control owner = new(); 466using Control child1 = new(); 467using Control child2 = new(); 468Control.ControlCollection collection = owner.Controls; 543using Control owner = new(); 544using Control control = new(); 545var collection = new Control.ControlCollection(owner); 571Assert.Equal(Control.DefaultFont, control.Font); 573Assert.Equal(Control.DefaultForeColor, control.ForeColor); 575Assert.Equal(Control.DefaultBackColor, control.BackColor); 586using Control owner = new(); 587using Control control = new(); 588var collection = new Control.ControlCollection(owner); 615Assert.Equal(Control.DefaultFont, control.Font); 617Assert.Equal(Control.DefaultForeColor, control.ForeColor); 619Assert.Equal(Control.DefaultBackColor, control.BackColor); 641using Control owner = new(); 642using Control control = new(); 643var collection = new Control.ControlCollection(owner); 651Assert.Equal(Control.DefaultFont, control.Font); 653Assert.Equal(Control.DefaultForeColor, control.ForeColor); 655Assert.Equal(Control.DefaultBackColor, control.BackColor); 791using Control owner = new(); 792using Control control = new(); 793var collection = new Control.ControlCollection(owner); 801Assert.Equal(Control.DefaultFont, control.Font); 803Assert.Equal(Control.DefaultForeColor, control.ForeColor); 805Assert.Equal(Control.DefaultBackColor, control.BackColor); 944using Control owner = new(); 946var collection = new Control.ControlCollection(owner); 954Assert.Equal(Control.DefaultFont, control.Font); 956Assert.Equal(Control.DefaultForeColor, control.ForeColor); 958Assert.Equal(Control.DefaultBackColor, control.BackColor); 960Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 979((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 981((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 982((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 983((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 984((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 985((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 1002Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 1017using Control owner = new(); 1019var collection = new Control.ControlCollection(owner); 1027Assert.Equal(Control.DefaultFont, control.Font); 1029Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1031Assert.Equal(Control.DefaultBackColor, control.BackColor); 1033Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 1041((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1059((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 1061((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 1062((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 1063((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 1064((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 1065((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 1082Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 1111using Control owner = new(); 1114var collection = new Control.ControlCollection(owner); 1121Control owner = null; 1132using Control control = new(); 1133var collection = new Control.ControlCollection(owner); 1145Control control = null; 1156using Control owner = new(); 1157var collection = new Control.ControlCollection(owner); 1169using Control owner = new(); 1170var collection = new Control.ControlCollection(owner); 1177using Control parent = new(); 1178using Control owner = new() 1182var collection = new Control.ControlCollection(owner); 1189using Control grandparent = new(); 1190using Control parent = new() 1194using Control owner = new() 1198var collection = new Control.ControlCollection(owner); 1205using Control owner = new(); 1206using Control child1 = new(); 1207using Control child2 = new(); 1208using Control child3 = new(); 1209Control.ControlCollection collection = owner.Controls; 1230Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1244Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1256collection.AddRange(Array.Empty<Control>()); 1257Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1277using Control owner = new(); 1278var collection = new Control.ControlCollection(owner); 1285using Control owner = new(); 1286using Control child1 = new(); 1287using Control child2 = new(); 1288using Control child3 = new(); 1289var collection = new Control.ControlCollection(owner) 1335using Control owner = new(); 1336using Control child1 = new(); 1337using Control child2 = new(); 1338using Control child3 = new(); 1339var sourceCollection = new Control.ControlCollection(owner); 1354var collection = Assert.IsType<Control.ControlCollection>(iCloneable.Clone()); 1356Assert.Equal(new Control[] { child1, child2, child3 }, sourceCollection.Cast<Control>()); 1357Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1378using Control owner = new(); 1379var collection = new Control.ControlCollection(owner); 1380using Control child1 = new(); 1381using Control child2 = new(); 1403using Control owner = new(); 1404using Control child1 = new() 1408using Control child2 = new() 1412using Control child3 = new() 1416var collection = new Control.ControlCollection(owner) 1435using Control owner = new(); 1436using Control child1 = new() 1440using Control child2 = new() 1444using Control child3 = new() 1448using Control grandchild1 = new() 1452using Control grandchild2 = new() 1456using Control grandchild3 = new() 1463Control.ControlCollection collection = owner.Controls; 1488using Control owner = new(); 1489using Control child1 = new() 1493using Control child2 = new() 1497using Control child3 = new() 1501Control.ControlCollection collection = owner.Controls; 1514using Control owner = new(); 1515var collection = new Control.ControlCollection(owner); 1523using Control owner = new(); 1524var collection = new Control.ControlCollection(owner); 1525using Control child1 = new(); 1526using Control child2 = new(); 1537using Control owner = new(); 1538var collection = new Control.ControlCollection(owner); 1539using Control child1 = new(); 1540using Control child2 = new(); 1551using Control owner = new(); 1552var collection = new Control.ControlCollection(owner); 1553using Control child1 = new(); 1554using Control child2 = new(); 1572public void ControlCollection_GetChildIndex_NoSuchControl_ThrowsArgumentException(Control child) 1574using Control owner = new(); 1575var collection = new Control.ControlCollection(owner); 1576using Control child1 = new(); 1577using Control child2 = new(); 1588using Control owner = new(); 1589var collection = new Control.ControlCollection(owner); 1609using Control owner = new(); 1610using Control child1 = new(); 1611using Control child2 = new(); 1612using Control child3 = new(); 1613var collection = new Control.ControlCollection(owner) 1648using Control owner = new(); 1649using Control child = new(); 1650var collection = new Control.ControlCollection(owner); 1671using Control owner = new(); 1672using Control child1 = new(); 1673using Control child2 = new(); 1674using Control child3 = new(); 1675var collection = new Control.ControlCollection(owner) 1704using Control owner = new(); 1705using Control child1 = new(); 1706using Control child2 = new(); 1707using Control child3 = new(); 1708var collection = new Control.ControlCollection(owner) 1744using Control owner = new(); 1745var collection = new Control.ControlCollection(owner); 1746using Control child1 = new(); 1747using Control child2 = new(); 1769using Control owner = new(); 1770using Control child1 = new() 1774using Control child2 = new() 1778using Control child3 = new() 1782var collection = new Control.ControlCollection(owner) 1802using Control owner = new(); 1803using Control child1 = new() 1807using Control child2 = new() 1811using Control child3 = new() 1815var collection = new Control.ControlCollection(owner) 1838using Control owner = new(); 1839using Control child1 = new() 1843using Control child2 = new() 1847using Control child3 = new() 1851var collection = new Control.ControlCollection(owner) 1868using Control owner = new(); 1869using Control child1 = new(); 1870using Control child2 = new(); 1871using Control child3 = new(); 1872var collection = new Control.ControlCollection(owner) 1890using Control owner = new(); 1891var collection = new Control.ControlCollection(owner); 1901using Control owner = new(); 1902using Control child = new(); 1903var collection = new Control.ControlCollection(owner) 1913using Control owner = new(); 1914using Control child1 = new(); 1915using Control child2 = new(); 1916var collection = new Control.ControlCollection(owner) 1938Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1948Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1958Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1976using Control child1 = new(); 1977using Control child2 = new(); 1978var collection = new Control.ControlCollection(owner) 2002Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2013Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2024Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2042using Control owner = new(); 2043using Control child1 = new(); 2044using Control child2 = new(); 2045Control.ControlCollection collection = owner.Controls; 2072Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2085Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2098Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2118using Control owner = new(); 2119using Control child1 = new(); 2120using Control child2 = new(); 2121Control.ControlCollection collection = owner.Controls; 2154Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2170Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2186Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2209using Control owner1 = new(); 2210using Control owner2 = new(); 2211using Control control1 = new(); 2212using Control control2 = new(); 2213using Control control3 = new(); 2214var collection1 = new Control.ControlCollection(owner1); 2215var collection2 = new Control.ControlCollection(owner2); 2221Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2222Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2228Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2229Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2237using Control owner = new(); 2238using Control control = new(); 2239var collection = new Control.ControlCollection(owner) 2268Assert.Equal(Control.DefaultFont, control.Font); 2270Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2272Assert.Equal(Control.DefaultBackColor, control.BackColor); 2283using Control owner = new(); 2284using Control control = new(); 2285var collection = new Control.ControlCollection(owner) 2315Assert.Equal(Control.DefaultFont, control.Font); 2317Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2319Assert.Equal(Control.DefaultBackColor, control.BackColor); 2341using Control owner = new(); 2342using Control control = new(); 2343var collection = new Control.ControlCollection(owner) 2459Assert.Equal(Control.DefaultFont, control.Font); 2461Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2463Assert.Equal(Control.DefaultBackColor, control.BackColor); 2485using Control owner = new(); 2486using Control control = new(); 2487var collection = new Control.ControlCollection(owner) 2592Assert.Equal(Control.DefaultFont, control.Font); 2594Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2596Assert.Equal(Control.DefaultBackColor, control.BackColor); 2617using Control owner = new(); 2619var collection = new Control.ControlCollection(owner) 2636Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 2650((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 2652((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 2653((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 2654((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 2655((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 2656((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 2665Assert.Equal(Control.DefaultFont, control.Font); 2667Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2669Assert.Equal(Control.DefaultBackColor, control.BackColor); 2671Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 2681using Control owner = new(); 2683var collection = new Control.ControlCollection(owner) 2700Assert.Equal(RightToLeft.Yes, ((Control)control).RightToLeft); 2708((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 2726((Control)control).EnabledChanged += (sender, e) => enabledChangedCallCount++; 2728((Control)control).FontChanged += (sender, e) => fontChangedCallCount++; 2729((Control)control).ForeColorChanged += (sender, e) => foreColorChangedCallCount++; 2730((Control)control).BackColorChanged += (sender, e) => backColorChangedCallCount++; 2731((Control)control).RightToLeftChanged += (sender, e) => rightToLeftChangedCallCount++; 2732((Control)control).BindingContextChanged += (sender, e) => bindingContextChangedCallCount++; 2743Assert.Equal(Control.DefaultFont, control.Font); 2745Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2747Assert.Equal(Control.DefaultBackColor, control.BackColor); 2749Assert.Equal(RightToLeft.No, ((Control)control).RightToLeft); 2767using Control owner = new(); 2768using Control child1 = new(); 2769using Control child2 = new(); 2770var collection = new Control.ControlCollection(owner) 2845using Control owner = new(); 2846using Control child1 = new(); 2847using Control child2 = new(); 2848var collection = new Control.ControlCollection(owner) 2872Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 2883Assert.Empty(collection.Cast<Control>()); 2903using Control owner = new(); 2904var collection = new Control.ControlCollection(owner); 2914using Control owner = new(); 2915using Control child = new(); 2916var collection = new Control.ControlCollection(owner) 2928using Control owner = new(); 2929using Control child1 = new() 2933using Control child2 = new() 2937using Control child3 = new() 2941var collection = new Control.ControlCollection(owner) 2966Assert.Equal(new Control[] { child1, child3 }, collection.Cast<Control>()); 2979Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 3004using Control owner = new(); 3005using Control child1 = new() 3009using Control child2 = new() 3013using Control child3 = new() 3017var collection = new Control.ControlCollection(owner) 3025Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3029Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3035using Control owner = new(); 3036using Control child1 = new(); 3037using Control child2 = new(); 3038using Control child3 = new(); 3039var collection = new Control.ControlCollection(owner) 3063Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3073Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3083Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3103using Control owner = new(); 3104using Control child1 = new(); 3105using Control child2 = new(); 3106using Control child3 = new(); 3107var collection = new Control.ControlCollection(owner) 3131Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3141Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3158using Control owner = new(); 3159using Control child1 = new(); 3160using Control child2 = new(); 3161using Control child3 = new(); 3162Control.ControlCollection collection = owner.Controls; 3191Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3204Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3217Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3237using Control owner = new(); 3238using Control child1 = new(); 3239using Control child2 = new(); 3240using Control child3 = new(); 3241Control.ControlCollection collection = owner.Controls; 3276Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3292Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3308Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3331using Control owner = new(); 3333using Control child2 = new(); 3334using Control child3 = new(); 3335Control.ControlCollection collection = owner.Controls; 3365Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3378Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3391Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3411using Control owner = new(); 3412var collection = new Control.ControlCollection(owner); 3419using Control owner = new(); 3420using Control child = new(); 3421var collection = new Control.ControlCollection(owner) 3431using Control owner = new(); 3432using Control control1 = new(); 3433using Control control2 = new(); 3440Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 3467Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 3472Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 3483Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 3488Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 3505using Control owner = new(); 3506IList collection = new Control.ControlCollection(owner); 3514using Control owner = new(); 3515using Control child1 = new(); 3516using Control child2 = new(); 3517IList collection = new Control.ControlCollection(owner) 3539Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3549Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3559Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3576using Control owner = new(); 3577IList collection = new Control.ControlCollection(owner);
System\Windows\Forms\ControlTests.cs (52)
24Assert.Equal(Control.DefaultBackColor, control.BackColor); 60Assert.Equal(Control.DefaultFont, control.Font); 62Assert.Equal(Control.DefaultForeColor, control.ForeColor); 113Assert.Equal(Control.DefaultBackColor, control.BackColor); 149Assert.Equal(Control.DefaultFont, control.Font); 151Assert.Equal(Control.DefaultForeColor, control.ForeColor); 209Assert.Equal(Control.DefaultBackColor, control.BackColor); 245Assert.Equal(Control.DefaultFont, control.Font); 247Assert.Equal(Control.DefaultForeColor, control.ForeColor); 295public void Control_Ctor_Control_String(Control parent, string text, string expectedText) 305Assert.Equal(Control.DefaultBackColor, control.BackColor); 341Assert.Equal(Control.DefaultFont, control.Font); 343Assert.Equal(Control.DefaultForeColor, control.ForeColor); 391public void Control_Ctor_Control_String_Int_Int_Int_Int(Control parent, string text, int left, int top, int width, int height, string expectedText) 401Assert.Equal(Control.DefaultBackColor, control.BackColor); 437Assert.Equal(Control.DefaultFont, control.Font); 439Assert.Equal(Control.DefaultForeColor, control.ForeColor); 481Assert.Equal(SystemColors.Control, Control.DefaultBackColor); 487Assert.Equal(SystemColors.ControlText, Control.DefaultForeColor); 493Font font = Control.DefaultFont; 494Assert.Equal(SystemFonts.MessageBoxFont, Control.DefaultFont); 495Assert.Same(font, Control.DefaultFont); 571using Control parent = new(); 596using Control parent = new(); 788Control nextControl1 = control.GetNextControl(button1, forward: true); 789Control nextControl2 = control.GetNextControl(button2, forward: true); 790Control nextControl3 = control.GetNextControl(button3, forward: true); 807Control previousControl1 = control.GetNextControl(button1, forward: false); 808Control previousControl2 = control.GetNextControl(button2, forward: false); 809Control previousControl3 = control.GetNextControl(button3, forward: false); 826Control nextControl1 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 827Control nextControl2 = control.GetNextSelectableControl(button2, forward: true, tabStopOnly: true, nested: true, wrap: true); 828Control nextControl3 = control.GetNextSelectableControl(button3, forward: true, tabStopOnly: true, nested: true, wrap: true); 829Control nextControl4 = control.GetNextSelectableControl(button1, forward: true, tabStopOnly: true, nested: true, wrap: true); 847Control previousControl1 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 848Control previousControl2 = control.GetNextSelectableControl(button3, forward: false, tabStopOnly: true, nested: true, wrap: true); 849Control previousControl3 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 850Control previousControl4 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 902Control previousControl1 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 903Control previousControl2 = control.GetNextSelectableControl(button1, forward: false, tabStopOnly: true, nested: true, wrap: true); 904Control previousControl3 = control.GetNextSelectableControl(checkBox2, forward: false, tabStopOnly: true, nested: true, wrap: true); 905Control previousControl4 = control.GetNextSelectableControl(checkBox1, forward: false, tabStopOnly: true, nested: true, wrap: true); 906Control previousControl5 = control.GetNextSelectableControl(radioButton1, forward: false, tabStopOnly: true, nested: true, wrap: true); 907Control previousControl6 = control.GetNextSelectableControl(button2, forward: false, tabStopOnly: true, nested: true, wrap: true); 1135public SubControl(Control parent, string text) : base(parent, text) 1139public SubControl(Control parent, string text, int left, int top, int width, int height) : base(parent, text, left, top, width, height) 1143public Control GetNextSelectableControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) 1222public new void InvokeGotFocus(Control toInvoke, EventArgs e) => base.InvokeGotFocus(toInvoke, e); 1224public new void InvokeLostFocus(Control toInvoke, EventArgs e) => base.InvokeLostFocus(toInvoke, e); 1226public new void InvokePaint(Control c, PaintEventArgs e) => base.InvokePaint(c, e); 1228public new void InvokePaintBackground(Control c, PaintEventArgs e) => base.InvokePaintBackground(c, e);
System\Windows\Forms\ControlTests.Handlers.cs (63)
131using Control child1 = new(); 132using Control child2 = new(); 178using Control child1 = new() 182using Control child2 = new() 326using Control child1 = new(); 327using Control child2 = new(); 377using Control child1 = new() 381using Control child2 = new() 507using Control child1 = new(); 508using Control child2 = new(); 554using Control child1 = new() 558using Control child2 = new() 655using Control child1 = new(); 656using Control child2 = new(); 704using Control child1 = new() 708using Control child2 = new() 1105using Control child1 = new(); 1106using Control child2 = new(); 1154using Control child1 = new() 1158using Control child2 = new() 1502using Control child1 = new(); 1503using Control child2 = new(); 1549using Control child1 = new() 1553using Control child2 = new() 1639Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1646Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1670Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1677Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1716Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1726Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1737using Control child1 = new(); 1738using Control child2 = new(); 1786using Control child1 = new() 1790using Control child2 = new() 1958using Control child1 = new(); 1959using Control child2 = new(); 2005using Control child1 = new() 2009using Control child2 = new() 2617Control parent = new(); 2677Control parent = new(); 3135using Control parent = new(); 3889Control control = new() 3897foreach (Control parent in new Control[] { control, tabPage }) 3930Control control = new() 3939foreach (Control parent in new Control[] { control, tabPage }) 3974public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4107using Control parent = new() 5029using Control child1 = new(); 5030using Control child2 = new() 5079using Control child1 = new() 5083using Control child2 = new() 5360using Control child1 = new(); 5361using Control child2 = new(); 5578using Control parent = new(); 5665using Control parent = new(); 5719using Control grandchild1 = new(); 5720using Control child1 = new(); 5721using Control child2 = new(); 5795using Control grandchild1 = new(); 5796using Control child1 = new() 5800using Control child2 = new()
System\Windows\Forms\ControlTests.Internals.cs (47)
14using Control control = new(); 26using Control control = new() 38using Control control = new() 53using Control control = new() 72using Control control = new() 91using Control control = new(); 109using Control control = new() 150using Control control = new() 162using Control control = new() 174using Control control = new(); 186using Control control = new(); 198using Control control = new(); 206using Control control = new(); 207Control parent = new(); 218using Control control = new(); 220Control parent = new(); 230using Control control = new(); 239using Control control = new() 251using Control control = new() 263using Control control = new(); 264Control parent = new(); 275using Control control = new(); 285using Control control = new(); 286Control first = new() 290Control second = new() 294Control third = new() 298var ordered = new Control[] 304var unordered = new Control[] 312Control[] tabOrderedChildren = control.GetChildControlsInTabOrder(false); 320using Control control = new(); 321Control first = new() 325Control second = new() 329Control third = new() 333var unordered = new Control[] 341Control[] tabOrderedChildrenWithhandlesOnly = control.GetChildControlsInTabOrder(true); 349using Control control = new(); 350Control first = new() 354Control second = new() 358Control third = new() 362var tabOrder = new Control[] 377using Control control = new(); 378Control first = new() 382Control second = new() 386Control third = new() 390var tabOrder = new Control[] 405using Control control = new(); 411static void CreateAndDispose(Control control)
System\Windows\Forms\ControlTests.Methods.cs (261)
135using Control parent = new(); 136using Control child1 = new(); 137using Control child2 = new(); 140Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 155Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 164Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 177using Control parent = new(); 178using Control child1 = new(); 179using Control child2 = new(); 182Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 204Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 216Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 232using Control parent = new(); 233using Control child1 = new(); 234using Control child2 = new(); 237Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 265Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 280Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 299using Control parent = new(); 301using Control child2 = new(); 304Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 327Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 339Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 405Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 504using Control parent = new(); 565using Control control = new() 612Control.ControlCollection controls = Assert.IsType<Control.ControlCollection>(control.CreateControlsInstance()); 691using Control parent = new(); 779using Control parent = new(); 780using Control control = new() 784using Control child1 = new() 788using Control child2 = new() 792using Control grandchild1 = new() 796using Control otherParent = new(); 797using Control otherControl = new() 801using Control emptyControl = new(); 844using Control parent = new(); 974using Control control = new(); 1019using Control parent = new(); 1022using Control control = new() 1072using Control control = new(); 1073using Control child1 = new(); 1074using Control child2 = new(); 1150using Control control = new(); 1197using Control control = new(); 1550Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1571Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1829using Control control = new(); 1839using Control control = new(); 1858using Control control = new(); 1866using Control control = new(); 1975using Control control = new(); 1984using Control control = new(); 1994Assert.Same(control, Control.FromChildHandle(handle)); 1998Assert.Null(Control.FromChildHandle(handle)); 2008Assert.Null(Control.FromChildHandle(handle)); 2012Assert.Null(Control.FromChildHandle(handle)); 2029Assert.Same(parent, Control.FromChildHandle(window.Handle)); 2033Assert.Null(Control.FromChildHandle(window.Handle)); 2039Assert.Null(Control.FromChildHandle(IntPtr.Zero)); 2040Assert.Null(Control.FromChildHandle(1)); 2049Assert.Same(control, Control.FromHandle(handle)); 2053Assert.Null(Control.FromHandle(handle)); 2063Assert.Null(Control.FromHandle(handle)); 2067Assert.Null(Control.FromHandle(handle)); 2084Assert.Null(Control.FromHandle(window.Handle)); 2088Assert.Null(Control.FromHandle(window.Handle)); 2094Assert.Null(Control.FromHandle(IntPtr.Zero)); 2095Assert.Null(Control.FromHandle(1)); 2102using Control control = new(); 2122using Control control = new(); 2136using Control control = new(); 2143using Control grandparent = new(); 2144using Control parent = new() 2148using Control control = new() 2165using Control parent = new() 2169using Control control = new() 2186using Control control = new() 2204using Control parent = new() 2208using Control control = new() 2226using Control parent = new() 2230using Control control = new() 2247using Control cont = new(); 2248using Control first = new() 2252using Control second = new() 2256using Control third = new() 2260var tabOrder = new Control[] 2275using Control cont = new(); 2276using Control first = new() 2280using Control second = new() 2284using Control third = new() 2288var tabOrder = new Control[] 2303using Control cont = new(); 2304using Control first = new() 2308using Control second = new() 2312using Control third = new() 2316var tabOrder = new Control[] 2331using Control cont = new(); 2332using Control first = new() 2336using Control second = new() 2340using Control third = new() 2344var tabOrder = new Control[] 2369using Control control = new(); 2382using Control control = new() 2421using Control control = new() 2906using Control control = new() 2921using Control control = new() 3796using Control control = new(); 3821using Control control = new(); 3847using Control control = new(); 3876using Control control = new(); 3910using Control control = new(); 3946using Control control = new(); 3979using Control control = new(); 4012using Control control = new(); 4038using Control control = new(); 4065using Control control = new(); 4100using Control control = new(); 4130using Control control = new(); 4172using Control control = new(); 4181using Control control = new(); 4193using Control otherControl = new(); 4317using Control otherControlParent = new(); 4369using Control otherControl = new(); 4531Assert.Equal(expected, Control.IsMnemonic(charCode, text)); 4772using Control control = new(); 4826using Control parent = new(); 4827using Control control = new() 4861using Control parent = new(); 4978using Control control = new(); 5023public void Control_PerformLayout_InvokeControlString_Success(Control affectedControl, string affectedProperty) 5025using Control control = new(); 5047public void Control_PerformLayout_InvokeControlStringCustomLayoutEngine_Success(Control affectedControl, string affectedProperty) 5079public void Control_PerformLayout_InvokeControlStringWithParent_Success(Control affectedControl, string affectedProperty) 5081using Control parent = new(); 5082using Control control = new() 5124public void Control_PerformLayout_InvokeControlStringWithParentCustomLayoutEngine_Success(bool parentNeedsLayout, Control affectedControl, string affectedProperty, int expectedParentLayoutCallCount) 5126using Control parent = new(); 5187public void Control_PerformLayout_InvokeControlStringSuspended_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5213public void Control_PerformLayout_InvokeControlStringSuspendedMultipleTimes_DoesNotCallLayout(bool performLayout, Control affectedControl, string affectedProperty, int expectedLayoutCallCount) 5252using Control control = new(); 5372using Control parent = new(); 5549using Control parent = new(); 5602using Control parent = new(); 5650using Control parent = new(); 5750using Control parent = new(); 6041using Control parent = new(); 6249using Control parent = new(); 6335using Control control = new(); 6347using Control control = new(); 6388using Control control = new(); 6392Assert.Equal(Control.DefaultBackColor, control.BackColor); 6397Assert.Equal(Control.DefaultBackColor, control.BackColor); 6401Assert.Equal(Control.DefaultBackColor, control.BackColor); 6446using Control control = new(); 6451Assert.Equal(Control.DefaultFont, control.Font); 6456Assert.Equal(Control.DefaultFont, control.Font); 6460Assert.Equal(Control.DefaultFont, control.Font); 6466using Control control = new(); 6470Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6475Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6479Assert.Equal(Control.DefaultForeColor, control.ForeColor); 6590public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6592using Control control = new(); 6618public void Control_ResumeLayout_InvokeSuspendedWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6620using Control control = new(); 6650using Control control = new(); 6668public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithLayoutRequest_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6670using Control control = new(); 6698public void Control_ResumeLayout_InvokeSuspendedMultipleTimesWithMultipleLayoutRequests_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6700using Control control = new(); 6731using Control control = new(); 6754using Control child = new(); 6783using Control control = new(); 6802using Control child = new(); 6827public void Control_ResumeLayout_InvokeSuspendedWithLayoutRequestWithHandle_Success(Control affectedControl, string affectedProperty, bool performLayout, int expectedLayoutCallCount) 6829using Control control = new(); 7030using Control parent = new(); 7031using Control child1 = new(); 7032using Control child2 = new(); 7035Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7050Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7059Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7072using Control parent = new(); 7073using Control child1 = new(); 7074using Control child2 = new(); 7077Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7099Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7111Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7127using Control parent = new(); 7128using Control child1 = new(); 7129using Control child2 = new(); 7132Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7160Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7175Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7194using Control parent = new(); 7196using Control child2 = new(); 7199Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7222Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7234Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7315using Control parent = new(); 7688using Control parent = new(); 7945using Control parent = new(); 8545using Control parent = new(); 8802using Control parent = new(); 9342using Control parent = new(); 9640using Control parent = new(); 10126using Control parent = new(); 10229using Control control = new() 10247using Control control = new() 10278using Control control = new(); 10295using Control control = new(); 10325using Control control = new(); 10332using Control control = new(); 10344using Control control = new(); 11245using Control parent = new(); 11483using Control parent = new(); 11731using Control parent = new(); 11981using Control parent = new(); 12190using Control parent = new(); 12209using Control parent = new(); 12241using Control parent = new(); 12274using Control parent = new(); 12318using Control parent = new(); 12319using Control child1 = new(); 12365using Control parent = new(); 12554using Control control = new(); 12628using Control control = new(); 14192public Control ActiveControl { get; set; } 14194public Func<Control, bool> ActivateControlAction { get; set; } 14196public bool ActivateControl(Control active) => ActivateControlAction(active); 14249using Control grandparent = new(); 14337using Control grandparent = new();
System\Windows\Forms\ControlTests.Properties.cs (472)
21using Control control = new(); 28Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject); 37using Control control = new(); 46Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject); 81using Control control1 = new(); 82var controlAccessibleObject = new Control.ControlAccessibleObject(control1); 107using Control control = new() 124using Control control = new() 141using Control control = new() 158using Control control = new() 175using Control control = new(); 183using Control control = new() 205using Control control = new(); 242using Control control = new(); 282using Control control = new(); 337using Control control = new(); 359using Control control = new() 410using Control parent = new(); 411using Control control = new() 455using Control grandparent = new(); 456using Control parent = new() 460using Control control = new() 556using Control parent = new(); 557using Control control = new() 675using Control grandparent = new(); 676using Control parent = new() 680using Control control = new() 767using Control control = new() 821using Control parent = new(); 822using Control control = new() 869using Control control = new(); 904using Control control = new() 919using Control control = new(); 946using Control parent = new(); 947using Control control = new() 1001using Control control = new() 1064using Control control = new(); 1107using Control parent = new(); 1108using Control control = new() 1190using Control control = new() 1229using Control control = new() 1246using Control control = new() 1265yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1289using Control child1 = new(); 1290using Control child2 = new(); 1291using Control control = new(); 1313using Control child1 = new() 1317using Control child2 = new() 1321using Control control = new(); 1342yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1349using Control control = new(); 1377using Control control = new(); 1399Assert.Equal(Control.DefaultBackColor, control.BackColor); 1412using Control control = new(); 1437using Control child1 = new(); 1438using Control child2 = new(); 1439using Control control = new(); 1494Assert.Equal(Control.DefaultBackColor, control.BackColor); 1495Assert.Equal(Control.DefaultBackColor, child1.BackColor); 1496Assert.Equal(Control.DefaultBackColor, child2.BackColor); 1517using Control child1 = new() 1521using Control child2 = new() 1525using Control control = new(); 1574Assert.Equal(Control.DefaultBackColor, control.BackColor); 1597using Control control = new(); 1604PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1605using Control control = new(); 1613Assert.Equal(Control.DefaultBackColor, control.BackColor); 1620PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.BackColor)]; 1621using Control control = new(); 1629Assert.Equal(Control.DefaultBackColor, control.BackColor); 1637using Control control = new() 1660using Control control = new(); 1689using Control child1 = new(); 1690using Control child2 = new(); 1691using Control control = new(); 1713using Control child1 = new() 1717using Control child2 = new() 1721using Control control = new(); 1740using Control control = new(); 1782using Control control = new(); 1808using Control child1 = new(); 1809using Control child2 = new(); 1810using Control control = new(); 1895using Control child1 = new() 1899using Control child2 = new() 1903using Control control = new(); 2073using Control control = new(); 2108using Control control = new(); 2134using Control control = new(); 2142using Control parent = new() 2146using Control control = new() 2161using Control control = new() 2178using Control control = new() 2195using Control control = new() 2213using Control control = new(); 2255using Control child1 = new(); 2256using Control child2 = new(); 2257using Control control = new(); 2342using Control child1 = new() 2346using Control child2 = new() 2350using Control control = new(); 2693using Control parent = new(); 2904using Control parent = new(); 3047using Control control = new() 3063using Control control = new() 3078using Control parent = new() 3083using Control control = new() 3097using Control control = new() 3113using Control parent = new() 3118using Control control = new() 3130using Control control = new() 3152using Control control = new(); 3189using Control control = new() 3211using Control control = new(); 3247using Control control = new() 3292public void Control_ClientSize_Get_ReturnsExpected(Control control, Size expected) 3326using Control control = new(); 3484using Control control = new(); 3538using Control control = new() 3556using Control control = new() 3574using Control control = new() 3589using Control control = new() 3605using Control control = new(); 3647yield return new object[] { new Control.ControlCollection(new Control()) }; 3652public void Control_Controls_GetCustomCreateControlsInstance_ReturnsExpected(Control.ControlCollection result) 3665public Control.ControlCollection CreateControlsResult { get; set; } 3667protected override Control.ControlCollection CreateControlsInstance() => CreateControlsResult; 3673PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3674using Control control = new(); 3680using Control child = new(); 3693PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3694using Control control = new(); 3700using Control child = new(); 3714using Control control = new() 3730using Control parent = new() 3734using Control control = new() 3754using Control control = new() 3782using Control parent = new() 3808using Control control = new() 3825using Control control = new(); 3854using Control child1 = new(); 3855using Control child2 = new(); 3856using Control control = new(); 3878using Control child1 = new() 3882using Control child2 = new() 3886using Control control = new(); 3905using Control control = new(); 3947using Control child1 = new(); 3948using Control child2 = new(); 3949using Control control = new(); 4034using Control child1 = new() 4038using Control child2 = new() 4042using Control control = new(); 4126using Control control = new(); 4148using Control control = new() 4183using Control parent = new(); 4184using Control control = new() 4273using Control parent = new(); 4274using Control control = new() 4330using Control control = new() 4349using Control control = new(); 4383using Control control = new() 4422using Control control = new(); 4504using Control control = new() 4567using Control control = new() 4605using Control child1 = new(); 4606using Control child2 = new(); 4607using Control control = new() 4682using Control child1 = new() 4686using Control child2 = new() 4690using Control control = new() 4765PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4766using Control control = new(); 4781PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Enabled)]; 4782using Control control = new(); 4799using Control parent = new() 4803using Control control = new() 4823using Control control = new() 4827Assert.Equal(Control.DefaultFont, control.Font); 4842Assert.Equal(value ?? Control.DefaultFont, control.Font); 4848Assert.Equal(value ?? Control.DefaultFont, control.Font); 4869Assert.Equal(value ?? Control.DefaultFont, control.Font); 4875Assert.Equal(value ?? Control.DefaultFont, control.Font); 4883yield return new object[] { null, Control.DefaultFont.Height }; 4898Assert.Equal(value ?? Control.DefaultFont, control.Font); 4904Assert.Equal(value ?? Control.DefaultFont, control.Font); 4919Assert.Equal(value ?? Control.DefaultFont, control.Font); 4925Assert.Equal(value ?? Control.DefaultFont, control.Font); 4956Assert.Equal(value ?? Control.DefaultFont, control.Font); 4965Assert.Equal(value ?? Control.DefaultFont, control.Font); 5002Assert.Equal(value ?? Control.DefaultFont, control.Font); 5011Assert.Equal(value ?? Control.DefaultFont, control.Font); 5022using Control control = new(); 5051Assert.Equal(Control.DefaultFont, control.Font); 5064using Control child1 = new(); 5065using Control child2 = new(); 5066using Control control = new(); 5126Assert.Equal(Control.DefaultFont, control.Font); 5127Assert.Equal(Control.DefaultFont, child1.Font); 5128Assert.Equal(Control.DefaultFont, child2.Font); 5151using Control child1 = new() 5155using Control child2 = new() 5159using Control control = new(); 5219Assert.Equal(Control.DefaultFont, control.Font); 5242PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5243using Control control = new(); 5252Assert.Equal(Control.DefaultFont, control.Font); 5260Assert.Equal(Control.DefaultFont, control.Font); 5267PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Font)]; 5268using Control control = new(); 5277Assert.Equal(Control.DefaultFont, control.Font); 5285Assert.Equal(Control.DefaultFont, control.Font); 5293using Control control = new() 5310using Control control = new() 5329using Control child1 = new(); 5330using Control child2 = new(); 5331using Control control = new(); 5353using Control child1 = new() 5357using Control child2 = new() 5361using Control control = new(); 5383yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 5390using Control control = new(); 5418using Control control = new(); 5440Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5453using Control control = new(); 5478using Control child1 = new(); 5479using Control child2 = new(); 5480using Control control = new(); 5535Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5536Assert.Equal(Control.DefaultForeColor, child1.ForeColor); 5537Assert.Equal(Control.DefaultForeColor, child2.ForeColor); 5558using Control child1 = new() 5562using Control child2 = new() 5566using Control control = new(); 5615Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5638PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5639using Control control = new(); 5647Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5654PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 5655using Control control = new(); 5663Assert.Equal(Control.DefaultForeColor, control.ForeColor); 5670using Control cont = new(); 5970using Control parent = new(); 6205using Control parent = new(); 6363using Control control = new() 6380using Control control = new(); 6408using Control control = new(); 6444using Control control = new(); 6558using Control control = new(); 6571using Control control = new(); 6585using Control control = new() 6606using Control control = new(); 6637using Control control = new(); 6740using Control parent = new(); 6934using Control parent = new(); 7087using Control control = new(); 7145using Control control = new(); 7219using Control parent = new(); 7417using Control parent = new(); 7572PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7573using Control control = new(); 7596PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Location)]; 7597using Control control = new(); 7620using Control control = new(); 7680public void Control_Margin_GetWithCustomDefaultMargin_ReturnsExpected(Control control, Padding expected) 7707using Control control = new(); 7727using Control parent = new(); 7728using Control control = new() 7757using Control control = new(); 7796using Control parent = new(); 7797using Control control = new() 7850PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7851using Control control = new(); 7866PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Margin)]; 7867using Control control = new(); 7889public void Control_MaximumSize_GetWithCustomDefaultMaximumSize_ReturnsExpected(Control control, Size expected) 7929using Control control = new(); 7951using Control control = new() 7997using Control control = new() 8028using Control control = new() 8053using Control control = new() 8100using Control parent = new(); 8101using Control control = new() 8155using Control parent = new(); 8156using Control control = new() 8198using Control control = new(); 8233using Control control = new() 8271using Control control = new() 8309using Control parent = new(); 8310using Control control = new() 8376using Control parent = new(); 8377using Control control = new() 8443PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8444using Control control = new(); 8467PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MaximumSize)]; 8468using Control control = new(); 8498public void Control_MinimumSize_GetWithCustomDefaultMinimumSize_ReturnsExpected(Control control, Size expected) 8538using Control control = new(); 8582using Control control = new() 8635using Control control = new() 8666using Control control = new() 8697using Control control = new() 8744using Control parent = new(); 8745using Control control = new() 8805using Control parent = new(); 8806using Control control = new() 8870using Control control = new(); 8927using Control control = new() 8993using Control control = new() 9052using Control parent = new(); 9053using Control control = new() 9140using Control parent = new(); 9141using Control control = new() 9213PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9214using Control control = new(); 9237PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.MinimumSize)]; 9238using Control control = new(); 9283Assert.Equal(expected, Control.MouseButtons); 9300using Control control = new() 9316using Control control = new() 9333using Control control = new() 9368using Control control = new() 9391public void Control_Padding_GetWithCustomDefaultPadding_ReturnsExpected(Control control, Padding expected) 9413using Control control = new(); 9439using Control parent = new(); 9440using Control control = new() 9537using Control parent = new(); 9608using Control control = new(); 9645PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9646using Control control = new(); 9661PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Padding)]; 9662using Control control = new(); 9683public void Control_Parent_Set_GetReturnsExpected(Control value) 9685using Control control = new() 9700public void Control_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 9702using Control oldParent = new(); 9703using Control control = new() 9723using Control parent = new(); 9724using Control control = new() 9741public void Control_Parent_SetWithHandle_GetReturnsExpected(Control value) 9743using Control control = new(); 9771using Control parent = new(); 9772using Control control = new(); 9807using Control control = new(); 9815using Control child = new(); 9816using Control control = new(); 9826using Control parent = new(); 9837using Control control = new(); 9838using Control child = new() 9856using Control child = new() 9878using Control control = new() 9896using Control control = new() 9918using Control control = new(); 9948using Control control = new() 9982using Control control = new(); 10057using Control control = new() 10074using Control control = new() 10093using Control child1 = new(); 10094using Control child2 = new(); 10095using Control control = new(); 10117using Control child1 = new() 10121using Control child2 = new() 10125using Control control = new(); 10149using Control control = new(); 10180using Control control = new() 10211using Control control = new(); 10246using Control control = new(); 10271using Control child1 = new(); 10272using Control child2 = new() 10276using Control control = new(); 10354using Control child1 = new() 10358using Control child2 = new() 10362using Control control = new(); 10435using Control control = new(); 10442PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10443using Control control = new(); 10470PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.RightToLeft)]; 10471using Control control = new(); 10649using Control control = new() 10666using Control control = new(); 10702using Control control = new() 10779using Control control = new(); 10875Assert.Equal(Control.DefaultBackColor, control.BackColor); 10877Assert.Equal(Control.DefaultForeColor, control.ForeColor); 10878Assert.Equal(Control.DefaultFont, control.Font); 10955using Control control = new() 11369using Control parent = new(); 11614using Control parent = new(); 11753PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11754using Control control = new(); 11777PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Size)]; 11778using Control control = new(); 11804using Control control = new() 11820using Control control = new() 11858using Control control = new(); 11866using Control control = new() 11888using Control control = new(); 11924using Control control = new() 11963using Control control = new() 11980using Control control = new(); 12008using Control control = new(); 12043PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12044using Control control = new(); 12070PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Text)]; 12071using Control control = new(); 12174using Control parent = new(); 12366using Control parent = new(); 12519using Control control = new(); 12567using Control grandparent = new(); 12568using Control parent = new() 12572using Control control = new() 12586using Control parent = new() 12590using Control control = new() 12603using Control control = new() 12625using Control control = new(); 12626using Control child1 = new(); 12627using Control child2 = new(); 12656using Control control = new(); 12696using Control parent = new() 12700using Control item = new() 12715using Control control = new() 12737using Control parent = new(); 12738using Control control = new() 12811using Control parent = new(); 12812using Control control = new() 12869using Control control = new() 12907using Control child1 = new(); 12908using Control child2 = new(); 12909using Control control = new() 12984using Control child1 = new() 12988using Control child2 = new() 12992using Control control = new() 13067PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13068using Control control = new(); 13083PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Visible)]; 13084using Control control = new(); 13389using Control parent = new(); 13624using Control parent = new(); 13763using Control cont = new(); 13775using Control control = new() 13790using Control control = new();
System\Windows\Forms\DataGridViewCellTests.cs (2)
4750Assert.True(dataGridView.AccessibilityObject is Control.ControlAccessibleObject); 4893Assert.Equal(new Size(10, Control.DefaultFont.Height + 9), cell.GetSize(rowIndex));
System\Windows\Forms\DataGridViewEditingControlShowingEventArgsTests.cs (1)
17public void DataGridViewEditingControlShowingEventArgs_NullArg_ThrowsArgumentNullException(Control control, DataGridViewCellStyle cellStyle)
System\Windows\Forms\DataGridViewRowHeightInfoNeededEventArgsTests.cs (1)
54Assert.Equal(Control.DefaultFont.Height + 9, row.Height);
System\Windows\Forms\DataGridViewRowTests.cs (35)
33Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1792Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1809Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1820yield return new object[] { DataGridViewAutoSizeRowsMode.AllHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1821yield return new object[] { DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1822yield return new object[] { DataGridViewAutoSizeRowsMode.AllCells, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1823yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1824yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1825yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCells, 2, 1, Control.DefaultFont.Height + 9, 0 }; 1846Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 1858Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1881Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 1893Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 1931yield return new object[] { autoSizeRowsMode, -1, Control.DefaultFont.Height + 9 }; 1932yield return new object[] { autoSizeRowsMode, 0, Control.DefaultFont.Height + 9 }; 1933yield return new object[] { autoSizeRowsMode, 1, Control.DefaultFont.Height + 9 }; 1934yield return new object[] { autoSizeRowsMode, 3, Control.DefaultFont.Height + 9 }; 1935yield return new object[] { autoSizeRowsMode, 4, Control.DefaultFont.Height + 9 }; 1936yield return new object[] { autoSizeRowsMode, 65536, Control.DefaultFont.Height + 9 }; 2032Assert.Equal(Control.DefaultFont.Height + 9, rowDefaultHeight); 2033Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 2315Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 2350Assert.Equal(Control.DefaultFont.Height + 9, e.Height); 2368yield return new object[] { 2, 2, Control.DefaultFont.Height + 9 }; 2369yield return new object[] { 3, 3, Control.DefaultFont.Height + 9 }; 2370yield return new object[] { 4, 4, Control.DefaultFont.Height + 9 }; 2400yield return new object[] { autoSizeRowsMode, 2, 2, Control.DefaultFont.Height + 9 }; 2401yield return new object[] { autoSizeRowsMode, 3, 3, Control.DefaultFont.Height + 9 }; 2402yield return new object[] { autoSizeRowsMode, 4, 4, Control.DefaultFont.Height + 9 }; 2403yield return new object[] { autoSizeRowsMode, 65536, 65536, Control.DefaultFont.Height + 9 }; 2406yield return new object[] { DataGridViewAutoSizeRowsMode.None, 2, 2, Control.DefaultFont.Height + 9 }; 2407yield return new object[] { DataGridViewAutoSizeRowsMode.None, 3, 3, Control.DefaultFont.Height + 9 }; 2408yield return new object[] { DataGridViewAutoSizeRowsMode.None, 4, 4, Control.DefaultFont.Height + 9 }; 2487Assert.Equal(Control.DefaultFont.Height + 9, row.Height); 3912Assert.Equal(Control.DefaultFont.Height + 9, row.Height);
System\Windows\Forms\DataGridViewTests.cs (10)
113using Control parent = new(); 255using Control parent = new(); 823public void DataGridView_Parent_Set_GetReturnsExpected(Control value) 840public void DataGridView_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 842using Control oldParent = new(); 863using Control parent = new(); 881public void DataGridView_Parent_SetWithHandle_GetReturnsExpected(Control value) 909using Control parent = new(); 1030using Control parent = new(); 1179using Control parent = new();
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (10)
14private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 76Assert.Equal(Control.DefaultFont, control.Font); 744Assert.Equal(expectedFont ?? Control.DefaultFont, control.Font); 955Assert.Equal(expectedFont ?? Control.DefaultFont, control.Font); 984Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1000Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1587using Control parent = new(); 1878using Control parent = new();
System\Windows\Forms\DataObjectComTests.cs (2)
18dynamic accessor = typeof(Control).TestAccessor().Dynamic; 37dynamic accessor = typeof(Control).TestAccessor().Dynamic;
System\Windows\Forms\DataObjectTests.cs (5)
2705dynamic controlAccessor = typeof(Control).TestAccessor().Dynamic; 2733dynamic controlAccessor = typeof(Control).TestAccessor().Dynamic; 2754dynamic accessor = typeof(Control).TestAccessor().Dynamic; 2770dynamic accessor = typeof(Control).TestAccessor().Dynamic; 2786dynamic accessor = typeof(Control).TestAccessor().Dynamic;
System\Windows\Forms\DateTimePickerTests.cs (4)
37Assert.Equal(Control.DefaultForeColor, control.CalendarForeColor); 38Assert.Equal(Control.DefaultFont, control.CalendarFont); 76Assert.Equal(Control.DefaultFont, control.Font); 99Assert.Equal(Control.DefaultFont.Height + 7, control.PreferredHeight);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
42Assert.Equal(Control.DefaultBackColor, control.BackColor); 92Assert.Equal(Control.DefaultFont, control.Font); 94Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (6)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 76Assert.Equal(Control.DefaultFont, control.Font); 78Assert.Equal(Control.DefaultForeColor, control.ForeColor); 803using Control result = new(); 812.Returns<Control>(null) 979public new Control GetControl() => base.GetControl();
System\Windows\Forms\DomainUpDownTests.cs (8)
57_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 58_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 59_sub.ClientSize.Should().Be(new Size(120, Control.DefaultFont.Height + 7)); 64_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3)); 65_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3)); 66_sub.ClientSize.Should().Be(new Size(116, Control.DefaultFont.Height + 3)); 98_sub.Font.Should().Be(Control.DefaultFont); 123_sub.PreferredHeight.Should().Be(Control.DefaultFont.Height + 7);
System\Windows\Forms\DragDropHelperTests.cs (1)
159Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\DrawToolTipEventArgsTests.cs (5)
20public void Ctor_Graphics_IWin32Window_Control_Rectangle_String_Color_Color_Font(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 45public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 55public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 65public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 75public void DrawBorder_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font)
System\Windows\Forms\ErrorProviderTests.cs (19)
871using Control control = new(); 894using Control control = new(); 924using Control control = new(); 953using Control control = new(); 971using Control control = new(); 989using Control control = new(); 1045using Control control = new(); 1072using Control control = new(); 1096using Control control = new(); 1105using Control control = new(); 1140using Control originalParent = new(); 1141using Control newParent = new(); 1227using Control control1 = new(); 1238using Control control1 = new(); 1251using Control control1 = new(); 1264using Control control1 = new(); 1277using Control control1 = new(); 1293using Control control1 = new(); 1306using Control control1 = new();
System\Windows\Forms\FlowLayoutPanelTests.cs (8)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 73Assert.Equal(Control.DefaultFont, control.Font); 75Assert.Equal(Control.DefaultForeColor, control.ForeColor); 215using Control extendee = new() 250using Control child = new(); 318using Control child = new(); 354using Control parent = new(); 355using Control child = new()
System\Windows\Forms\FlowLayoutSettingsTests.cs (3)
134using Control child = new(); 174using Control parent = new(); 175using Control child = new()
System\Windows\Forms\FontDialogTests.cs (10)
26Assert.Equal(Control.DefaultFont, dialog.Font); 56Assert.Equal(Control.DefaultFont, dialog.Font); 303Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 307Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 321Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 325Assert.Equal(value ?? Control.DefaultFont, dialog.Font); 341Assert.Equal(Control.DefaultFont, dialog.Font); 358Assert.Equal(Control.DefaultFont, dialog.Font); 615Assert.Equal(Control.DefaultFont, dialog.Font); 749Assert.Equal($"System.Windows.Forms.Tests.FontDialogTests+SubFontDialog, Font: {Control.DefaultFont}", dialog.ToString());
System\Windows\Forms\FormTests.cs (21)
40Assert.Equal(Control.DefaultBackColor, control.BackColor); 94Assert.Equal(Control.DefaultFont, control.Font); 96Assert.Equal(Control.DefaultForeColor, control.ForeColor); 931public void Form_Parent_Set_GetReturnsExpected(Control value) 951public void Form_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 953using Control oldParent = new(); 1072public void Form_Parent_SetMdiChild_GetReturnsExpected(Control value) 1099using Control parent = new(); 1118public void Form_Parent_SetWithHandle_GetReturnsExpected(Control value) 1153using Control parent = new(); 1204using Control parent = new(); 2574yield return new Action<Form, Control>[] 2576(Form form, Control control) => form.Show(owner: control) 2578yield return new Action<Form, Control>[] 2580(Form form, Control control) => form.ShowDialog(owner: control) 2584yield return new Action<Form, Control>[] 2586(Form form, Control control) => form.Show(owner: control.FindForm()) 2588yield return new Action<Form, Control>[] 2590(Form form, Control control) => form.ShowDialog(owner: control.FindForm()) 2596public void Form_Show_SetsOwnerToTopLevelForm_WhenShownWithOwner(Action<Form, Control> showAction) 2601using Control control = new();
System\Windows\Forms\GroupBoxTests.cs (34)
27Assert.Equal(Control.DefaultBackColor, control.BackColor); 56Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 64Assert.Equal(Control.DefaultFont, control.Font); 66Assert.Equal(Control.DefaultForeColor, control.ForeColor); 83Assert.Equal(new Size(6, 6 + Control.DefaultFont.Height), control.PreferredSize); 267using Control parent = new(); 415using Control parent = new(); 569Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 578Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 925using Control child = new() 1218using Control parent = new(); 1315using Control parent = new(); 1382Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1397Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1514Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1515Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1522Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1523Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1562Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1563Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1573Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 1574Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1982using Control parent = new(); 2027using Control parent = new() 2043using Control parent = new()
System\Windows\Forms\HelpProviderTests.cs (14)
50using Control control = new(); 147using Control control = new(); 158using Control control = new(); 187using Control control = new(); 221using Control control = new(); 253using Control control = new(); 288using Control control = new(); 305using Control control = new(); 323using Control control = new(); 358using Control control = new(); 377using Control control = new(); 397using Control control = new(); 424using Control control = new(); 450using Control control = new();
System\Windows\Forms\HScrollBarTests.cs (3)
24Assert.Equal(Control.DefaultBackColor, control.BackColor); 71Assert.Equal(Control.DefaultFont, control.Font); 73Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\HtmlDocumentTests.cs (96)
18using Control parent = new(); 50using Control parent = new(); 82using Control parent = new(); 106using Control parent = new(); 136using Control parent = new(); 156using Control parent = new(); 176using Control parent = new(); 193using Control parent = new(); 210using Control parent = new(); 235using Control parent = new(); 267using Control parent = new(); 299using Control parent = new(); 329using Control parent = new(); 359using Control parent = new(); 376using Control parent = new(); 393using Control parent = new(); 418using Control parent = new(); 435using Control parent = new(); 470using Control parent = new(); 485using Control parent = new(); 500using Control parent = new(); 522using Control parent = new(); 537using Control parent = new(); 553using Control parent = new(); 575using Control parent = new(); 590using Control parent = new(); 604using Control parent = new(); 628using Control parent = new(); 662using Control parent = new(); 676using Control parent = new(); 691using Control parent = new(); 715using Control parent = new(); 747using Control parent = new(); 779using Control parent = new(); 801using Control parent = new(); 832using Control parent = new(); 852using Control parent = new(); 868using Control parent = new(); 888using Control parent = new(); 904using Control parent = new(); 936using Control parent = new(); 968using Control parent = new(); 990using Control parent = new(); 1020using Control parent = new(); 1040using Control parent = new(); 1056using Control parent = new(); 1081using Control parent = new(); 1104using Control parent = new(); 1128using Control parent = new(); 1165using Control parent = new(); 1179using Control parent = new(); 1194using Control parent = new(); 1216using Control parent = new(); 1246using Control parent = new(); 1267using Control parent = new(); 1299using Control parent = new(); 1331using Control parent = new(); 1353using Control parent = new(); 1383using Control parent = new(); 1402using Control parent = new(); 1464using Control parent = new(); 1502using Control parent = new(); 1520using Control parent = new(); 1540using Control parent = new(); 1557using Control parent = new(); 1573using Control parent = new(); 1601using Control parent = new(); 1618using Control parent = new(); 1635using Control parent = new(); 1658using Control parent = new(); 1676using Control parent = new(); 1691using Control parent = new(); 1710using Control parent = new(); 1728using Control parent = new(); 1742using Control parent = new(); 1759using Control parent = new(); 1784using Control parent = new(); 1804using Control parent = new(); 1818using Control parent = new(); 1836using Control parent = new(); 1875using Control parent = new(); 1902using Control parent = new(); 1919using Control parent = new(); 1936using Control parent = new(); 1954using Control parent = new(); 1974using Control parent = new(); 1995using Control parent = new(); 2033using Control parent = new(); 2071using Control parent = new(); 2109using Control parent = new(); 2147using Control parent = new(); 2185using Control parent = new(); 2223using Control parent = new(); 2261using Control parent = new(); 2299using Control parent = new(); 2337using Control parent = new();
System\Windows\Forms\HtmlElementTests.cs (127)
18using Control parent = new(); 38using Control parent = new(); 55using Control parent = new(); 74using Control parent = new(); 89using Control parent = new(); 104using Control parent = new(); 120using Control parent = new(); 139using Control parent = new(); 156using Control parent = new(); 178using Control parent = new(); 196using Control parent = new(); 212using Control parent = new(); 234using Control parent = new(); 273using Control parent = new(); 288using Control parent = new(); 306using Control parent = new(); 321using Control parent = new(); 339using Control parent = new(); 364using Control parent = new(); 395using Control parent = new(); 410using Control parent = new(); 429using Control parent = new(); 455using Control parent = new(); 486using Control parent = new(); 501using Control parent = new(); 516using Control parent = new(); 531using Control parent = new(); 550using Control parent = new(); 576using Control parent = new(); 607using Control parent = new(); 622using Control parent = new(); 637using Control parent = new(); 652using Control parent = new(); 668using Control parent = new(); 694using Control parent = new(); 727using Control parent = new(); 742using Control parent = new(); 760using Control parent = new(); 778using Control parent = new(); 796using Control parent = new(); 812using Control parent = new(); 827using Control parent = new(); 851using Control parent = new(); 882using Control parent = new(); 913using Control parent = new(); 928using Control parent = new(); 943using Control parent = new(); 962using Control parent = new(); 988using Control parent = new(); 1019using Control parent = new(); 1034using Control parent = new(); 1055using Control parent = new(); 1073using Control parent = new(); 1091using Control parent = new(); 1115using Control parent = new(); 1145using Control parent = new(); 1163using Control parent = new(); 1181using Control parent = new(); 1205using Control parent = new(); 1235using Control parent = new(); 1254using Control parent = new(); 1273using Control parent = new(); 1302using Control parent = new(); 1335using Control parent = new(); 1353using Control parent = new(); 1377using Control parent = new(); 1407using Control parent = new(); 1422using Control parent = new(); 1454using Control parent = new(); 1492using Control parent = new(); 1509using Control parent = new(); 1574using Control parent = new(); 1615using Control parent = new(); 1657using Control parent = new(); 1696using Control parent = new(); 1715using Control parent = new(); 1735using Control parent = new(); 1764using Control parent = new(); 1782using Control parent = new(); 1800using Control parent = new(); 1822using Control parent = new(); 1840using Control parent = new(); 1856using Control parent = new(); 1888using Control parent = new(); 1908using Control parent = new(); 1923using Control parent = new(); 1948using Control parent = new(); 1963using Control parent = new(); 1986using Control parent = new(); 2024using Control parent = new(); 2068using Control parent = new(); 2106using Control parent = new(); 2150using Control parent = new(); 2186using Control parent = new(); 2230using Control parent = new(); 2265using Control parent = new(); 2309using Control parent = new(); 2325using Control parent = new(); 2341using Control parent = new(); 2361using Control parent = new(); 2380using Control parent = new(); 2398using Control parent = new(); 2419using Control parent = new(); 2438using Control parent = new(); 2463using Control parent = new(); 2478using Control parent = new(); 2495using Control parent = new(); 2518using Control parent = new(); 2542using Control parent = new(); 2583using Control parent = new(); 2624using Control parent = new(); 2665using Control parent = new(); 2706using Control parent = new(); 2747using Control parent = new(); 2788using Control parent = new(); 2829using Control parent = new(); 2870using Control parent = new(); 2911using Control parent = new(); 2952using Control parent = new(); 2993using Control parent = new(); 3034using Control parent = new(); 3075using Control parent = new(); 3116using Control parent = new(); 3157using Control parent = new(); 3198using Control parent = new(); 3239using Control parent = new(); 3280using Control parent = new();
System\Windows\Forms\HtmlWindowTests.cs (4)
15using Control parent = new(); 31using Control parent = new(); 47using Control parent = new(); 68using Control parent = new();
System\Windows\Forms\LabelTests.cs (3)
26Assert.Equal(Control.DefaultBackColor, control.BackColor); 64Assert.Equal(Control.DefaultFont, control.Font); 66Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
40using Control child1 = new() 45using Control child2 = new() 50using Control largeChild = new() 55using Control emptyChild = new() 59using Control emptyChildWithMargin = new() 64using Control child3 = new() 69using Control child4 = new() 101using Control child1 = new() 106using Control child2 = new() 111using Control largeChild = new() 116using Control emptyChild = new() 120using Control emptyChildWithMargin = new() 125using Control child3 = new() 130using Control child4 = new() 162using Control child1 = new() 167using Control child2 = new() 172using Control largeChild = new() 177using Control emptyChild = new() 181using Control emptyChildWithMargin = new() 186using Control child3 = new() 191using Control child4 = new() 223using Control child1 = new() 228using Control child2 = new() 233using Control largeChild = new() 238using Control emptyChild = new() 242using Control emptyChildWithMargin = new() 247using Control child3 = new() 252using Control child4 = new()
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (58)
159using Control child = new(); 168using Control child = new(); 209using Control child = new(); 219using Control child = new(); 229using Control child = new(); 239using Control child = new(); 251using Control child = new(); 258using Control child = new(); 299using Control child = new(); 308using Control child = new(); 317using Control child = new(); 352using Control child = new(); 359using Control child = new(); 400using Control child = new(); 409using Control child = new(); 460using Control child = new(); 497using Control parent = new(); 498using Control child = new() 550using Control child = new(); 572using Control parent = new(); 573using Control child = new() 621using Control child = new(); 635using Control child = new(); 684using Control child = new(); 716using Control parent = new(); 717using Control child = new() 773using Control child = new(); 799using Control parent = new(); 800using Control child = new() 841using Control child = new(); 855using Control child = new(); 922using Control child = new(); 951using Control parent = new(); 952using Control child = new() 1006using Control child = new(); 1030using Control parent = new(); 1031using Control child = new() 1072using Control child = new(); 1086using Control child = new(); 1160using Control child = new(); 1192using Control parent = new(); 1193using Control child = new() 1249using Control child = new(); 1275using Control parent = new(); 1276using Control child = new() 1317using Control child = new(); 1331using Control child = new(); 1398using Control child = new(); 1427using Control parent = new(); 1428using Control child = new() 1482using Control child = new(); 1506using Control parent = new(); 1507using Control child = new() 1548using Control child = new(); 1562using Control child = new(); 1660using Control controlWithName = new() 1664using Control controlWithDefaultName = new(); 1777using Control controlWithName = new() { Name = "name" };
System\Windows\Forms\LayoutEventArgsTests.cs (2)
24Assert.Equal(affectedComponent as Control, e.AffectedControl); 37public void Ctor_Control_String(Control affectedControl, string affectedProperty)
System\Windows\Forms\ListBoxTests.cs (37)
71Assert.Equal(Control.DefaultFont, control.Font); 86Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 100Assert.Equal(Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3, control.PreferredHeight); 928using Control parent = new(); 1058Assert.Equal(value ?? Control.DefaultFont, control.Font); 1066Assert.Equal(value ?? Control.DefaultFont, control.Font); 1086Assert.Equal(value ?? Control.DefaultFont, control.Font); 1094Assert.Equal(value ?? Control.DefaultFont, control.Font); 1126Assert.Equal(value ?? Control.DefaultFont, control.Font); 1137Assert.Equal(value ?? Control.DefaultFont, control.Font); 1175Assert.Equal(value ?? Control.DefaultFont, control.Font); 1186Assert.Equal(value ?? Control.DefaultFont, control.Font); 1228Assert.Equal(Control.DefaultFont, control.Font); 1742yield return new object[] { DrawMode.Normal, integralHeight, Control.DefaultFont.Height, 0 }; 1745yield return new object[] { DrawMode.OwnerDrawFixed, integralHeight, Control.DefaultFont.Height, 0 }; 1748yield return new object[] { DrawMode.OwnerDrawVariable, integralHeight, Control.DefaultFont.Height, 0 }; 1826Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 1842Assert.Equal(Control.DefaultFont.Height, control.ItemHeight); 2051yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, Control.DefaultFont.Height + extra }; 2052yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, Control.DefaultFont.Height + extra }; 2053yield return new object[] { DrawMode.Normal, BorderStyle.None, Control.DefaultFont.Height }; 2055yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, Control.DefaultFont.Height + extra }; 2056yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, Control.DefaultFont.Height + extra }; 2057yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, Control.DefaultFont.Height }; 2080yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2081yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2082yield return new object[] { DrawMode.Normal, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 2084yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2085yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2086yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 2088yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.Fixed3D, (Control.DefaultFont.Height * 2) + extra }; 2089yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.FixedSingle, (Control.DefaultFont.Height * 2) + extra }; 2090yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.None, (Control.DefaultFont.Height * 2) }; 4760Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 5149Assert.Equal(Control.DefaultFont.Height, control.GetItemHeight(0)); 5172Assert.Equal(Control.DefaultFont.Height, control.GetItemHeight(index));
System\Windows\Forms\ListControlTests.cs (3)
28Assert.Equal(Control.DefaultBackColor, control.BackColor); 67Assert.Equal(Control.DefaultFont, control.Font); 69Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ListViewItemTests.cs (26)
20Assert.Equal(Control.DefaultFont, item.Font); 59Assert.Equal(font ?? Control.DefaultFont, item.Font); 97Assert.Equal(font ?? Control.DefaultFont, item.Font); 135Assert.Equal(font ?? Control.DefaultFont, item.Font); 173Assert.Equal(font ?? Control.DefaultFont, item.Font); 210Assert.Equal(Control.DefaultFont, item.Font); 247Assert.Equal(Control.DefaultFont, item.Font); 285Assert.Equal(Control.DefaultFont, item.Font); 323Assert.Equal(Control.DefaultFont, item.Font); 360Assert.Equal(Control.DefaultFont, item.Font); 398Assert.Equal(Control.DefaultFont, item.Font); 436Assert.Equal(Control.DefaultFont, item.Font); 473Assert.Equal(Control.DefaultFont, item.Font); 511Assert.Equal(Control.DefaultFont, item.Font); 549Assert.Equal(Control.DefaultFont, item.Font); 587Assert.Equal(Control.DefaultFont, item.Font); 624Assert.Equal(Control.DefaultFont, item.Font); 662Assert.Equal(Control.DefaultFont, item.Font); 700Assert.Equal(Control.DefaultFont, item.Font); 737Assert.Equal(Control.DefaultFont, item.Font); 776Assert.Equal(Control.DefaultFont, item.Font); 806Assert.Equal(Control.DefaultFont, item.Font); 971Assert.Equal(value ?? Control.DefaultFont, item.Font); 975Assert.Equal(Control.DefaultFont, item.Font); 987Assert.Equal(value ?? Control.DefaultFont, item.Font); 991Assert.Equal(value ?? Control.DefaultFont, item.Font);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (3)
275Assert.Equal(font ?? Control.DefaultFont, subItem.Font); 405Assert.Equal(font ?? Control.DefaultFont, collection[0].Font); 409Assert.Equal(font ?? Control.DefaultFont, collection[1].Font);
System\Windows\Forms\ListViewSubItemTests.cs (14)
19Assert.Equal(Control.DefaultFont, subItem.Font); 45Assert.Equal(Control.DefaultFont, subItem.Font); 71Assert.Equal(font ?? Control.DefaultFont, subItem.Font); 240Assert.Equal(Control.DefaultFont, subItem.Font); 244Assert.Equal(Control.DefaultFont, subItem.Font); 266Assert.Equal(Control.DefaultFont, subItem.Font); 277Assert.Same(value ?? Control.DefaultFont, subItem.Font); 281Assert.Same(value ?? Control.DefaultFont, subItem.Font); 320Assert.Equal(value ?? Control.DefaultFont, subItem.Font); 324Assert.Equal(value ?? Control.DefaultFont, subItem.Font); 543Assert.Equal(Control.DefaultFont, subItem.Font); 548Assert.Equal(Control.DefaultFont, subItem.Font); 560Assert.Equal(Control.DefaultFont, subItem.Font); 565Assert.Equal(Control.DefaultFont, subItem.Font);
System\Windows\Forms\ListViewTests.cs (3)
79Assert.Equal(Control.DefaultFont, control.Font); 4839ToolInfoWrapper<Control> wrapper = listView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip); 4852ToolInfoWrapper<Control> wrapper = listView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip);
System\Windows\Forms\MdiClientTests.cs (14)
50Assert.Equal(Control.DefaultFont, control.Font); 51Assert.Equal(Control.DefaultForeColor, control.ForeColor); 132Assert.Equal(Control.DefaultBackColor, control.BackColor); 154Assert.Equal(Control.DefaultBackColor, control.BackColor); 170Assert.Equal(Control.DefaultBackColor, control.BackColor); 179using Control parent = new() 258using Control parent = new() 374using Control parent = new() 418using Control parent = new() 696using Control parent = new(); 845using Control parent = new() 1007using Control parent = new() 1148PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(MdiClient))[nameof(Control.Size)]; 1172PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(MdiClient))[nameof(Control.Size)];
System\Windows\Forms\MdiControlStripTests.cs (3)
32Assert.Equal(Control.DefaultBackColor, mdiControlStrip.BackColor); 81Assert.Equal(Control.DefaultFont, mdiControlStrip.Font); 83Assert.Equal(Control.DefaultForeColor, mdiControlStrip.ForeColor);
System\Windows\Forms\MenuStripTests.cs (4)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 79Assert.Equal(Control.DefaultFont, control.Font); 81Assert.Equal(Control.DefaultForeColor, control.ForeColor); 697using Control parent = new();
System\Windows\Forms\MixedDpiHostingTests.cs (1)
27using Control control = new();
System\Windows\Forms\MonthCalendarTests.cs (3)
81Assert.Equal(Control.DefaultFont, control.Font); 2292Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\NativeWindowTests.cs (12)
20using Control control = new(); 49using Control control = new(); 86using Control control = new(); 143using Control control = new(); 172using Control control = new(); 236using Control control = new(); 293using Control control = new(); 338using Control control = new(); 404using Control control = new(); 414using Control control = new(); 426using Control control = new(); 472using Control control = new();
System\Windows\Forms\PanelTests.cs (7)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 73Assert.Equal(Control.DefaultFont, control.Font); 75Assert.Equal(Control.DefaultForeColor, control.ForeColor); 255using Control parent = new(); 403using Control parent = new(); 612using Control child = new() 627using Control child = new()
System\Windows\Forms\PictureBoxTests.cs (15)
29Assert.Equal(Control.DefaultBackColor, control.BackColor); 68Assert.Equal(Control.DefaultFont, control.Font); 70Assert.Equal(Control.DefaultForeColor, control.ForeColor); 238using Control control = new() 257using Control control = new(); 275using Control control = new() 457Assert.Equal(Control.DefaultForeColor, control.ForeColor); 475Assert.Equal(value ?? Control.DefaultFont, control.Font); 481Assert.Equal(value ?? Control.DefaultFont, control.Font); 518Assert.Equal(Control.DefaultFont, control.Font); 1123public void PictureBox_Parent_Set_GetReturnsExpected(Control value) 1138public void PictureBox_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 1140using Control oldParent = new(); 1159using Control parent = new(); 1176using Control parent = new();
System\Windows\Forms\PopupEventArgsTests.cs (1)
19public void Ctor_IWin32Window_Control_Bool_Size(IWin32Window associatedWindow, Control associatedControl, bool isBalloon, Size size)
System\Windows\Forms\ProgressBarTests.cs (11)
26Assert.Equal(Control.DefaultBackColor, control.BackColor); 61Assert.Equal(Control.DefaultFont, control.Font); 480Assert.Equal(value ?? Control.DefaultFont, control.Font); 486Assert.Equal(value ?? Control.DefaultFont, control.Font); 523Assert.Equal(Control.DefaultFont, control.Font); 624PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 640PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.ForeColor)]; 1770Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.DropDownHolder.DropDownHolderAccessibleObjectTests.cs (2)
44Control.ControlAccessibleObject accessibilityObject = ownerControl.AccessibilityObject as Control.ControlAccessibleObject;
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewListBoxAccessibleObjectTests.cs (1)
5using static System.Windows.Forms.Control;
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
8using static System.Windows.Forms.Control;
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (5)
42Validate.TextOut("Misc", new(25, 4, 25, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 48Validate.TextOut(pt.X.ToString(), new(145, 22, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 51Validate.TextOut(nameof(Point.X), new(25, 23, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 57Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 60Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\PropertyGridTests.cs (11)
40Assert.Equal(Control.DefaultBackColor, control.BackColor); 102Assert.Equal(Control.DefaultFont, control.Font); 104Assert.Equal(Control.DefaultForeColor, control.ForeColor); 304yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 365Assert.Equal(Control.DefaultBackColor, control.BackColor); 387Assert.Equal(Control.DefaultBackColor, control.BackColor); 403Assert.Equal(Control.DefaultBackColor, control.BackColor); 1632yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 1690Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1712Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1728Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\RadioButtonTests.cs (3)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 71Assert.Equal(Control.DefaultFont, control.Font); 73Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ReadOnlyControlCollectionTests.cs (1)
11using Control owner = new();
System\Windows\Forms\RichTextBoxTests.cs (33)
22private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 80Assert.Equal(Control.DefaultFont, control.Font); 460using Control parent = new(); 669yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 677using Control control = new(); 1337Assert.Equal(value ?? Control.DefaultFont, control.Font); 1343Assert.Equal(value ?? Control.DefaultFont, control.Font); 1357Assert.Equal(value ?? Control.DefaultFont, control.Font); 1363Assert.Equal(value ?? Control.DefaultFont, control.Font); 1379Assert.Equal(value ?? Control.DefaultFont, control.Font); 1385Assert.Equal(value ?? Control.DefaultFont, control.Font); 1402Assert.Equal(value ?? Control.DefaultFont, control.Font); 1408Assert.Equal(value ?? Control.DefaultFont, control.Font); 1439Assert.Equal(value ?? Control.DefaultFont, control.Font); 1448Assert.Equal(value ?? Control.DefaultFont, control.Font); 1476Assert.Equal(value ?? Control.DefaultFont, control.Font); 1485Assert.Equal(value ?? Control.DefaultFont, control.Font); 1523Assert.Equal(value ?? Control.DefaultFont, control.Font); 1532Assert.Equal(value ?? Control.DefaultFont, control.Font); 1562Assert.Equal(value ?? Control.DefaultFont, control.Font); 1571Assert.Equal(value ?? Control.DefaultFont, control.Font); 1626Assert.Equal(Control.DefaultFont.Name, format1.FaceName.ToString()); 1627Assert.Equal((int)(Control.DefaultFont.SizeInPoints * 20), format1.yHeight); 1665Assert.Equal(Control.DefaultFont, control.Font); 2131using Control parent = new(); 2187using Control parent = new(); 2962using Control parent = new(); 3085using Control parent = new(); 7100using Control parent = new(); 7328using Control parent = new(); 10597Mock<Control> mockParent = new() { CallBase = true }; 10598Mock<Control.ControlAccessibleObject> mockAccessibleObject = new(MockBehavior.Strict, mockParent.Object); 10609using Control parent = mockParent.Object;
System\Windows\Forms\ScreenTests.cs (5)
68Control createdControl = new(); 75public void Screen_FromControl_Invoke_ReturnsExpected(Control control) 99using Control control = new(); 141public void Screen_GetBounds_InvokeControl_ReturnsExpected(Control control) 171public void Screen_GetWorkingArea_InvokeControl_ReturnsExpected(Control control)
System\Windows\Forms\ScrollableControlTests.cs (14)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 72Assert.Equal(Control.DefaultFont, control.Font); 74Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1388Control affectedControl; 1401public void ScrollableControl_OnLayout_Invoke_CallsLayout(bool autoScroll, LayoutEventArgs eventArgs, int expectedCallCount, Control affectedControl) 1568Func<Control> controlFactory = () => new Control 1576foreach (Func<Control> parentFactory in new Func<Control>[] { controlFactory, tabPageFactory }) 1616foreach (Func<Control> parentFactory in new Func<Control>[] { CreateControl, CreateTabPage }) 1663static Control CreateControl() => new() 1675public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 1821using Control parent = new() 2528public void ScrollableControl_ScrollControlIntoView_Invoke_Success(bool autoScroll, bool hScroll, bool vScroll, Size clientSize, Control activeControl, Rectangle expectedDisplayRectangle)
System\Windows\Forms\ScrollBarTests.cs (8)
25Assert.Equal(Control.DefaultBackColor, control.BackColor); 61Assert.Equal(Control.DefaultFont, control.Font); 63Assert.Equal(Control.DefaultForeColor, control.ForeColor); 234Assert.Equal(Control.DefaultBackColor, control.BackColor); 488Assert.Equal(value ?? Control.DefaultFont, control.Font); 494Assert.Equal(value ?? Control.DefaultFont, control.Font); 531Assert.Equal(Control.DefaultFont, control.Font); 583Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\SplitterPanelTests.cs (7)
36Assert.Equal(Control.DefaultBackColor, control.BackColor); 66Assert.Equal(Control.DefaultFont, control.Font); 67Assert.Equal(Control.DefaultForeColor, control.ForeColor); 214using Control parent = new(); 275using Control parent = new(); 719public void SplitterPanel_Parent_Set_GetReturnsExpected(Control value) 737using Control parent = new();
System\Windows\Forms\SplitterTests.cs (20)
25Assert.Equal(Control.DefaultBackColor, control.BackColor); 62Assert.Equal(Control.DefaultFont, control.Font); 64Assert.Equal(Control.DefaultForeColor, control.ForeColor); 740Assert.Equal(value ?? Control.DefaultFont, control.Font); 746Assert.Equal(value ?? Control.DefaultFont, control.Font); 783Assert.Equal(Control.DefaultFont, control.Font); 814yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 871Assert.Equal(Control.DefaultForeColor, control.ForeColor); 1140using Control parent = new() 1195using Control parent = new() 1200using Control child = new() 1240using Control parent = new() 1245using Control child = new() 1312using Control parent = new() 1359using Control parent = new() 1364using Control child = new() 2007using Control parent = new() 2012using Control child = new() 2108using Control parent = new() 2113using Control child = new()
System\Windows\Forms\StatusStripTests.cs (7)
30Assert.Equal(Control.DefaultBackColor, control.BackColor); 79Assert.Equal(Control.DefaultFont, control.Font); 81Assert.Equal(Control.DefaultForeColor, control.ForeColor); 862Control.ControlAccessibleObject instance = Assert.IsAssignableFrom<Control.ControlAccessibleObject>(control.CreateAccessibilityInstance()); 1185Control grip = Assert.IsAssignableFrom<Control>(Assert.Single(control.Controls));
System\Windows\Forms\TabControl.ControlCollectionTests.cs (28)
86Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 114Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 225Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 266Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 386Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 420Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 543Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 590Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 741Assert.Equal(items, collection.Cast<Control>()); 875using Control value = new(); 1367Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1372Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1377Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1405Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1410Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1415Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1436Assert.Equal(items, collection.Cast<Control>()); 1445Assert.Equal(items, collection.Cast<Control>()); 1455using Control value1 = new(); 1456using Control value2 = new();
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (59)
74Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 103Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 216Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 258Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 380Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 415Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 540Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 588Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 746Assert.Equal(items, owner.Controls.Cast<Control>()); 2016Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2047Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2153Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2197Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2323Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2360Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2489Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2539Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3062Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3093Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3378Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3423Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3463Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3519Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3777Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3821Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3860Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3915Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 4471Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4476Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4481Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 4511Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4516Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4521Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>());
System\Windows\Forms\TabControlTests.cs (13)
28Assert.Equal(Control.DefaultBackColor, control.BackColor); 64Assert.Equal(Control.DefaultFont, control.Font); 66Assert.Equal(Control.DefaultForeColor, control.ForeColor); 941yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 2994Control.ControlCollection controls = Assert.IsType<TabControl.ControlCollection>(control.CreateControlsInstance()); 3865[InlineData(typeof(Control))] 4889Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4897Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4906Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 5773public new Control.ControlCollection CreateControlsInstance() => base.CreateControlsInstance();
System\Windows\Forms\TableLayoutControlCollectionTests.cs (3)
32using Control child = new(); 44using Control child = new(); 56using Control child = new();
System\Windows\Forms\TableLayoutPanelTests.cs (48)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 78Assert.Equal(Control.DefaultFont, control.Font); 80Assert.Equal(Control.DefaultForeColor, control.ForeColor); 336PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)]; 343using Control child = new(); 356PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)]; 363using Control child = new(); 497using Control controlWithName = new() { Name = "name" }; 498using Control controlWithDefaultName = new(); 646using Control child = new(); 661using Control child = new(); 670using Control child = new(); 679using Control child = new(); 694using Control child = new(); 735using Control child = new(); 775using Control child = new(); 795using Control child = new() 818using Control child = new() 840using Control otherChild = new(); 841using Control child = new() 888using Control child = new(); 902using Control child = new(); 914using Control child = new(); 932using Control child = new(); 1140using Control child = new(); 1505using Control child1 = new(); 1510using Control child2 = new(); 1555using Control child = new(); 1591using Control parent = new(); 1592using Control child = new() 1642using Control child = new(); 1666using Control child = new(); 1697using Control parent = new(); 1698using Control child = new() 1748using Control child = new(); 1777using Control child = new(); 1806using Control parent = new(); 1807using Control child = new() 1857using Control child = new(); 1893using Control child = new(); 1924using Control parent = new(); 1925using Control child = new() 1975using Control child = new(); 2004using Control child = new(); 2033using Control parent = new(); 2034using Control child = new() 2084using Control child = new(); 2114using Control extendee = new();
System\Windows\Forms\TabPageTests.cs (27)
34Assert.Equal(Control.DefaultBackColor, control.BackColor); 78Assert.Equal(Control.DefaultFont, control.Font); 80Assert.Equal(Control.DefaultForeColor, control.ForeColor); 143Assert.Equal(Control.DefaultBackColor, control.BackColor); 187Assert.Equal(Control.DefaultFont, control.Font); 189Assert.Equal(Control.DefaultForeColor, control.ForeColor); 534Assert.Equal(Control.DefaultBackColor, control.BackColor); 552Assert.Equal(Control.DefaultBackColor, control.BackColor); 581Assert.Equal(Control.DefaultBackColor, control.BackColor); 603Assert.Equal(Control.DefaultBackColor, control.BackColor); 609yield return new object[] { true, TabAppearance.Buttons, Control.DefaultBackColor }; 610yield return new object[] { true, TabAppearance.FlatButtons, Control.DefaultBackColor }; 612yield return new object[] { false, TabAppearance.Buttons, Control.DefaultBackColor }; 613yield return new object[] { false, TabAppearance.FlatButtons, Control.DefaultBackColor }; 614yield return new object[] { false, TabAppearance.Normal, Control.DefaultBackColor }; 827yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 884Assert.Equal(Control.DefaultBackColor, control.BackColor); 2481public void TabPage_Parent_Set_GetReturnsExpected(Control value) 2498public void TabPage_Parent_SetWithNonNullOldParent_GetReturnsExpected(Control value) 2539public void TabPage_Parent_SetWithHandle_GetReturnsExpected(Control value) 2613using Control parent = new(); 3744Control.ControlCollection controls = Assert.IsType<TabPage.TabPageControlCollection>(control.CreateControlsInstance()); 3814using Control parent = new() 3818using Control control = new() 3830using Control grandparent = new(); 3831using Control parent = new() 3835using Control control = new()
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (13)
28using Control control1 = new(); 29using Control control2 = new(); 36Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 62Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 67Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 78Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 83Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 93Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>());
System\Windows\Forms\TaskDialogTests.cs (2)
17Control.CheckForIllegalCrossThreadCalls = true; 41Control.CheckForIllegalCrossThreadCalls = true;
System\Windows\Forms\ToolStripButtonTests.cs (16)
30Assert.Equal(Control.DefaultBackColor, item.BackColor); 55Assert.NotSame(Control.DefaultFont, item.Font); 57Assert.Equal(Control.DefaultForeColor, item.ForeColor); 111Assert.Equal(Control.DefaultBackColor, item.BackColor); 136Assert.NotSame(Control.DefaultFont, item.Font); 138Assert.Equal(Control.DefaultForeColor, item.ForeColor); 198Assert.Equal(Control.DefaultBackColor, item.BackColor); 223Assert.NotSame(Control.DefaultFont, item.Font); 225Assert.Equal(Control.DefaultForeColor, item.ForeColor); 288Assert.Equal(Control.DefaultBackColor, item.BackColor); 313Assert.NotSame(Control.DefaultFont, item.Font); 315Assert.Equal(Control.DefaultForeColor, item.ForeColor); 401Assert.NotSame(Control.DefaultFont, item.Font); 403Assert.Equal(Control.DefaultForeColor, item.ForeColor); 499Assert.NotSame(Control.DefaultFont, item.Font); 501Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
100using Control control = new();
System\Windows\Forms\ToolStripContentPanelTests.cs (7)
32Assert.Equal(Control.DefaultBackColor, control.BackColor); 75Assert.Equal(Control.DefaultFont, control.Font); 77Assert.Equal(Control.DefaultForeColor, control.ForeColor); 494using Control parent = new(); 555using Control parent = new(); 634using Control parent = new() 710Assert.Equal(Control.DefaultBackColor, control.BackColor);
System\Windows\Forms\ToolStripControlHostTests.cs (194)
45public void ToolStripControlHost_Ctor_Control(Control c) 137using Control c = new(); 156using Control c = new(); 167using Control c = new(); 186using Control c = new(); 197using Control c = new(); 216using Control c = new(); 227using Control c = new(); 247using Control c = new(); 255using Control c = new(); 266using Control c = new(); 285using Control c = new(); 308Assert.Equal(Control.DefaultBackColor, item.BackColor); 321using Control c = new(); 332using Control c = new(); 341Assert.Equal(Control.DefaultBackColor, item.BackColor); 349using Control c = new(); 363using Control c = new(); 372Assert.Equal(Control.DefaultBackColor, item.BackColor); 380using Control c = new(); 389using Control c = new(); 408using Control c = new(); 427using Control c = new(); 438using Control c = new(); 449using Control c = new(); 468using Control c = new(); 492using Control c = new() 506using Control c = new(); 516using Control c = new(); 541using Control c = new(); 555using Control c = new(); 567using Control c = new(); 578using Control c = new(); 593using Control c = new(); 612using Control c = new(); 624using Control c = new(); 638using Control c = new(); 652using Control c = new(); 662using Control c = new(); 676using Control c = new(); 698using Control c = new() 723using Control c = new(); 743using Control c = new(); 751using Control c = new(); 762using Control c = new(); 779using Control c = new(); 815using Control c = new(); 824using Control c = new(); 841using Control c = new(); 864using Control c = new(); 891using Control c = new(); 926using Control c = new(); 936using Control c = new(); 946using Control c = new(); 966using Control c = new(); 973Assert.Equal(value ?? Control.DefaultFont, item.Font); 974Assert.Equal(value ?? Control.DefaultFont, c.Font); 979Assert.Equal(value ?? Control.DefaultFont, item.Font); 980Assert.Equal(value ?? Control.DefaultFont, c.Font); 987using Control c = new(); 999using Control c = new(); 1009Assert.Equal(Control.DefaultFont, item.Font); 1017Assert.Equal(Control.DefaultFont, item.Font); 1025using Control c = new(); 1039using Control c = new(); 1049Assert.Equal(Control.DefaultFont, item.Font); 1057Assert.Equal(Control.DefaultFont, item.Font); 1065using Control c = new(); 1074using Control c = new(); 1085using Control c = new(); 1104using Control c = new(); 1127Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1140using Control c = new(); 1151using Control c = new(); 1160Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1168using Control c = new(); 1182using Control c = new(); 1191Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1199using Control c = new(); 1220using Control c = new(); 1242using Control c = new(); 1262using Control c = new(); 1273using Control c = new(); 1295using Control c = new(); 1317using Control c = new(); 1346using Control c = new(); 1387using Control c = new(); 1455using Control c = new(); 1530using Control c = new(); 1546using Control c = new(); 1557using Control c = new(); 1577using Control c = new(); 1596using Control c = new(); 1633using Control c = new(); 1642using Control c = new(); 1671using Control c = new(); 1685using Control c = new(); 1714using Control c = new(); 1725using Control c = new(); 1747using Control c = new(); 1770using Control c = new(); 1816using Control c = new(); 1837using Control c = new(); 1858using Control c = new(); 1880using Control c = new(); 1916using Control c = new(); 1945using Control c = new(); 1968using Control c = new(); 1986using Control c = new(); 2007using Control c = new(); 2026using Control c = new(); 2046using Control c = new(); 2068using Control c = new(); 2087using Control c = new(); 2107using Control c = new(); 2127using Control c = new(); 2159using Control c = new(); 2178using Control c = new(); 2204using Control c = new() 2228using Control c = new(); 2249using Control c = new(); 2268using Control c = new(); 2305using Control c = new(); 2323using Control c = new(); 2340using Control c = new(); 2356using Control c = new(); 2365using Control c = new(); 2385using Control c = new(); 2406using Control c = new(); 2436using Control c = new(); 2472using Control c = new(); 2510using Control c = new(); 2530using Control c = new(); 2548using Control c = new(); 2563using Control c = new(); 2575using Control c = new(); 2617using Control c = new(); 2659using Control c = new(); 2691using Control c = new(); 2701using Control c = new(); 2721using Control c = new() 2736using Control c = new() 2754using Control c = new(); 2768using Control c = new() 2792using Control c = new(); 2806using Control c = new(); 2831using Control c = new(); 2856using Control c = new() 2874using Control c = new(); 2899using Control c = new(); 2924using Control c = new(); 2949using Control c = new(); 2962using Control c = new(); 2987using Control c = new(); 3012using Control c = new(); 3057using Control c = new(); 3076using Control c = new(); 3100using Control c = new(); 3169using Control controlParent = new(); 3170using Control c = new() 3244using Control c = new(); 3265using Control c = new(); 4136using Control c = new(); 4145using Control c = new(); 4170using Control c = new(); 4199using Control c = new(); 4240using Control c = new(); 4256using Control c = new(); 4300using Control c = new(); 4315using Control c = new(); 4356using Control c = new(); 4388using Control c = new(); 4393Assert.Equal(Control.DefaultBackColor, item.BackColor); 4394Assert.Equal(Control.DefaultBackColor, c.BackColor); 4399Assert.Equal(Control.DefaultBackColor, item.BackColor); 4400Assert.Equal(Control.DefaultBackColor, c.BackColor); 4404Assert.Equal(Control.DefaultBackColor, item.BackColor); 4405Assert.Equal(Control.DefaultBackColor, c.BackColor); 4411using Control c = new(); 4421using Control c = new(); 4426Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4427Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4432Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4433Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4437Assert.Equal(Control.DefaultForeColor, item.ForeColor); 4438Assert.Equal(Control.DefaultForeColor, c.ForeColor); 4444using Control c = new(); 4455using Control c = new(); 4489using Control c = new(); 4525using Control c = new(); 4631public SubToolStripControlHost(Control c) : base(c) 4635public SubToolStripControlHost(Control c, string name) : base(c, name) 4693public new void OnSubscribeControlEvents(Control control) => base.OnSubscribeControlEvents(control); 4695public new void OnUnsubscribeControlEvents(Control control) => base.OnUnsubscribeControlEvents(control);
System\Windows\Forms\ToolStripDropDownItemTests.cs (9)
29Assert.Equal(Control.DefaultBackColor, item.BackColor); 53Assert.NotSame(Control.DefaultFont, item.Font); 55Assert.Equal(Control.DefaultForeColor, item.ForeColor); 142Assert.NotSame(Control.DefaultFont, item.Font); 144Assert.Equal(Control.DefaultForeColor, item.ForeColor); 241Assert.NotSame(Control.DefaultFont, item.Font); 243Assert.Equal(Control.DefaultForeColor, item.ForeColor); 349Assert.NotSame(Control.DefaultFont, item.Font); 351Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripDropDownTests.cs (25)
34Assert.Equal(Control.DefaultBackColor, control.BackColor); 84Assert.Equal(Control.DefaultFont, control.Font); 86Assert.Equal(Control.DefaultForeColor, control.ForeColor); 701using Control parent = new(); 1323using Control parent = new() 1355using Control parent = new() 1476Assert.NotSame(Control.DefaultFont, control.Font); 1485using Control parent = new() 1514Assert.NotSame(Control.DefaultFont, control.Font); 1530Assert.Equal(value ?? Control.DefaultFont, control.Font); 1536Assert.Equal(value ?? Control.DefaultFont, control.Font); 1573Assert.Equal(Control.DefaultFont, control.Font); 1626Assert.Equal(Control.DefaultFont, control.Font); 1627Assert.Equal(Control.DefaultFont, item1.Font); 1628Assert.Equal(Control.DefaultFont, item2.Font); 1691Assert.Equal(Control.DefaultFont, control.Font); 1747Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2327using Control sourceControl = new() 2359using Control sourceControl = new() 2910using Control parent = new(); 3090using Control sourceControl = new() 3371using Control sourceControl = new() 3430using Control sourceControl = new() 4989using Control control = new(); 5021using Control control = new();
System\Windows\Forms\ToolStripItemTests.cs (31)
32Assert.Equal(Control.DefaultBackColor, item.BackColor); 54Assert.NotSame(Control.DefaultFont, item.Font); 56Assert.Equal(Control.DefaultForeColor, item.ForeColor); 139Assert.NotSame(Control.DefaultFont, item.Font); 141Assert.Equal(Control.DefaultForeColor, item.ForeColor); 234Assert.NotSame(Control.DefaultFont, item.Font); 236Assert.Equal(Control.DefaultForeColor, item.ForeColor); 1554Assert.Equal(Control.DefaultBackColor, item.BackColor); 1661yield return new object[] { Color.Empty, Control.DefaultBackColor, 0 }; 1723Assert.Equal(Control.DefaultBackColor, item.BackColor); 1745Assert.Equal(Control.DefaultBackColor, item.BackColor); 1761Assert.Equal(Control.DefaultBackColor, item.BackColor); 2943Assert.NotSame(Control.DefaultFont, item.Font); 3189Assert.NotSame(Control.DefaultFont, item.Font); 3199Assert.NotSame(Control.DefaultFont, item.Font); 3218Assert.NotSame(Control.DefaultFont, item.Font); 3228Assert.NotSame(Control.DefaultFont, item.Font); 3244Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3351yield return new object[] { Color.Empty, Control.DefaultForeColor, 0 }; 3416Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3438Assert.Equal(Control.DefaultForeColor, item.ForeColor); 3454Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14083Assert.Equal(Control.DefaultBackColor, item.BackColor); 14088Assert.Equal(Control.DefaultBackColor, item.BackColor); 14092Assert.Equal(Control.DefaultBackColor, item.BackColor); 14122Assert.NotSame(Control.DefaultFont, item.Font); 14129Assert.NotSame(Control.DefaultFont, item.Font); 14135Assert.NotSame(Control.DefaultFont, item.Font); 14146Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14151Assert.Equal(Control.DefaultForeColor, item.ForeColor); 14155Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
30Assert.Equal(Control.DefaultBackColor, item.BackColor); 57Assert.NotSame(Control.DefaultFont, item.Font); 59Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripPanelTests.cs (3)
31Assert.Equal(Control.DefaultBackColor, control.BackColor); 75Assert.Equal(Control.DefaultFont, control.Font); 77Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\ToolStripSeparatorTests.cs (5)
30Assert.Equal(Control.DefaultBackColor, item.BackColor); 52Assert.NotSame(Control.DefaultFont, item.Font); 373Assert.Equal(Control.DefaultForeColor, item.ForeColor); 395Assert.Equal(Control.DefaultForeColor, item.ForeColor); 411Assert.Equal(Control.DefaultForeColor, item.ForeColor);
System\Windows\Forms\ToolStripTests.cs (41)
34Assert.Equal(Control.DefaultBackColor, control.BackColor); 94Assert.Equal(Control.DefaultFont, control.Font); 96Assert.Equal(Control.DefaultForeColor, control.ForeColor); 192Assert.Equal(Control.DefaultBackColor, control.BackColor); 248Assert.Equal(Control.DefaultFont, control.Font); 250Assert.Equal(Control.DefaultForeColor, control.ForeColor); 912using Control parent = new(); 1059yield return new object[] { Color.Empty, Control.DefaultBackColor }; 1084using Control parent = new() 1392Assert.NotSame(Control.DefaultFont, control.Font); 1401using Control parent = new() 1430Assert.NotSame(Control.DefaultFont, control.Font); 1446Assert.Equal(value ?? Control.DefaultFont, control.Font); 1452Assert.Equal(value ?? Control.DefaultFont, control.Font); 1489Assert.Equal(Control.DefaultFont, control.Font); 1542Assert.Equal(Control.DefaultFont, control.Font); 1543Assert.Equal(Control.DefaultFont, item1.Font); 1544Assert.Equal(Control.DefaultFont, item2.Font); 1607Assert.Equal(Control.DefaultFont, control.Font); 1874using Control parent = new() 1905using Control parent = new() 2455using Control parent = new(); 2712Assert.Equal(Control.DefaultForeColor, control.ForeColor); 2919using Control parent = new(); 4235Control.ControlCollection controls = Assert.IsAssignableFrom<Control.ControlCollection>(control.CreateControlsInstance()); 4259Control.ControlCollection controls = Assert.IsAssignableFrom<Control.ControlCollection>(control.CreateControlsInstance()); 5265Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 5272Assert.Equal(Control.DefaultFont.Height, control.FontHeight); 5910Control control = new() 5918foreach (Control parent in new Control[] { control, tabPage }) 5958Control control = new() 5966foreach (Control parent in new Control[] { control, tabPage }) 6016public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 6160using Control parent = new() 6919using Control parent = new(); 7378var child = toolStrip.GetChildAtPoint(new Point(x, y)); 7391var child = toolStrip.GetChildAtPoint(new Point(10, 10), skipValue);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
34Control control = new();
System\Windows\Forms\ToolTipTests.cs (9)
641public void ToolTip_GetToolTip_NoSuchControl_ReturnsEmpty(Control control) 650using Control control = new(); 673using Control control = new(); 694using Control control = new(); 721using Control control = new(); 749using Control control = new(); 807using Control topLevelControl = new(); 826Mock<Control.ControlAccessibleObject> mockAccessibleObject = new(MockBehavior.Strict, mockTabControl.Object); 901int expected = (int)default(ToolInfoWrapper<Control>).TestAccessor().Dynamic.TTTOOLINFO_V2_Size;
System\Windows\Forms\TreeViewTests.cs (5)
65Assert.Equal(Control.DefaultFont, control.Font); 81Assert.Equal(Control.DefaultFont.Height + 3, control.ItemHeight); 2734yield return new object[] { -1, Control.DefaultFont.Height + 3 }; 6627ToolInfoWrapper<Control> wrapper = treeView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip); 6640ToolInfoWrapper<Control> wrapper = treeView.GetToolInfoWrapper(TOOLTIP_FLAGS.TTF_ABSOLUTE, "Test caption", toolTip);
System\Windows\Forms\UpDownBaseTests.cs (34)
44Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.ClientRectangle); 45Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.DisplayRectangle); 46Assert.Equal(new Size(120, Control.DefaultFont.Height + 7), control.ClientSize); 51Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.ClientRectangle); 52Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.DisplayRectangle); 53Assert.Equal(new Size(116, Control.DefaultFont.Height + 3), control.ClientSize); 85Assert.Equal(Control.DefaultFont, control.Font); 108Assert.Equal(Control.DefaultFont.Height + 7, control.PreferredHeight); 719yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 720yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 721yield return new object[] { BorderStyle.None, new Size(122, Control.DefaultFont.Height + 3) }; 725yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 726yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 727yield return new object[] { BorderStyle.None, new Size(119, Control.DefaultFont.Height + 3) }; 756yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 757yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 758yield return new object[] { BorderStyle.None, 1, 1, new Size(123, Control.DefaultFont.Height + 3) }; 762yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 763yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 764yield return new object[] { BorderStyle.None, 2, 1, new Size(123, Control.DefaultFont.Height + 3) }; 1261Assert.Same(control, ((Control)source).Parent); 1301Assert.Same(control, ((Control)source).Parent); 2755Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2756Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2757Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2761Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2762Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2763Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle); 2787Assert.Equal(new Size(width, Control.DefaultFont.Height + 7), control.ClientSize); 2788Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2789Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2793Assert.Equal(new Size(width - 4, Control.DefaultFont.Height + 3), control.ClientSize); 2794Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2795Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle);
System\Windows\Forms\UserControlTests.cs (16)
35Assert.Equal(Control.DefaultBackColor, control.BackColor); 79Assert.Equal(Control.DefaultFont, control.Font); 81Assert.Equal(Control.DefaultForeColor, control.ForeColor); 312using Control parent = new(); 360using Control parent = new(); 518using Control parent = new(); 1260using Control child1 = new(); 1261using Control grandchild1 = new(); 1264using Control grandchild2 = new(); 1486using Control child1 = new(); 1487using Control grandchild1 = new(); 1490using Control grandchild2 = new(); 1720using Control child1 = new(); 1721using Control child2 = new(); 1750using Control child1 = new(); 1751using Control child2 = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (3)
354using Control childControl = new(); 381using Control childControl = new(); 392using Control childControl = new();
System\Windows\Forms\VScrollBarTests.cs (3)
23Assert.Equal(Control.DefaultBackColor, control.BackColor); 70Assert.Equal(Control.DefaultFont, control.Font); 72Assert.Equal(Control.DefaultForeColor, control.ForeColor);
System\Windows\Forms\WebBrowserTests.cs (145)
26Assert.Equal(Control.DefaultBackColor, control.BackColor); 60Assert.Equal(Control.DefaultFont, control.Font); 62Assert.Equal(Control.DefaultForeColor, control.ForeColor); 159using Control parent = new(); 187using Control parent = new(); 226using Control parent = new(); 240using Control parent = new(); 252using Control parent = new(); 290using Control parent = new(); 326using Control parent = new(); 339using Control parent = new(); 351using Control parent = new(); 371using Control parent = new(); 396using Control parent = new(); 410using Control parent = new(); 438using Control parent = new(); 454using Control parent = new(); 476using Control parent = new(); 488using Control parent = new(); 509using Control parent = new(); 523using Control parent = new(); 544using Control parent = new(); 556using Control parent = new(); 568using Control parent = new(); 593using Control parent = new(); 605using Control parent = new(); 626using Control parent = new(); 640using Control parent = new(); 661using Control parent = new(); 673using Control parent = new(); 707using Control parent = new(); 730using Control parent = new(); 829using Control parent = new(); 841using Control parent = new(); 862using Control parent = new(); 879using Control parent = new(); 898using Control parent = new(); 910using Control parent = new(); 931using Control parent = new(); 945using Control parent = new(); 965using Control parent = new(); 977using Control parent = new(); 998using Control parent = new(); 1012using Control parent = new(); 1031using Control parent = new(); 1043using Control parent = new(); 1064using Control parent = new(); 1083((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1107using Control parent = new(); 1121using Control parent = new(); 1140using Control parent = new(); 1152using Control parent = new(); 1173using Control parent = new(); 1187using Control parent = new(); 1199using Control parent = new(); 1237using Control parent = new(); 1290using Control parent = new(); 1340((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 1417using Control parent = new(); 1436using Control parent = new() 1458using Control parent = new(); 1478using Control parent = new(); 1497using Control parent = new() 1519using Control parent = new(); 1594using Control parent = new(); 1608using Control parent = new(); 1627using Control parent = new(); 1639using Control parent = new(); 1660using Control parent = new(); 1674using Control parent = new(); 1686using Control parent = new(); 1724using Control parent = new(); 1758using Control parent = new(); 1771using Control parent = new(); 1809using Control parent = new(); 1845using Control parent = new(); 1859using Control parent = new(); 1878using Control parent = new(); 1890using Control parent = new(); 1911using Control parent = new(); 1925using Control parent = new(); 1944using Control parent = new(); 1956using Control parent = new(); 1968using Control parent = new(); 2063using Control parent = new(); 2094using Control parent = new(); 2106using Control parent = new(); 2118using Control parent = new(); 2276using Control parent = new(); 2356using Control parent = new(); 2383using Control parent = new(); 2441using Control parent = new(); 2461using Control parent = new(); 2485using Control parent = new(); 2572using Control parent = new(); 2675using Control parent = new(); 2719using Control parent = new(); 2864using Control parent = new(); 2885using Control parent = new(); 2965using Control parent = new(); 2987using Control parent = new(); 3002using Control parent = new(); 3080using Control parent = new(); 3102using Control parent = new(); 3117using Control parent = new(); 3129using Control parent = new(); 3151using Control parent = new(); 3166using Control parent = new(); 3178using Control parent = new(); 3190using Control parent = new(); 3279using Control parent = new(); 3302using Control parent = new(); 3397using Control parent = new(); 3420using Control parent = new(); 3468using Control parent = new(); 3484using Control parent = new(); 3602Control parent = new(); 3642using Control parent = new(); 3654using Control parent = new(); 3919using Control parent = new(); 3941using Control parent = new(); 3956using Control parent = new(); 4014using Control parent = new(); 4086using Control parent = new(); 4103using Control parent = new(); 4163using Control parent = new(); 4221using Control parent = new(); 4244using Control parent = new(); 4259using Control parent = new(); 4281using Control parent = new(); 4296using Control parent = new(); 4318using Control parent = new(); 4333using Control parent = new(); 4355using Control parent = new(); 4370using Control parent = new(); 4392using Control parent = new(); 4407using Control parent = new(); 4429using Control parent = new(); 4444using Control parent = new(); 4461((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 4466((Control)control).MouseHover += (sender, e) => 4523using Control control = new(); 4577((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 4597using Control control = new(); 4627((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++;
TextBoxBaseTests.cs (39)
16private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 285using Control parent = new(); 579using Control parent = new(); 875Assert.Equal(value ?? Control.DefaultFont, control.Font); 881Assert.Equal(value ?? Control.DefaultFont, control.Font); 895Assert.Equal(value ?? Control.DefaultFont, control.Font); 901Assert.Equal(value ?? Control.DefaultFont, control.Font); 917Assert.Equal(value ?? Control.DefaultFont, control.Font); 923Assert.Equal(value ?? Control.DefaultFont, control.Font); 940Assert.Equal(value ?? Control.DefaultFont, control.Font); 946Assert.Equal(value ?? Control.DefaultFont, control.Font); 977Assert.Equal(value ?? Control.DefaultFont, control.Font); 986Assert.Equal(value ?? Control.DefaultFont, control.Font); 1014Assert.Equal(value ?? Control.DefaultFont, control.Font); 1023Assert.Equal(value ?? Control.DefaultFont, control.Font); 1061Assert.Equal(value ?? Control.DefaultFont, control.Font); 1070Assert.Equal(value ?? Control.DefaultFont, control.Font); 1100Assert.Equal(value ?? Control.DefaultFont, control.Font); 1109Assert.Equal(value ?? Control.DefaultFont, control.Font); 1149Assert.Equal(Control.DefaultFont, control.Font); 2006using Control parent = new(); 2065using Control parent = new(); 2277yield return new object[] { BorderStyle.None, Control.DefaultFont.Height }; 3725using Control parent = new(); 3775using Control parent = new(); 5008yield return new object[] { multiline, wordWrap, BorderStyle.None, Size.Empty, new Size(0, Control.DefaultFont.Height) }; 5009yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(-1, -2), new Size(0, Control.DefaultFont.Height) }; 5010yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(10, 20), new Size(0, Control.DefaultFont.Height) }; 5011yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(30, 40), new Size(0, Control.DefaultFont.Height) }; 5012yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(int.MaxValue, int.MaxValue), new Size(0, Control.DefaultFont.Height) }; 5069yield return new object[] { BorderStyle.None, Size.Empty, 0, Control.DefaultFont.Height }; 5070yield return new object[] { BorderStyle.None, new Size(-1, -2), 0, Control.DefaultFont.Height }; 5071yield return new object[] { BorderStyle.None, new Size(10, 20), 0, Control.DefaultFont.Height }; 5072yield return new object[] { BorderStyle.None, new Size(30, 40), 0, Control.DefaultFont.Height }; 5073yield return new object[] { BorderStyle.None, new Size(int.MaxValue, int.MaxValue), 0, Control.DefaultFont.Height }; 5861using Control parent = new(); 6040using Control parent = new(); 6972using Control control = new(); 7053using Control control = new();
TextBoxTests.cs (4)
13private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3; 70Assert.Equal(Control.DefaultFont, control.Font); 460Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance()); 477Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance());
TrackBarTests.cs (5)
27Assert.Equal(Control.DefaultBackColor, control.BackColor); 63Assert.Equal(Control.DefaultFont, control.Font); 629Assert.Equal(value ?? Control.DefaultFont, control.Font); 635Assert.Equal(value ?? Control.DefaultFont, control.Font); 672Assert.Equal(Control.DefaultFont, control.Font);
WebBrowserBaseTests.cs (7)
36((Control)control).Layout += (sender, e) => 145((Control)control).Layout += (sender, e) => 186((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 237using Control parent = new(); 489((Control)control).Layout -= handler; 690((Control)control).StyleChanged += (sender, e) => styleChangedCallCount++; 812using 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)
398internal void InvokePaintBackgroundAndPaint(SWF.Control control, SWF.PaintEventArgs args) 648ImeMode ehImeMode = this.ImeMode != ImeMode.NoControl ? this.ImeMode : SWF.Control.PropagatingImeMode; 1542private static SD.Color FindSolidColorParent(Control whichControl) 1544Control control = whichControl; 1619Control topMostParent = null; 1646Control currentControl = _hostControl; 1647Control parentControl = _hostControl.Parent; 1682private bool ShouldSearchWrapForParentControl(Control control)
System\Windows\Integration\ElementHostPropertyMap.cs (1)
69Control 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)
307public Control Child 317Control oldChild = Child; 347private void OnChildChanged(Control oldChild) 750private Control _child; 751public Control Child 944SWF.Control c = this.ActiveControl.Parent; 1113private void CallOnParentRightToLeftChanged(Control control) 1115MethodInfo 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 (12)
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)
18var control = (Control)sender; 26var control = (Control)sender;
MainForm.cs (2)
244Debug.WriteLine($"Default font: {Control.DefaultFont}", nameof(MainForm)); 247foreach (Control control in overarchingFlowLayoutPanel.Controls)
MessageBoxes.cs (1)
50foreach (Control control in propertyGrid1.Controls)