131 references to Center
System.Windows.Forms (3)
System\Windows\Forms\Control.cs (1)
880
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)
662
(BackgroundImageLayout == ImageLayout.Zoom || BackgroundImageLayout == ImageLayout.Stretch || BackgroundImageLayout == ImageLayout.
Center
))
System.Windows.Forms.Tests (126)
System\Windows\Forms\ComboBoxTests.cs (6)
589
control.BackgroundImageLayout = ImageLayout.
Center
;
590
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
594
control.BackgroundImageLayout = ImageLayout.
Center
;
595
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
605
control.BackgroundImageLayout = ImageLayout.
Center
;
606
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.Handlers.cs (2)
558
BackgroundImageLayout = ImageLayout.
Center
562
BackgroundImageLayout = ImageLayout.
Center
System\Windows\Forms\ControlTests.Properties.cs (11)
2005
[InlineData(ImageLayout.
Center
, 1)]
2043
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.
Center
, true };
2049
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), ImageLayout.
Center
, false };
2086
control.BackgroundImageLayout = ImageLayout.
Center
;
2087
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2091
control.BackgroundImageLayout = ImageLayout.
Center
;
2092
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2102
control.BackgroundImageLayout = ImageLayout.
Center
;
2103
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
2121
control.BackgroundImageLayout = ImageLayout.
Center
;
2122
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\DataGridViewTests.cs (1)
3497
TestEvent(nameof(DataGridView.BackgroundImageLayoutChanged), nameof(DataGridView.BackgroundImageLayout), ImageLayout.
Center
, ImageLayout.Stretch);
System\Windows\Forms\DateTimePickerTests.cs (1)
749
control.BackgroundImageLayout = ImageLayout.
Center
;
System\Windows\Forms\LabelTests.cs (5)
566
label.BackgroundImageLayout = ImageLayout.
Center
;
567
Assert.Equal(ImageLayout.
Center
, label.BackgroundImageLayout);
570
label.BackgroundImageLayout = ImageLayout.
Center
;
571
Assert.Equal(ImageLayout.
Center
, label.BackgroundImageLayout);
598
label.BackgroundImageLayout = ImageLayout.
Center
;
System\Windows\Forms\ListBoxTests.cs (6)
564
control.BackgroundImageLayout = ImageLayout.
Center
;
565
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
569
control.BackgroundImageLayout = ImageLayout.
Center
;
570
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
580
control.BackgroundImageLayout = ImageLayout.
Center
;
581
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ListViewTests.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\MdiClientTests.cs (6)
306
control.BackgroundImageLayout = ImageLayout.
Center
;
307
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
311
control.BackgroundImageLayout = ImageLayout.
Center
;
312
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
322
control.BackgroundImageLayout = ImageLayout.
Center
;
323
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\MonthCalendarTests.cs (6)
466
control.BackgroundImageLayout = ImageLayout.
Center
;
467
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
471
control.BackgroundImageLayout = ImageLayout.
Center
;
472
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
482
control.BackgroundImageLayout = ImageLayout.
Center
;
483
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ProgressBarTests.cs (6)
311
control.BackgroundImageLayout = ImageLayout.
Center
;
312
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
316
control.BackgroundImageLayout = ImageLayout.
Center
;
317
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
327
control.BackgroundImageLayout = ImageLayout.
Center
;
328
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\PropertyGridTests.cs (6)
503
control.BackgroundImageLayout = ImageLayout.
Center
;
504
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
508
control.BackgroundImageLayout = ImageLayout.
Center
;
509
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
519
control.BackgroundImageLayout = ImageLayout.
Center
;
520
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\RichTextBoxTests.cs (6)
832
control.BackgroundImageLayout = ImageLayout.
Center
;
833
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
837
control.BackgroundImageLayout = ImageLayout.
Center
;
838
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
848
control.BackgroundImageLayout = ImageLayout.
Center
;
849
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ScrollableControlTests.cs (3)
1588
int expected = backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
) && (hScroll || vScroll) ? 0 : 1;
1639
: backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
)
1788
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)
336
control.BackgroundImageLayout = ImageLayout.
Center
;
337
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
341
control.BackgroundImageLayout = ImageLayout.
Center
;
342
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
352
control.BackgroundImageLayout = ImageLayout.
Center
;
353
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\SplitterTests.cs (6)
293
control.BackgroundImageLayout = ImageLayout.
Center
;
294
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
298
control.BackgroundImageLayout = ImageLayout.
Center
;
299
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
309
control.BackgroundImageLayout = ImageLayout.
Center
;
310
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\TabControlTests.cs (6)
711
control.BackgroundImageLayout = ImageLayout.
Center
;
712
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
716
control.BackgroundImageLayout = ImageLayout.
Center
;
717
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
727
control.BackgroundImageLayout = ImageLayout.
Center
;
728
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
150
[InlineData(ImageLayout.
Center
)]
System\Windows\Forms\ToolStripDropDownTests.cs (6)
886
control.BackgroundImageLayout = ImageLayout.
Center
;
887
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
891
control.BackgroundImageLayout = ImageLayout.
Center
;
892
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
902
control.BackgroundImageLayout = ImageLayout.
Center
;
903
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripItemTests.cs (1)
1995
[InlineData(ImageLayout.
Center
, 1)]
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
276
BackgroundImageLayout = ImageLayout.
Center
,
System\Windows\Forms\ToolStripTests.cs (2)
5930
int expected = backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
) && (hScroll || vScroll) ? 0 : 1;
5989
: backgroundImage is not null && (backgroundImageLayout == ImageLayout.Zoom || backgroundImageLayout == ImageLayout.Stretch || backgroundImageLayout == ImageLayout.
Center
)
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
66
[InlineData(ImageLayout.
Center
)]
System\Windows\Forms\TreeViewTests.cs (6)
881
control.BackgroundImageLayout = ImageLayout.
Center
;
882
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
886
control.BackgroundImageLayout = ImageLayout.
Center
;
887
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
897
control.BackgroundImageLayout = ImageLayout.
Center
;
898
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
System\Windows\Forms\UpDownBaseTests.cs (6)
696
control.BackgroundImageLayout = ImageLayout.
Center
;
697
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
701
control.BackgroundImageLayout = ImageLayout.
Center
;
702
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
712
control.BackgroundImageLayout = ImageLayout.
Center
;
713
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
TextBoxBaseTests.cs (6)
534
control.BackgroundImageLayout = ImageLayout.
Center
;
535
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
539
control.BackgroundImageLayout = ImageLayout.
Center
;
540
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
550
control.BackgroundImageLayout = ImageLayout.
Center
;
551
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
ToolStripContainerTests.cs (1)
103
_toolStripContainer.BackgroundImageLayout = ImageLayout.
Center
;
TrackBarTests.cs (6)
528
control.BackgroundImageLayout = ImageLayout.
Center
;
529
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
533
control.BackgroundImageLayout = ImageLayout.
Center
;
534
Assert.Equal(ImageLayout.
Center
, control.BackgroundImageLayout);
544
control.BackgroundImageLayout = ImageLayout.
Center
;
545
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
);