1688 references to AnchorStyles
Accessibility_Core_App (13)
CommonControl1.Designer.cs (13)
127this.button1.Anchor = System.Windows.Forms.AnchorStyles.Left; 171this.button3.Anchor = System.Windows.Forms.AnchorStyles.Right; 183this.button4.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 206this.button2.Anchor = System.Windows.Forms.AnchorStyles.Top; 429this.linkLabel6.Anchor = System.Windows.Forms.AnchorStyles.Top; 441this.linkLabel5.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 453this.linkLabel4.Anchor = System.Windows.Forms.AnchorStyles.Right; 465this.linkLabel3.Anchor = System.Windows.Forms.AnchorStyles.Left; 477this.label6.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 488this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; 499this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; 510this.label3.Anchor = System.Windows.Forms.AnchorStyles.Top; 654this.dateTimePicker2.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
NativeHost.ManagedControl (1)
ManagedControl.Designer.cs (1)
37this.button1.Anchor = System.Windows.Forms.AnchorStyles.None;
PresentationUI (46)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (4)
111this._okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 386this._identifierLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (4)
74this._buttonFlowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 113this._listButtonFlowLayoutPanel.Anchor = System.Windows.Forms.AnchorStyles.Top;
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (10)
56_buttomControlLayoutpanel.Anchor = System.Windows.Forms.AnchorStyles.Right; 88_divider.Anchor = System.Windows.Forms.AnchorStyles.Left; 122_dateTimePicker.Anchor = System.Windows.Forms.AnchorStyles.Left; 133_requestedLocationTextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 142_signatureAppliedByDateLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 151_requestSignerNameLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 160_requestLocationLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 169_requestedSignerNameTextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 178_intentLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 187_intentComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left;
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (2)
179this._pictureBox2.Anchor = System.Windows.Forms.AnchorStyles.None; 198this._pictureBox4.Anchor = System.Windows.Forms.AnchorStyles.None;
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (2)
100this.label3.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 110this.progressBar1.Anchor = System.Windows.Forms.AnchorStyles.Top;
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (1)
65_divider.Anchor = System.Windows.Forms.AnchorStyles.Left;
MS\Internal\Documents\SigningDialog.Designer.cs (23)
60_userInputFlowPanel.Anchor = System.Windows.Forms.AnchorStyles.Left; 99_addDigSigCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 108_signerlabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 117_addDocPropCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 128_reasonLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 136_reasonComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 146_actionlabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 155_locationLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; 164_locationTextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 173_divider.Anchor = System.Windows.Forms.AnchorStyles.Left; 194_cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 195| System.Windows.Forms.AnchorStyles.Left) 196| System.Windows.Forms.AnchorStyles.Right))); 209_signButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 210| System.Windows.Forms.AnchorStyles.Left))); 223_signSaveAsButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 224| System.Windows.Forms.AnchorStyles.Left)));
System.Windows.Forms (242)
System\Windows\Forms\Control.cs (1)
593public virtual AnchorStyles Anchor
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (8)
519bool imageEdge = (AnchorStyles)(ImageAlignToRelation(imageAlign) & textImageRelation) != AnchorStyles.None; 523bool textEdge = (AnchorStyles)(TextAlignToRelation(textAlign) & textImageRelation) != AnchorStyles.None; 531(AnchorStyles)textImageRelation, 541(AnchorStyles)LayoutUtils.GetOppositeTextImageRelation(textImageRelation), 552(AnchorStyles)textImageRelation, 557(AnchorStyles)textImageRelation,
System\Windows\Forms\Controls\Labels\Label.cs (8)
827((Anchor & (AnchorStyles.Left | AnchorStyles.Right)) == (AnchorStyles.Left | AnchorStyles.Right) || 828(Anchor & (AnchorStyles.Top | AnchorStyles.Bottom)) == (AnchorStyles.Top | AnchorStyles.Bottom)))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (3)
184Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right,
System\Windows\Forms\Controls\Splitter\Splitter.cs (3)
68[DefaultValue(AnchorStyles.None)] 69public override AnchorStyles Anchor 73return AnchorStyles.None;
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
272public override AnchorStyles Anchor
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (4)
1173if (returnIfAnchored && (Anchor & (AnchorStyles.Top | AnchorStyles.Bottom)) == (AnchorStyles.Top | AnchorStyles.Bottom))
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (11)
14private const AnchorStyles AllAnchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; 15private const AnchorStyles HorizontalAnchor = AnchorStyles.Left | AnchorStyles.Right; 16private const AnchorStyles VerticalAnchor = AnchorStyles.Top | AnchorStyles.Bottom;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
346public override AnchorStyles Anchor
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (1)
51public override AnchorStyles Anchor
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
94public override AnchorStyles Anchor
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
597public AnchorStyles Anchor
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
339Rectangle bounds = LayoutUtils.VAlign(item.Size, _displayRectangle, AnchorStyles.None); 472Rectangle bounds = LayoutUtils.HAlign(item.Size, _displayRectangle, AnchorStyles.None);
System\Windows\Forms\Layout\CommonProperties.cs (11)
27internal const AnchorStyles DefaultAnchor = AnchorStyles.Top | AnchorStyles.Left; 532internal static AnchorStyles xGetAnchor(IArrangedElement element) 535AnchorStyles value = (AnchorStyles)state[s_dockAndAnchorSection]; 587internal static void xSetAnchor(IArrangedElement element, AnchorStyles value) 630private static AnchorStyles xTranslateAnchorValue(AnchorStyles anchor) => anchor switch 632AnchorStyles.None => DefaultAnchor, 633DefaultAnchor => AnchorStyles.None,
System\Windows\Forms\Layout\DefaultLayout.cs (56)
34AnchorStyles anchor = GetAnchor(element); 37if ((anchor & (AnchorStyles.Left | AnchorStyles.Right)) == (AnchorStyles.Left | AnchorStyles.Right)) 42if ((anchor & (AnchorStyles.Top | AnchorStyles.Bottom)) == (AnchorStyles.Top | AnchorStyles.Bottom)) 111AnchorStyles anchor = GetAnchor(element); 114if ((anchor & AnchorStyles.Right) != AnchorStyles.None 115&& (anchor & AnchorStyles.Left) == AnchorStyles.None) 126if ((anchor & AnchorStyles.Bottom) != AnchorStyles.None 127&& (anchor & AnchorStyles.Top) == AnchorStyles.None) 179AnchorStyles anchors = GetAnchor(element); 180if (IsAnchored(anchors, AnchorStyles.Left)) 184if (IsAnchored(anchors, AnchorStyles.Right)) 193if (IsAnchored(anchors, AnchorStyles.Right)) 207if (IsAnchored(anchors, AnchorStyles.Top)) 209if (IsAnchored(anchors, AnchorStyles.Bottom)) 220if (IsAnchored(anchors, AnchorStyles.Bottom)) 246AnchorStyles anchor = GetAnchor(element); 248if (IsAnchored(anchor, AnchorStyles.Right)) 252if (!IsAnchored(anchor, AnchorStyles.Left)) 257else if (!IsAnchored(anchor, AnchorStyles.Left)) 264if (IsAnchored(anchor, AnchorStyles.Bottom)) 268if (!IsAnchored(anchor, AnchorStyles.Top)) 273else if (!IsAnchored(anchor, AnchorStyles.Top)) 759AnchorStyles anchor = GetAnchor(element); 760if (IsAnchored(anchor, AnchorStyles.Right)) 766if (!IsAnchored(anchor, AnchorStyles.Left)) 776if (!IsAnchored(anchor, AnchorStyles.Left)) 782else if (!IsAnchored(anchor, AnchorStyles.Left)) 788if (IsAnchored(anchor, AnchorStyles.Bottom)) 796if (!IsAnchored(anchor, AnchorStyles.Top)) 806if (!IsAnchored(anchor, AnchorStyles.Top)) 812else if (!IsAnchored(anchor, AnchorStyles.Top)) 890public static AnchorStyles GetAnchor(IArrangedElement element) => CommonProperties.xGetAnchor(element); 892public static void SetAnchor(IArrangedElement element, AnchorStyles value) 894AnchorStyles oldValue = GetAnchor(element); 916bool rightReleased = IsAnchored(oldValue, AnchorStyles.Right) && !IsAnchored(value, AnchorStyles.Right); 917bool bottomReleased = IsAnchored(oldValue, AnchorStyles.Bottom) && !IsAnchored(value, AnchorStyles.Bottom); 1122AnchorStyles anchor = GetAnchor(element); 1126if (IsAnchored(anchor, AnchorStyles.Left) && !IsAnchored(anchor, AnchorStyles.Right)) 1133if (!IsAnchored(anchor, AnchorStyles.Bottom)) 1140if (IsAnchored(anchor, AnchorStyles.Right)) 1159if (IsAnchored(anchor, AnchorStyles.Bottom)) 1183public static bool IsAnchored(AnchorStyles anchor, AnchorStyles desiredAnchor)
System\Windows\Forms\Layout\FlowLayout.cs (1)
232AnchorStyles anchorStyles = elementProxy.AnchorStyles;
System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs (8)
19public virtual AnchorStyles AnchorStyles 23AnchorStyles anchorStyles = LayoutUtils.GetUnifiedAnchor(Element!); 25bool isTop = (anchorStyles & AnchorStyles.Top) != 0; // whether the control anchors to top and does not stretch; 26bool isBottom = (anchorStyles & AnchorStyles.Bottom) != 0; // whether the control anchors to bottom and does not stretch; 37return AnchorStyles.Top; 43return AnchorStyles.Bottom; 46return AnchorStyles.None; 79AnchorStyles styles = AnchorStyles;
System\Windows\Forms\Layout\FlowLayout.VerticalElementProxy.cs (7)
17public override AnchorStyles AnchorStyles 21AnchorStyles anchorStyles = LayoutUtils.GetUnifiedAnchor(Element!); 23bool isLeft = (anchorStyles & AnchorStyles.Left) != 0; // whether the control anchors to left and does not stretch; 24bool isRight = (anchorStyles & AnchorStyles.Right) != 0; // whether the control anchors to right and does not stretch; 32return AnchorStyles.Top; 37return AnchorStyles.Bottom; 40return AnchorStyles.None;
System\Windows\Forms\Layout\LayoutUtils.cs (75)
25public const AnchorStyles HorizontalAnchorStyles = AnchorStyles.Left | AnchorStyles.Right; 26public const AnchorStyles VerticalAnchorStyles = AnchorStyles.Top | AnchorStyles.Bottom; 28private static readonly AnchorStyles[] s_dockingToAnchor = 30/* None */ AnchorStyles.Top | AnchorStyles.Left, 31/* Top */ AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, 32/* Bottom */ AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 33/* Left */ AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom, 34/* Right */ AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom, 35/* Fill */ AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left 164private static AnchorStyles GetOppositeAnchor(AnchorStyles anchor) 166AnchorStyles result = AnchorStyles.None; 167if (anchor == AnchorStyles.None) 174for (int i = 1; i <= (int)AnchorStyles.Right; i <<= 1) 176switch (anchor & (AnchorStyles)i) 178case AnchorStyles.None: 180case AnchorStyles.Left: 181result |= AnchorStyles.Right; 183case AnchorStyles.Top: 184result |= AnchorStyles.Bottom; 186case AnchorStyles.Right: 187result |= AnchorStyles.Left; 189case AnchorStyles.Bottom: 190result |= AnchorStyles.Top; 202return (TextImageRelation)GetOppositeAnchor((AnchorStyles)relation); 264internal static AnchorStyles GetUnifiedAnchor(IArrangedElement element) 275public static Rectangle AlignAndStretch(Size fitThis, Rectangle withinThis, AnchorStyles anchorStyles) 280public static Rectangle Align(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 290public static Rectangle HAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 292if ((anchorStyles & AnchorStyles.Right) != 0) 296else if (anchorStyles == AnchorStyles.None || (anchorStyles & HorizontalAnchorStyles) == 0) 322public static Rectangle VAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 324if ((anchorStyles & AnchorStyles.Bottom) != 0) 328else if (anchorStyles == AnchorStyles.None || (anchorStyles & VerticalAnchorStyles) == 0) 354public static Size Stretch(Size stretchThis, Size withinThis, AnchorStyles anchorStyles) 503public static void SplitRegion(Rectangle bounds, Size specifiedContent, AnchorStyles region1Align, out Rectangle region1, out Rectangle region2) 508case AnchorStyles.Left: 513case AnchorStyles.Right: 518case AnchorStyles.Top: 523case AnchorStyles.Bottom: 538public static void ExpandRegionsToFillBounds(Rectangle bounds, AnchorStyles region1Align, ref Rectangle region1, ref Rectangle region2) 542case AnchorStyles.Left: 544region1 = SubstituteSpecifiedBounds(bounds, region1, AnchorStyles.Right); 545region2 = SubstituteSpecifiedBounds(bounds, region2, AnchorStyles.Left); 547case AnchorStyles.Right: 549region1 = SubstituteSpecifiedBounds(bounds, region1, AnchorStyles.Left); 550region2 = SubstituteSpecifiedBounds(bounds, region2, AnchorStyles.Right); 552case AnchorStyles.Top: 554region1 = SubstituteSpecifiedBounds(bounds, region1, AnchorStyles.Bottom); 555region2 = SubstituteSpecifiedBounds(bounds, region2, AnchorStyles.Top); 557case AnchorStyles.Bottom: 559region1 = SubstituteSpecifiedBounds(bounds, region1, AnchorStyles.Top); 560region2 = SubstituteSpecifiedBounds(bounds, region2, AnchorStyles.Bottom); 589private static Rectangle SubstituteSpecifiedBounds(Rectangle originalBounds, Rectangle substitutionBounds, AnchorStyles specified) 591int left = (specified & AnchorStyles.Left) != 0 ? substitutionBounds.Left : originalBounds.Left; 592int top = (specified & AnchorStyles.Top) != 0 ? substitutionBounds.Top : originalBounds.Top; 593int right = (specified & AnchorStyles.Right) != 0 ? substitutionBounds.Right : originalBounds.Right; 594int bottom = (specified & AnchorStyles.Bottom) != 0 ? substitutionBounds.Bottom : originalBounds.Bottom;
System\Windows\Forms\Layout\TableLayout.cs (9)
702if ((tlp.Anchor & (AnchorStyles.Left | AnchorStyles.Right)) == (AnchorStyles.Left | AnchorStyles.Right)) 830if ((tlp.Anchor & (AnchorStyles.Top | AnchorStyles.Bottom)) == (AnchorStyles.Top | AnchorStyles.Bottom)) 1266AnchorStyles anchorStyles = LayoutUtils.GetUnifiedAnchor(element);
System\Windows\Forms\Layout\TextImageRelation.cs (5)
13Overlay = AnchorStyles.None, 14ImageBeforeText = AnchorStyles.Left, 15TextBeforeImage = AnchorStyles.Right, 16ImageAboveText = AnchorStyles.Top, 17TextAboveImage = AnchorStyles.Bottom
System\Windows\Forms\Panels\SplitterPanel.cs (1)
67public new AnchorStyles Anchor
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (2)
42Anchor = AnchorStyles.None, 51Anchor = AnchorStyles.None
System\Windows\Forms\Printing\PrintPreviewControl.cs (12)
68Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right, 82Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom, 823_vScrollBar.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom; 828_vScrollBar.Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
515public override AnchorStyles Anchor
System\Windows\Forms\Scrolling\ScrollableControl.cs (9)
433AnchorStyles anchor = richCurrent.Anchor; 434if ((anchor & AnchorStyles.Right) == AnchorStyles.Right) 439if ((anchor & AnchorStyles.Left) != AnchorStyles.Left) 444if ((anchor & AnchorStyles.Bottom) == AnchorStyles.Bottom) 449if ((anchor & AnchorStyles.Top) != AnchorStyles.Top)
System.Windows.Forms.Design (73)
Resources\MaskDesignerDialog.Designer.cs (24)
66internal static System.Windows.Forms.AnchorStyles btnCancel_Anchor { 69return ((System.Windows.Forms.AnchorStyles)(obj)); 125internal static System.Windows.Forms.AnchorStyles btnOK_Anchor { 128return ((System.Windows.Forms.AnchorStyles)(obj)); 184internal static System.Windows.Forms.AnchorStyles checkBoxUseValidatingType_Anchor { 187return ((System.Windows.Forms.AnchorStyles)(obj)); 253internal static System.Windows.Forms.AnchorStyles lblHeader_Anchor { 256return ((System.Windows.Forms.AnchorStyles)(obj)); 313internal static System.Windows.Forms.AnchorStyles lblMask_Anchor { 316return ((System.Windows.Forms.AnchorStyles)(obj)); 372internal static System.Windows.Forms.AnchorStyles lblTryIt_Anchor { 375return ((System.Windows.Forms.AnchorStyles)(obj)); 431internal static System.Windows.Forms.AnchorStyles listViewCannedMasks_Anchor { 434return ((System.Windows.Forms.AnchorStyles)(obj)); 518internal static System.Windows.Forms.AnchorStyles maskedTextBox_Anchor { 521return ((System.Windows.Forms.AnchorStyles)(obj)); 558internal static System.Windows.Forms.AnchorStyles maskTryItTable_Anchor { 561return ((System.Windows.Forms.AnchorStyles)(obj)); 646internal static System.Windows.Forms.AnchorStyles okCancelTableLayoutPanel_Anchor { 649return ((System.Windows.Forms.AnchorStyles)(obj)); 730internal static System.Windows.Forms.AnchorStyles overarchingTableLayoutPanel_Anchor { 733return ((System.Windows.Forms.AnchorStyles)(obj)); 807internal static System.Windows.Forms.AnchorStyles txtBoxMask_Anchor { 810return ((System.Windows.Forms.AnchorStyles)(obj));
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (13)
180const AnchorStyles DefaultCenterAnchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; 181const AnchorStyles DefaultRightAnchor = AnchorStyles.Top | AnchorStyles.Right; 185_topCenter.Anchor = AnchorStyles.None; 186_topRight.Anchor = AnchorStyles.None; 187_middleCenter.Anchor = AnchorStyles.None; 188_middleRight.Anchor = AnchorStyles.None; 189_bottomCenter.Anchor = AnchorStyles.None; 190_bottomRight.Anchor = AnchorStyles.None;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (30)
23private AnchorStyles _oldAnchor; 44public virtual AnchorStyles GetSelectedAnchor() 46AnchorStyles baseVar = 0; 49baseVar |= AnchorStyles.Left; 54baseVar |= AnchorStyles.Top; 59baseVar |= AnchorStyles.Bottom; 64baseVar |= AnchorStyles.Right; 81_container.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; 85_control.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; 91_right.Anchor = AnchorStyles.Right; 98_left.Anchor = AnchorStyles.Left; 105_top.Anchor = AnchorStyles.Top; 112_bottom.Anchor = AnchorStyles.Bottom; 149if (value is AnchorStyles anchorStyles) 151_left.IsSolid = (anchorStyles & AnchorStyles.Left) == AnchorStyles.Left; 152_top.IsSolid = (anchorStyles & AnchorStyles.Top) == AnchorStyles.Top; 153_bottom.IsSolid = (anchorStyles & AnchorStyles.Bottom) == AnchorStyles.Bottom; 154_right.IsSolid = (anchorStyles & AnchorStyles.Right) == AnchorStyles.Right; 159_oldAnchor = AnchorStyles.Top | AnchorStyles.Left;
System\Windows\Forms\Design\DockEditor.DockUI.cs (4)
38Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right,
System\Windows\Forms\Design\FormatControl.cs (2)
312Anchor = AnchorStyles.Left | AnchorStyles.Right,
System.Windows.Forms.Design.Tests (18)
EnsureEditorsTests.cs (1)
54[InlineData(typeof(AnchorStyles), typeof(AnchorEditor))]
System\ComponentModel\Design\ByteViewerTests.cs (2)
22Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\Design\AnchorEditorTests.cs (1)
26yield return new object[] { AnchorStyles.Top };
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (14)
31AnchorStyles anchor = (AnchorStyles)inheritedPropertyDescriptor.GetValue(control); 32anchor.Should().Be(AnchorStyles.Top | AnchorStyles.Left); 34control.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom; 35anchor = (AnchorStyles)inheritedPropertyDescriptor.GetValue(control); 36anchor.Should().Be(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom); 39anchor = (AnchorStyles)inheritedPropertyDescriptor.GetValue(control); 40anchor.Should().Be(AnchorStyles.Top | AnchorStyles.Left);
System.Windows.Forms.Tests (1125)
System\Windows\Forms\AxHostTests.cs (4)
35Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 129Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ButtonBaseTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ButtonTests.cs (2)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\CheckBoxTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ComboBoxTests.cs (2)
28Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ContainerControlTests.cs (2)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ControlTests.cs (10)
22Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 111Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 207Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 303Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 399Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ControlTests.Properties.cs (731)
309yield return new object[] { AnchorStyles.Top, AnchorStyles.Top }; 310yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom }; 311yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left }; 312yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right }; 313yield return new object[] { AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left }; 314yield return new object[] { AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right }; 315yield return new object[] { AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right }; 316yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 318yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom }; 319yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left }; 320yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right }; 321yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 323yield return new object[] { AnchorStyles.Left, AnchorStyles.Left }; 324yield return new object[] { AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right }; 326yield return new object[] { AnchorStyles.Right, AnchorStyles.Right }; 328yield return new object[] { AnchorStyles.None, AnchorStyles.None }; 329yield return new object[] { (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 330yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 335public void Control_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 357public void Control_Anchor_SetWithOldValue_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 361Anchor = AnchorStyles.Left 382yield return new object[] { AnchorStyles.Top, AnchorStyles.Top, 1, 1 }; 383yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1 }; 384yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1 }; 385yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, 1, 1 }; 386yield return new object[] { AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 0, 0 }; 387yield return new object[] { AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 388yield return new object[] { AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, 1, 1 }; 389yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 391yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1 }; 392yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1 }; 393yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, 1, 1 }; 394yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 396yield return new object[] { AnchorStyles.Left, AnchorStyles.Left, 1, 1 }; 397yield return new object[] { AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 399yield return new object[] { AnchorStyles.Right, AnchorStyles.Right, 1, 1 }; 401yield return new object[] { AnchorStyles.None, AnchorStyles.None, 1, 1 }; 402yield return new object[] { (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 403yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 408public void Control_Anchor_SetWithParent_GetReturnsExpected(AnchorStyles value, AnchorStyles expected, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2) 453public void Control_Anchor_SetWithGrandparent_GetReturnsExpected(AnchorStyles value, AnchorStyles expected, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2) 510foreach (AnchorStyles oldValue in new AnchorStyles[] { AnchorStyles.Left, AnchorStyles.Top, AnchorStyles.Right, AnchorStyles.Left }) 512yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1 }; 513yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1 }; 514yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, 1, 1 }; 515yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 1, 1 }; 516yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 517yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, 1, 1 }; 518yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 520yield return new object[] { oldValue, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1 }; 521yield return new object[] { oldValue, AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, 1, 1 }; 522yield return new object[] { oldValue, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 524yield return new object[] { oldValue, AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, 1, 1 }; 526yield return new object[] { oldValue, AnchorStyles.None, AnchorStyles.None, 1, 1 }; 527yield return new object[] { oldValue, (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 528yield return new object[] { oldValue, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 531yield return new object[] { AnchorStyles.Top, AnchorStyles.Top, AnchorStyles.Top, 0, 0 }; 532yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top, AnchorStyles.Top, 1, 1 }; 533yield return new object[] { AnchorStyles.Left, AnchorStyles.Top, AnchorStyles.Top, 1, 1 }; 534yield return new object[] { AnchorStyles.Right, AnchorStyles.Top, AnchorStyles.Top, 1, 1 }; 536yield return new object[] { AnchorStyles.Top, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1 }; 537yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom, AnchorStyles.Bottom, 0, 0 }; 538yield return new object[] { AnchorStyles.Left, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1 }; 539yield return new object[] { AnchorStyles.Right, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1 }; 541yield return new object[] { AnchorStyles.Top, AnchorStyles.Left, AnchorStyles.Left, 1, 1 }; 542yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Left, AnchorStyles.Left, 1, 1 }; 543yield return new object[] { AnchorStyles.Left, AnchorStyles.Left, AnchorStyles.Left, 0, 0 }; 544yield return new object[] { AnchorStyles.Right, AnchorStyles.Left, AnchorStyles.Left, 1, 1 }; 546yield return new object[] { AnchorStyles.Top, AnchorStyles.Right, AnchorStyles.Right, 1, 1 }; 547yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Right, AnchorStyles.Right, 1, 1 }; 548yield return new object[] { AnchorStyles.Left, AnchorStyles.Right, AnchorStyles.Right, 1, 1 }; 549yield return new object[] { AnchorStyles.Right, AnchorStyles.Right, AnchorStyles.Right, 0, 0 }; 554public void Control_Anchor_SetWithOldValueWithParent_GetReturnsExpected(AnchorStyles oldValue, AnchorStyles value, AnchorStyles expected, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2) 600foreach (AnchorStyles oldValue in new AnchorStyles[] { AnchorStyles.Left, AnchorStyles.Top, AnchorStyles.Right, AnchorStyles.Left }) 602yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, 1, 1, 0, 0 }; 603yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 604yield return new object[] { oldValue, AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, 1, 1, 0, 0 }; 606yield return new object[] { oldValue, AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, 1, 1, 0, 0 }; 607yield return new object[] { oldValue, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 609yield return new object[] { oldValue, AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 611yield return new object[] { oldValue, (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2, 0, 0 }; 612yield return new object[] { oldValue, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2, 0, 0 }; 615yield return new object[] { AnchorStyles.Top, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1, 0, 0 }; 616yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1, 0, 0 }; 617yield return new object[] { AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1, 0, 0 }; 618yield return new object[] { AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, 1, 1, 1, 1 }; 620yield return new object[] { AnchorStyles.Top, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 621yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 622yield return new object[] { AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 623yield return new object[] { AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 1, 1 }; 625yield return new object[] { AnchorStyles.Top, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 626yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 627yield return new object[] { AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 628yield return new object[] { AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 1, 1 }; 630yield return new object[] { AnchorStyles.Top, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 1, 1, 0, 0 }; 631yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 1, 1, 1, 1 }; 632yield return new object[] { AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 1, 1, 0, 0 }; 633yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, 1, 1, 1, 1 }; 635yield return new object[] { AnchorStyles.Top, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 636yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 637yield return new object[] { AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 0, 0 }; 638yield return new object[] { AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, 1, 1, 1, 1 }; 640yield return new object[] { AnchorStyles.Top, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 641yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 642yield return new object[] { AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 643yield return new object[] { AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 1, 0, 0 }; 645yield return new object[] { AnchorStyles.Top, AnchorStyles.None, AnchorStyles.None, 1, 1, 0, 0 }; 646yield return new object[] { AnchorStyles.Bottom, AnchorStyles.None, AnchorStyles.None, 1, 1, 1, 1 }; 647yield return new object[] { AnchorStyles.Left, AnchorStyles.None, AnchorStyles.None, 1, 1, 0, 0 }; 648yield return new object[] { AnchorStyles.Right, AnchorStyles.None, AnchorStyles.None, 1, 1, 1, 1 }; 650yield return new object[] { AnchorStyles.Top, AnchorStyles.Top, AnchorStyles.Top, 0, 0, 0, 0 }; 651yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Top, AnchorStyles.Top, 1, 1, 1, 1 }; 652yield return new object[] { AnchorStyles.Left, AnchorStyles.Top, AnchorStyles.Top, 1, 1, 0, 0 }; 653yield return new object[] { AnchorStyles.Right, AnchorStyles.Top, AnchorStyles.Top, 1, 1, 1, 1 }; 655yield return new object[] { AnchorStyles.Top, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1, 0, 0 }; 656yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom, AnchorStyles.Bottom, 0, 0, 0, 0 }; 657yield return new object[] { AnchorStyles.Left, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1, 0, 0 }; 658yield return new object[] { AnchorStyles.Right, AnchorStyles.Bottom, AnchorStyles.Bottom, 1, 1, 1, 1 }; 660yield return new object[] { AnchorStyles.Top, AnchorStyles.Left, AnchorStyles.Left, 1, 1, 0, 0 }; 661yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Left, AnchorStyles.Left, 1, 1, 1, 1 }; 662yield return new object[] { AnchorStyles.Left, AnchorStyles.Left, AnchorStyles.Left, 0, 0, 0, 0 }; 663yield return new object[] { AnchorStyles.Right, AnchorStyles.Left, AnchorStyles.Left, 1, 1, 1, 1 }; 665yield return new object[] { AnchorStyles.Top, AnchorStyles.Right, AnchorStyles.Right, 1, 1, 0, 0 }; 666yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Right, AnchorStyles.Right, 1, 1, 1, 1 }; 667yield return new object[] { AnchorStyles.Left, AnchorStyles.Right, AnchorStyles.Right, 1, 1, 0, 0 }; 668yield return new object[] { AnchorStyles.Right, AnchorStyles.Right, AnchorStyles.Right, 0, 0, 0, 0 }; 673public void Control_Anchor_SetWithOldValueWithGrandparent_GetReturnsExpected(AnchorStyles oldValue, AnchorStyles value, AnchorStyles expected, int expectedParentLayoutCallCount1, int expectedParentLayoutCallCount2, int expectedGrandparentLayoutCallCount1, int expectedGrandparentLayoutCallCount2) 738yield return new object[] { dock, AnchorStyles.Top, AnchorStyles.Top, DockStyle.None }; 739yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, DockStyle.None }; 740yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 741yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 742yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, dock }; 743yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 744yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, DockStyle.None }; 745yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 747yield return new object[] { dock, AnchorStyles.Bottom, AnchorStyles.Bottom, DockStyle.None }; 748yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 749yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 750yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 752yield return new object[] { dock, AnchorStyles.Left, AnchorStyles.Left, DockStyle.None }; 753yield return new object[] { dock, AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 755yield return new object[] { dock, AnchorStyles.Right, AnchorStyles.Right, DockStyle.None }; 757yield return new object[] { dock, AnchorStyles.None, AnchorStyles.None, DockStyle.None }; 758yield return new object[] { dock, (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 759yield return new object[] { dock, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 765public void Control_Anchor_SetWithDock_GetReturnsExpected(DockStyle dock, AnchorStyles value, AnchorStyles expectedAnchor, DockStyle expectedDock) 792yield return new object[] { dock, AnchorStyles.Top, AnchorStyles.Top, DockStyle.None, 1 }; 793yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, DockStyle.None, 1 }; 794yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None, 1 }; 795yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None, 1 }; 796yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, dock, 0 }; 797yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 798yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, DockStyle.None, 1 }; 799yield return new object[] { dock, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 801yield return new object[] { dock, AnchorStyles.Bottom, AnchorStyles.Bottom, DockStyle.None, 1 }; 802yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None, 1 }; 803yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None, 1 }; 804yield return new object[] { dock, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 806yield return new object[] { dock, AnchorStyles.Left, AnchorStyles.Left, DockStyle.None, 1 }; 807yield return new object[] { dock, AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 809yield return new object[] { dock, AnchorStyles.Right, AnchorStyles.Right, DockStyle.None, 1 }; 811yield return new object[] { dock, AnchorStyles.None, AnchorStyles.None, DockStyle.None, 1 }; 812yield return new object[] { dock, (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 813yield return new object[] { dock, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 819public void Control_Anchor_SetWithDockWithParent_GetReturnsExpected(DockStyle dock, AnchorStyles value, AnchorStyles expectedAnchor, DockStyle expectedDock, int expectedParentLayoutCallCount) 867public void Control_Anchor_SetWithHandle_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 4132Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4139Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4157Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4164Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4205Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4213Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4296Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4304Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4317foreach (AnchorStyles anchor in Enum.GetValues(typeof(AnchorStyles))) 4321yield return new object[] { anchor, value, value == DockStyle.None ? anchor : AnchorStyles.Top | AnchorStyles.Left }; 4328public void Control_Dock_SetWithAnchor_GetReturnsExpected(AnchorStyles anchor, DockStyle value, AnchorStyles expectedAnchor) 4362Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 4372Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\DateTimePickerTests.cs (2)
29Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (2)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (2)
23Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\DomainUpDownTests.cs (2)
34_sub.Anchor.Should().Be(AnchorStyles.Top | AnchorStyles.Left);
System\Windows\Forms\FlowLayoutPanelTests.cs (2)
22Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\FormTests.cs (2)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\GroupBoxTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\HScrollBarTests.cs (2)
22Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\LabelTests.cs (2)
23Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ListBoxTests.cs (2)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ListControlTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ListViewTests.cs (2)
30Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\MdiClientTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\MdiControlStripTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, mdiControlStrip.Anchor);
System\Windows\Forms\MenuStripTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\MonthCalendarTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\PanelTests.cs (2)
23Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\PictureBoxTests.cs (2)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ProgressBarTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\PropertyGridTests.cs (2)
30Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\RadioButtonTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\RichTextBoxTests.cs (2)
34Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ScrollableControlTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ScrollBarTests.cs (2)
23Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\SplitterPanelTests.cs (8)
29Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 107public void SplitterPanel_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 391Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 396Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\SplitterTests.cs (20)
23Assert.Equal(AnchorStyles.None, control.Anchor); 176[EnumData<AnchorStyles>] 177[InvalidEnumData<AnchorStyles>] 178public void Splitter_Anchor_Set_GetReturnsExpected(AnchorStyles value) 185Assert.Equal(AnchorStyles.None, control.Anchor); 192Assert.Equal(AnchorStyles.None, control.Anchor); 405Assert.Equal(AnchorStyles.None, control.Anchor); 414Assert.Equal(AnchorStyles.None, control.Anchor); 438Assert.Equal(AnchorStyles.None, control.Anchor); 447Assert.Equal(AnchorStyles.None, control.Anchor); 470Assert.Equal(AnchorStyles.None, control.Anchor); 479Assert.Equal(AnchorStyles.None, control.Anchor); 504Assert.Equal(AnchorStyles.None, control.Anchor); 513Assert.Equal(AnchorStyles.None, control.Anchor); 554Assert.Equal(AnchorStyles.None, control.Anchor); 562Assert.Equal(AnchorStyles.None, control.Anchor); 623Assert.Equal(AnchorStyles.None, control.Anchor); 631Assert.Equal(AnchorStyles.None, control.Anchor); 662Assert.Equal(AnchorStyles.None, control.Anchor); 674Assert.Equal(AnchorStyles.None, control.Anchor);
System\Windows\Forms\StatusStripTests.cs (6)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 303Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 312Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\TabControlTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\TableLayoutPanelTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\TabPageTests.cs (21)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 136Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 257public void TabPage_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 276public void TabPage_Anchor_SetWithOldValue_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 280Anchor = AnchorStyles.Left 297public void TabPage_Anchor_SetWithDock_GetReturnsExpected(DockStyle dock, AnchorStyles value, AnchorStyles expectedAnchor, DockStyle expectedDock) 903Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 908Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 922Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 927Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 932public void TabPage_Dock_SetWithAnchor_GetReturnsExpected(AnchorStyles anchor, DockStyle value, AnchorStyles expectedAnchor)
System\Windows\Forms\ToolStripButtonTests.cs (12)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 107Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 194Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 284Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 373Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 471Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor);
System\Windows\Forms\ToolStripContentPanelTests.cs (8)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 126public void ToolStripContentPanel_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 845Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 850Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ToolStripControlHostTests.cs (2)
56Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor);
System\Windows\Forms\ToolStripDropDownItemTests.cs (8)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 115Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 214Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 314Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor);
System\Windows\Forms\ToolStripDropDownTests.cs (80)
27Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 567yield return new object[] { AnchorStyles.Top, AnchorStyles.Top, DockStyle.None }; 568yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, DockStyle.None }; 569yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 570yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 571yield return new object[] { AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, DockStyle.None }; 572yield return new object[] { AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 573yield return new object[] { AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, DockStyle.None }; 574yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 576yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom, DockStyle.None }; 577yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 578yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 579yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 581yield return new object[] { AnchorStyles.Left, AnchorStyles.Left, DockStyle.None }; 582yield return new object[] { AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 584yield return new object[] { AnchorStyles.Right, AnchorStyles.Right, DockStyle.None }; 586yield return new object[] { AnchorStyles.None, AnchorStyles.None, DockStyle.None }; 587yield return new object[] { (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 588yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 593public void ToolStripDropDown_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected, DockStyle expectedDock)
System\Windows\Forms\ToolStripItemTests.cs (36)
28Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 114Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 209Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 781yield return new object[] { AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left }; 782yield return new object[] { AnchorStyles.Top, AnchorStyles.Top }; 783yield return new object[] { AnchorStyles.None, AnchorStyles.None }; 784yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 785yield return new object[] { (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 786yield return new object[] { (AnchorStyles)0x10, AnchorStyles.Top | AnchorStyles.Left }; 791public void ToolStripItem_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 806public void ToolStripItem_Anchor_SetWithOwner_GetReturnsExpected(AnchorStyles value, AnchorStyles expected) 838public void ToolStripItem_Anchor_SetWithParent_GetReturnsExpected(AnchorStyles value, AnchorStyles expected)
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor); 273Anchor = AnchorStyles.Bottom,
System\Windows\Forms\ToolStripPanelTests.cs (2)
22Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\ToolStripSeparatorTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, item.Anchor);
System\Windows\Forms\ToolStripTests.cs (94)
28Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 186Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 746yield return new object[] { AnchorStyles.Top, AnchorStyles.Top, DockStyle.None }; 747yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom, AnchorStyles.Top | AnchorStyles.Bottom, DockStyle.None }; 748yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 749yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 750yield return new object[] { AnchorStyles.Top | AnchorStyles.Left, AnchorStyles.Top | AnchorStyles.Left, DockStyle.Top }; 751yield return new object[] { AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 752yield return new object[] { AnchorStyles.Top | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Right, DockStyle.None }; 753yield return new object[] { AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 755yield return new object[] { AnchorStyles.Bottom, AnchorStyles.Bottom, DockStyle.None }; 756yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left, AnchorStyles.Bottom | AnchorStyles.Left, DockStyle.None }; 757yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Right, DockStyle.None }; 758yield return new object[] { AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 760yield return new object[] { AnchorStyles.Left, AnchorStyles.Left, DockStyle.None }; 761yield return new object[] { AnchorStyles.Left | AnchorStyles.Right, AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 763yield return new object[] { AnchorStyles.Right, AnchorStyles.Right, DockStyle.None }; 765yield return new object[] { AnchorStyles.None, AnchorStyles.None, DockStyle.None }; 766yield return new object[] { (AnchorStyles)(-1), AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 767yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 772public void ToolStrip_Anchor_Set_GetReturnsExpected(AnchorStyles value, AnchorStyles expected, DockStyle expectedDock) 2396Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 2405Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 2495Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 2505Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 2601Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); 2611Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\TreeViewTests.cs (2)
23Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\UpDownBaseTests.cs (2)
20Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\UserControlTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\VScrollBarTests.cs (2)
21Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System\Windows\Forms\WebBrowserTests.cs (2)
24Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
TextBoxTests.cs (2)
26Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
TrackBarTests.cs (2)
25Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor);
System.Windows.Forms.UI.IntegrationTests (48)
AnchorLayoutTests.cs (41)
12private const AnchorStyles AnchorAllDirection = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom; 20[InlineData(AnchorStyles.Top, 120, 30, 20, 30)] 21[InlineData(AnchorStyles.Left, 20, 180, 20, 30)] 22[InlineData(AnchorStyles.Right, 220, 180, 20, 30)] 23[InlineData(AnchorStyles.Bottom, 120, 330, 20, 30)] 24[InlineData(AnchorStyles.Top | AnchorStyles.Left, 20, 30, 20, 30)] 25[InlineData(AnchorStyles.Top | AnchorStyles.Right, 220, 30, 20, 30)] 26[InlineData(AnchorStyles.Top | AnchorStyles.Bottom, 120, 30, 20, 330)] 27[InlineData(AnchorStyles.Left | AnchorStyles.Right, 20, 180, 220, 30)] 28[InlineData(AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left, 20, 30, 220, 330)] 29public void Control_ResizeAnchoredControls_ParentHandleCreated_NewAnchorsApplied(AnchorStyles anchors, int expectedX, int expectedY, int expectedWidth, int expectedHeight) 35[InlineData(AnchorStyles.Top, 120, 30, 20, 30)] 36[InlineData(AnchorStyles.Left, 20, 180, 20, 30)] 37[InlineData(AnchorStyles.Right, 220, 180, 20, 30)] 38[InlineData(AnchorStyles.Bottom, 120, 330, 20, 30)] 39[InlineData(AnchorStyles.Top | AnchorStyles.Left, 20, 30, 20, 30)] 40[InlineData(AnchorStyles.Top | AnchorStyles.Right, 220, 30, 20, 30)] 41[InlineData(AnchorStyles.Top | AnchorStyles.Bottom, 120, 30, 20, 330)] 42[InlineData(AnchorStyles.Left | AnchorStyles.Right, 20, 180, 220, 30)] 43[InlineData(AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left, 20, 30, 220, 330)] 44public void Control_AnchorLayoutV2_ResizeAnchoredControls_ParentHandleCreated_NewAnchorsApplied(AnchorStyles anchors, int expectedX, int expectedY, int expectedWidth, int expectedHeight) 239private static void LaunchFormAndVerify(AnchorStyles anchors, int expectedX, int expectedY, int expectedWidth, int expectedHeight) 271private static (Form, Button) GetFormWithAnchoredButton(AnchorStyles buttonAnchors)
ButtonTests.cs (4)
165button.Anchor = AnchorStyles.Left | AnchorStyles.Right; 195button.Anchor = AnchorStyles.Top | AnchorStyles.Bottom;
ImageListTests.cs (3)
101Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
TrimTest (3)
Form1.Designer.cs (3)
78comboBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
WinFormsControlsTest (119)
AnchorLayoutTests.Designer.cs (18)
56this.button2.Anchor = System.Windows.Forms.AnchorStyles.Top; 66this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 76this.button4.Anchor = System.Windows.Forms.AnchorStyles.Left; 86this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 96this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 97| System.Windows.Forms.AnchorStyles.Left) 98| System.Windows.Forms.AnchorStyles.Right))); 108this.button7.Anchor = System.Windows.Forms.AnchorStyles.Right; 118this.button8.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 128this.button9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
Calendar.Designer.cs (44)
54this.monthCalendar1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 55| System.Windows.Forms.AnchorStyles.Left) 56| System.Windows.Forms.AnchorStyles.Right))); 72this.minDateDateTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 80this.setMinDateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 91this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 101this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 111this.setMaxDateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 122this.maxDateDateTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 130this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 140this.daysOfWeekComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 168this.resetMinDateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 179this.resetMaxDateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 190this.showWeekNumbersCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 202this.showTodayCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 214this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
CollectionEditors.Designer.cs (5)
80this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81| System.Windows.Forms.AnchorStyles.Left) 82| System.Windows.Forms.AnchorStyles.Right)));
DataGridViewInVirtualModeTest.Designer.cs (5)
44this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 45| System.Windows.Forms.AnchorStyles.Left) 46| System.Windows.Forms.AnchorStyles.Right)));
DataGridViewTest.Designer.cs (16)
82this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 83| System.Windows.Forms.AnchorStyles.Right))); 146this.changeFontButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 159this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 184this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 194this.resetFontButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
DragDrop.Designer.cs (4)
177buttonOpenCats.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; 187buttonClear.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
ListViewTest.Designer.cs (3)
66this.listView1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
PictureBoxes.Designer.cs (12)
42this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 43| System.Windows.Forms.AnchorStyles.Left) 44| System.Windows.Forms.AnchorStyles.Right))); 57this.btnloadImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 69this.imageUri.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 70| System.Windows.Forms.AnchorStyles.Right)));
TaskDialogSamples.cs (2)
36Anchor = AnchorStyles.Left | AnchorStyles.Right,
TrackBars.cs (6)
44trackBar1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; 51trackBar1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
TrackBars.Designer.cs (4)
58this.trackBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 59| System.Windows.Forms.AnchorStyles.Right)));