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