131 references to Center
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (1)
881
if (value is ImageLayout.
Center
or ImageLayout.Zoom or ImageLayout.Stretch)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
84
case ImageLayout.
Center
:
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
668
(BackgroundImageLayout == ImageLayout.Zoom || BackgroundImageLayout == ImageLayout.Stretch || BackgroundImageLayout == ImageLayout.
Center
))
System.Windows.Forms.Tests (126)
System\Windows\Forms\ComboBoxTests.cs (6)
588
control.BackgroundImageLayout = ImageLayout.
Center
;
589
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
593
control.BackgroundImageLayout = ImageLayout.
Center
;
594
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
604
control.BackgroundImageLayout = ImageLayout.
Center
;
605
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.Handlers.cs (2)
556
BackgroundImageLayout = ImageLayout.
Center
560
BackgroundImageLayout = ImageLayout.
Center
System\Windows\Forms\ControlTests.Properties.cs (11)
2003
[InlineData(ImageLayout.
Center
, 1)]
2041
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.
Center
, true };
2047
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), ImageLayout.
Center
, false };
2084
control.BackgroundImageLayout = ImageLayout.
Center
;
2085
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2089
control.BackgroundImageLayout = ImageLayout.
Center
;
2090
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2100
control.BackgroundImageLayout = ImageLayout.
Center
;
2101
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2119
control.BackgroundImageLayout = ImageLayout.
Center
;
2120
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\DataGridViewTests.cs (1)
3496
TestEvent(nameof(DataGridView.BackgroundImageLayoutChanged), nameof(DataGridView.BackgroundImageLayout), ImageLayout.
Center
, ImageLayout.Stretch);
System\Windows\Forms\DateTimePickerTests.cs (1)
747
control.BackgroundImageLayout = ImageLayout.
Center
;
System\Windows\Forms\LabelTests.cs (5)
564
label.BackgroundImageLayout = ImageLayout.
Center
;
565
Assert.Equal(ImageLayout.
Center
, label.BackgroundImageLayout);
568
label.BackgroundImageLayout = ImageLayout.
Center
;
569
Assert.Equal(ImageLayout.
Center
, label.BackgroundImageLayout);
596
label.BackgroundImageLayout = ImageLayout.
Center
;
System\Windows\Forms\ListBoxTests.cs (6)
562
control.BackgroundImageLayout = ImageLayout.
Center
;
563
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
567
control.BackgroundImageLayout = ImageLayout.
Center
;
568
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
578
control.BackgroundImageLayout = ImageLayout.
Center
;
579
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ListViewTests.cs (6)
586
control.BackgroundImageLayout = ImageLayout.
Center
;
587
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
591
control.BackgroundImageLayout = ImageLayout.
Center
;
592
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
602
control.BackgroundImageLayout = ImageLayout.
Center
;
603
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\MdiClientTests.cs (6)
304
control.BackgroundImageLayout = ImageLayout.
Center
;
305
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
309
control.BackgroundImageLayout = ImageLayout.
Center
;
310
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
320
control.BackgroundImageLayout = ImageLayout.
Center
;
321
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\MonthCalendarTests.cs (6)
464
control.BackgroundImageLayout = ImageLayout.
Center
;
465
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
469
control.BackgroundImageLayout = ImageLayout.
Center
;
470
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
480
control.BackgroundImageLayout = ImageLayout.
Center
;
481
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ProgressBarTests.cs (6)
309
control.BackgroundImageLayout = ImageLayout.
Center
;
310
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
314
control.BackgroundImageLayout = ImageLayout.
Center
;
315
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
325
control.BackgroundImageLayout = ImageLayout.
Center
;
326
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\PropertyGridTests.cs (6)
501
control.BackgroundImageLayout = ImageLayout.
Center
;
502
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
506
control.BackgroundImageLayout = ImageLayout.
Center
;
507
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
517
control.BackgroundImageLayout = ImageLayout.
Center
;
518
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\RichTextBoxTests.cs (6)
830
control.BackgroundImageLayout = ImageLayout.
Center
;
831
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
835
control.BackgroundImageLayout = ImageLayout.
Center
;
836
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
846
control.BackgroundImageLayout = ImageLayout.
Center
;
847
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ScrollableControlTests.cs (3)
1586
int expected = backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
) && (hScroll || vScroll) ? 0 : 1;
1637
: backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
)
1786
int expected = backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
) && (!hScroll && vScroll) ? 0 : 1;
System\Windows\Forms\ScrollBarTests.cs (6)
334
control.BackgroundImageLayout = ImageLayout.
Center
;
335
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
339
control.BackgroundImageLayout = ImageLayout.
Center
;
340
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
350
control.BackgroundImageLayout = ImageLayout.
Center
;
351
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\SplitterTests.cs (6)
291
control.BackgroundImageLayout = ImageLayout.
Center
;
292
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
296
control.BackgroundImageLayout = ImageLayout.
Center
;
297
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
307
control.BackgroundImageLayout = ImageLayout.
Center
;
308
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\TabControlTests.cs (6)
709
control.BackgroundImageLayout = ImageLayout.
Center
;
710
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
714
control.BackgroundImageLayout = ImageLayout.
Center
;
715
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
725
control.BackgroundImageLayout = ImageLayout.
Center
;
726
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
152
[InlineData(ImageLayout.
Center
)]
System\Windows\Forms\ToolStripDropDownTests.cs (6)
884
control.BackgroundImageLayout = ImageLayout.
Center
;
885
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
889
control.BackgroundImageLayout = ImageLayout.
Center
;
890
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
900
control.BackgroundImageLayout = ImageLayout.
Center
;
901
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripItemTests.cs (1)
1993
[InlineData(ImageLayout.
Center
, 1)]
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
278
BackgroundImageLayout = ImageLayout.
Center
,
System\Windows\Forms\ToolStripTests.cs (2)
5928
int expected = backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
) && (hScroll || vScroll) ? 0 : 1;
5987
: backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
)
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
64
[InlineData(ImageLayout.
Center
)]
System\Windows\Forms\TreeViewTests.cs (6)
879
control.BackgroundImageLayout = ImageLayout.
Center
;
880
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
884
control.BackgroundImageLayout = ImageLayout.
Center
;
885
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
895
control.BackgroundImageLayout = ImageLayout.
Center
;
896
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\UpDownBaseTests.cs (6)
694
control.BackgroundImageLayout = ImageLayout.
Center
;
695
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
699
control.BackgroundImageLayout = ImageLayout.
Center
;
700
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
710
control.BackgroundImageLayout = ImageLayout.
Center
;
711
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
TextBoxBaseTests.cs (6)
532
control.BackgroundImageLayout = ImageLayout.
Center
;
533
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
537
control.BackgroundImageLayout = ImageLayout.
Center
;
538
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
548
control.BackgroundImageLayout = ImageLayout.
Center
;
549
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
ToolStripContainerTests.cs (1)
101
_toolStripContainer.BackgroundImageLayout = ImageLayout.
Center
;
TrackBarTests.cs (6)
526
control.BackgroundImageLayout = ImageLayout.
Center
;
527
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
531
control.BackgroundImageLayout = ImageLayout.
Center
;
532
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
542
control.BackgroundImageLayout = ImageLayout.
Center
;
543
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System.Windows.Forms.UI.IntegrationTests (2)
PropertyGridTests.cs (2)
172
_propertyGrid.BackgroundImageLayout = ImageLayout.
Center
;
173
_propertyGrid.BackgroundImageLayout.Should().Be(ImageLayout.
Center
);