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