110 references to MiddleCenter
System.Windows.Forms (37)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (4)
21
private ContentAlignment _imageAlign = ContentAlignment.
MiddleCenter
;
22
private ContentAlignment _textAlign = ContentAlignment.
MiddleCenter
;
424
[DefaultValue(ContentAlignment.
MiddleCenter
)]
670
[DefaultValue(ContentAlignment.
MiddleCenter
)]
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
579
ImageAlign = ContentAlignment.
MiddleCenter
,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (4)
181
CheckAlign == ContentAlignment.
MiddleCenter
|| !LayoutUtils.IsHorizontalAlignment(CheckAlign);
243
action[s_combineCheck] = CheckAlign == ContentAlignment.
MiddleCenter
|| !LayoutUtils.IsVerticalAlignment(CheckAlign);
440
case ContentAlignment.
MiddleCenter
:
515
Rectangle combinedBounds = LayoutUtils.Align(combinedSize, maxCombinedBounds, ContentAlignment.
MiddleCenter
);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (2)
28
DataGridViewContentAlignment.MiddleCenter => ContentAlignment.
MiddleCenter
,
33
_ => ContentAlignment.
MiddleCenter
,
System\Windows\Forms\Controls\Labels\Label.cs (4)
280
case ContentAlignment.
MiddleCenter
:
546
[DefaultValue(ContentAlignment.
MiddleCenter
)]
552
get => Properties.GetValueOrDefault(s_propImageAlign, ContentAlignment.
MiddleCenter
);
559
Properties.AddOrRemoveValue(s_propImageAlign, value, defaultValue: ContentAlignment.
MiddleCenter
);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
18
private ContentAlignment _controlAlign = ContentAlignment.
MiddleCenter
;
99
[DefaultValue(ContentAlignment.
MiddleCenter
)]
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
364
_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.Height), ContentAlignment.
MiddleCenter
);
369
_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.Height), ContentAlignment.
MiddleCenter
);
380
_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.Height), ContentAlignment.
MiddleCenter
);
399
_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.Height), ContentAlignment.
MiddleCenter
);
456
_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.
MiddleCenter
).Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (4)
36
private ContentAlignment _imageAlign = ContentAlignment.
MiddleCenter
;
37
private ContentAlignment _textAlign = ContentAlignment.
MiddleCenter
;
996
[DefaultValue(ContentAlignment.
MiddleCenter
)]
1879
[DefaultValue(ContentAlignment.
MiddleCenter
)]
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (2)
74
arrowRect.Y = LayoutUtils.VAlign(arrowRect.Size, _ownerItem.ClientBounds, ContentAlignment.
MiddleCenter
).Y;
130
imageRect.Y = LayoutUtils.VAlign(imageRect.Size, _ownerItem.ClientBounds, ContentAlignment.
MiddleCenter
).Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (1)
42
ImageAlign = ContentAlignment.
MiddleCenter
,
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
17
public const ContentAlignment AnyMiddleAlign = ContentAlignment.MiddleLeft | ContentAlignment.
MiddleCenter
| ContentAlignment.MiddleRight;
18
public const ContentAlignment AnyCenterAlign = ContentAlignment.TopCenter | ContentAlignment.
MiddleCenter
| ContentAlignment.BottomCenter;
System\Windows\Forms\Layout\LayoutUtils.cs (4)
22
public const ContentAlignment AnyCenter = ContentAlignment.TopCenter | ContentAlignment.
MiddleCenter
| ContentAlignment.BottomCenter;
23
public const ContentAlignment AnyMiddle = ContentAlignment.MiddleLeft | ContentAlignment.
MiddleCenter
| ContentAlignment.MiddleRight;
105
Debug.Assert(result != 0x05 || alignment == ContentAlignment.
MiddleCenter
, "Error detected in ContentAlignmentToIndex.");
478
Debug.Assert(align != ContentAlignment.
MiddleCenter
, "Result is ambiguous with an alignment of MiddleCenter.");
System\Windows\Forms\Rendering\ControlPaint.cs (2)
62
= ContentAlignment.TopCenter | ContentAlignment.
MiddleCenter
| ContentAlignment.BottomCenter;
64
= ContentAlignment.MiddleLeft | ContentAlignment.
MiddleCenter
| ContentAlignment.MiddleRight;
System.Windows.Forms.Design (4)
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (2)
52
return ContentAlignment.
MiddleCenter
;
87
case ContentAlignment.
MiddleCenter
:
System\Windows\Forms\Design\ButtonBaseDesigner.cs (1)
49
ContentAlignment alignment = ContentAlignment.
MiddleCenter
;
System\Windows\Forms\Design\DesignerUtils.cs (1)
108
public const ContentAlignment AnyMiddleAlignment = ContentAlignment.MiddleLeft | ContentAlignment.
MiddleCenter
| ContentAlignment.MiddleRight;
System.Windows.Forms.Tests (68)
System\Windows\Forms\ButtonBaseTests.cs (11)
74
Assert.Equal(ContentAlignment.
MiddleCenter
, control.ImageAlign);
111
Assert.Equal(ContentAlignment.
MiddleCenter
, control.TextAlign);
194
yield return new object[] { FlatStyle.System, RightToLeft.Yes, ContentAlignment.
MiddleCenter
, 0x56012F00, 0x6000 };
204
yield return new object[] { FlatStyle.System, RightToLeft.No, ContentAlignment.
MiddleCenter
, 0x56012F00, 0 };
214
yield return new object[] { FlatStyle.System, RightToLeft.Inherit, ContentAlignment.
MiddleCenter
, 0x56012F00, 0 };
1875
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
1933
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
1979
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
3304
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
3364
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
3414
int expectedCallCount = value == ContentAlignment.
MiddleCenter
? 0 : 1;
System\Windows\Forms\ButtonTests.cs (5)
77
Assert.Equal(ContentAlignment.
MiddleCenter
, control.ImageAlign);
109
Assert.Equal(ContentAlignment.
MiddleCenter
, control.TextAlign);
216
yield return new object[] { FlatStyle.System, RightToLeft.Yes, ContentAlignment.
MiddleCenter
, 0x56012F00, 0x6000 };
226
yield return new object[] { FlatStyle.System, RightToLeft.No, ContentAlignment.
MiddleCenter
, 0x56012F00, 0 };
236
yield return new object[] { FlatStyle.System, RightToLeft.Inherit, ContentAlignment.
MiddleCenter
, 0x56012F00, 0 };
System\Windows\Forms\CheckBoxTests.cs (1)
78
Assert.Equal(ContentAlignment.
MiddleCenter
, control.ImageAlign);
System\Windows\Forms\ControlTests.Methods.cs (2)
6916
yield return new object[] { RightToLeft.Yes, ContentAlignment.
MiddleCenter
, ContentAlignment.
MiddleCenter
};
System\Windows\Forms\LabelTests.cs (3)
70
Assert.Equal(ContentAlignment.
MiddleCenter
, control.ImageAlign);
385
[InlineData(ContentAlignment.
MiddleCenter
)]
421
label.TextAlign = ContentAlignment.
MiddleCenter
;
System\Windows\Forms\RadioButtonTests.cs (2)
77
Assert.Equal(ContentAlignment.
MiddleCenter
, control.ImageAlign);
185
ContentAlignment.
MiddleCenter
System\Windows\Forms\ToolStripButtonTests.cs (18)
60
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
86
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
141
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
167
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
228
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
254
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
318
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
344
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
406
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
432
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
504
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
530
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
1225
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.No, ToolStripItemDisplayStyle.None, 0, 0, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
1226
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.No, ToolStripItemDisplayStyle.Image, 1, 0, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
1227
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.No, ToolStripItemDisplayStyle.ImageAndText, 1, 1, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
1242
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.Yes, ToolStripItemDisplayStyle.Text, 0, 1, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix | TextFormatFlags.RightToLeft };
1243
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.Inherit, ToolStripItemDisplayStyle.Text, 0, 1, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
1244
yield return new object[] { ContentAlignment.
MiddleCenter
, RightToLeft.No, ToolStripItemDisplayStyle.Text, 0, 1, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
System\Windows\Forms\ToolStripControlHostTests.cs (3)
70
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ControlAlign);
89
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
115
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
System\Windows\Forms\ToolStripDropDownItemTests.cs (8)
60
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
86
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
149
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
175
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
248
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
274
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
356
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
382
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
System\Windows\Forms\ToolStripItemTests.cs (10)
59
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
85
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
144
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
170
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
239
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
265
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
4190
[InlineData(ContentAlignment.
MiddleCenter
, 0)]
4237
[InlineData(ContentAlignment.
MiddleCenter
, 0)]
8306
[InlineData(ContentAlignment.
MiddleCenter
, 0)]
8353
[InlineData(ContentAlignment.
MiddleCenter
, 0)]
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (1)
38
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.
MiddleCenter
, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
64
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
95
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
System\Windows\Forms\ToolStripSeparatorTests.cs (2)
57
Assert.Equal(ContentAlignment.
MiddleCenter
, item.ImageAlign);
83
Assert.Equal(ContentAlignment.
MiddleCenter
, item.TextAlign);
WinFormsControlsTest (1)
FormOwnerTestForm.cs (1)
50
TextAlign = ContentAlignment.
MiddleCenter