597 references to ImageLayout
System.Windows.Forms (56)
System\Windows\Forms\ActiveX\AxHost.cs (1)
289
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Control.cs (8)
865
[DefaultValue(
ImageLayout
.Tile)]
868
public virtual
ImageLayout
BackgroundImageLayout
870
get => Properties.GetValueOrDefault(s_backgroundImageLayoutProperty,
ImageLayout
.Tile);
881
if (value is
ImageLayout
.Center or
ImageLayout
.Zoom or
ImageLayout
.Stretch)
892
Properties.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue:
ImageLayout
.Tile);
8060
if (!renderColorTransparent && BackgroundImageLayout ==
ImageLayout
.Tile && imageIsTransparent)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
272
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
1046
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
160
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\Labels\Label.cs (1)
191
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
187
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ListView\ListView.cs (1)
361
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
229
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
149
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
342
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
196
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
142
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
210
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
328
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
95
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (1)
123
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
76
[DefaultValue(
ImageLayout
.Tile)]
79
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (4)
484
[DefaultValue(
ImageLayout
.Tile)]
487
public virtual
ImageLayout
BackgroundImageLayout
489
get => Properties.GetValueOrDefault(s_backgroundImageLayoutProperty,
ImageLayout
.Tile);
493
if (Properties.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue:
ImageLayout
.Tile) != value)
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (1)
61
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
42
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
65
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
133
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
232
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
163
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1309
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
205
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\MDI\MDIClient.cs (2)
64
public override
ImageLayout
BackgroundImageLayout
71
ImageLayout
imageLayout = base.BackgroundImageLayout;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
467
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Rendering\ControlPaint.cs (11)
70
internal static Rectangle CalculateBackgroundImageRectangle(Rectangle bounds, Size imageSize,
ImageLayout
imageLayout)
76
case
ImageLayout
.Stretch:
80
case
ImageLayout
.None:
84
case
ImageLayout
.Center:
99
case
ImageLayout
.Zoom:
418
ImageLayout
backgroundImageLayout,
426
if (backgroundImageLayout ==
ImageLayout
.Tile)
450
if (rightToLeft == RightToLeft.Yes && backgroundImageLayout ==
ImageLayout
.None)
466
if (backgroundImageLayout is
ImageLayout
.Stretch or
ImageLayout
.Zoom)
471
else if (backgroundImageLayout ==
ImageLayout
.None)
System\Windows\Forms\Scrolling\ScrollableControl.cs (3)
668
(BackgroundImageLayout ==
ImageLayout
.Zoom || BackgroundImageLayout ==
ImageLayout
.Stretch || BackgroundImageLayout ==
ImageLayout
.Center))
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
108
public override
ImageLayout
BackgroundImageLayout
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System.Windows.Forms.Tests (537)
System\Windows\Forms\AxHostTests.cs (7)
39
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
133
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
321
[EnumData<
ImageLayout
>]
322
public void AxHost_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
338
[InvalidEnumData<
ImageLayout
>]
339
public void AxHost_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
549
[EnumData<
ImageLayout
>]
System\Windows\Forms\ButtonBaseTests.cs (2)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
2648
[EnumData<
ImageLayout
>]
System\Windows\Forms\ButtonTests.cs (1)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\CheckBoxTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ComboBoxTests.cs (13)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
558
[EnumData<
ImageLayout
>]
559
public void ComboBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
588
control.BackgroundImageLayout =
ImageLayout
.Center;
589
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
593
control.BackgroundImageLayout =
ImageLayout
.Center;
594
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
598
control.BackgroundImageLayout =
ImageLayout
.Stretch;
599
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
604
control.BackgroundImageLayout =
ImageLayout
.Center;
605
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
610
[InvalidEnumData<
ImageLayout
>]
611
public void ComboBox_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ContainerControlTests.cs (1)
37
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.cs (5)
26
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
115
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
211
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
307
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
403
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.Handlers.cs (50)
556
BackgroundImageLayout =
ImageLayout
.Center
560
BackgroundImageLayout =
ImageLayout
.Center
3838
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3852
public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
3901
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3912
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3913
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3914
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
3915
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
3916
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3917
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3919
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3920
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3921
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
3922
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
3923
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3924
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3945
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3956
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3957
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3958
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3959
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3960
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
3961
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
3963
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3964
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3965
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3966
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3967
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3968
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3974
public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
4024
public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4073
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4084
yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4085
yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4086
yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4087
yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4088
yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4089
yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4091
yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4092
yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4093
yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4094
yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4095
yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4096
yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4101
public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ControlTests.Properties.cs (31)
1984
[EnumData<
ImageLayout
>]
1985
public void Control_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
2003
[InlineData(
ImageLayout
.Center, 1)]
2004
[InlineData(
ImageLayout
.None, 1)]
2005
[InlineData(
ImageLayout
.Stretch, 1)]
2006
[InlineData(
ImageLayout
.Tile, 0)]
2007
[InlineData(
ImageLayout
.Zoom, 1)]
2008
public void Control_BackgroundImageLayout_SetWithHandle_GetReturnsExpected(
ImageLayout
value, int expectedInvalidatedCallCount)
2039
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, false };
2040
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, false };
2041
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Center, true };
2042
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Stretch, true };
2043
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Zoom, true };
2045
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.None, false };
2046
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Tile, false };
2047
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Center, false };
2048
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Stretch, false };
2049
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Zoom, false };
2054
public void Control_BackgroundImageLayout_SetWithBackgroundImage_GetReturnsExpected(Image backgroundImage,
ImageLayout
value, bool expectedDoubleBuffered)
2084
control.BackgroundImageLayout =
ImageLayout
.Center;
2085
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
2089
control.BackgroundImageLayout =
ImageLayout
.Center;
2090
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
2094
control.BackgroundImageLayout =
ImageLayout
.Stretch;
2095
Assert.Equal(
ImageLayout
.Stretch, 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);
2131
[InvalidEnumData<
ImageLayout
>]
2132
public void Control_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\DataGridViewTests.cs (2)
3496
TestEvent(nameof(DataGridView.BackgroundImageLayoutChanged), nameof(DataGridView.BackgroundImageLayout),
ImageLayout
.Center,
ImageLayout
.Stretch);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\DateTimePickerTests.cs (3)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
747
control.BackgroundImageLayout =
ImageLayout
.Center;
751
control.BackgroundImageLayout =
ImageLayout
.Stretch;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
44
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\DomainUpDownTests.cs (1)
45
_sub.BackgroundImageLayout.Should().Be(
ImageLayout
.Tile);
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\FormTests.cs (1)
42
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\GroupBoxTests.cs (1)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\HScrollBarTests.cs (1)
26
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\LabelTests.cs (11)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
561
Assert.Equal(
ImageLayout
.Tile, label.BackgroundImageLayout); // Default value
564
label.BackgroundImageLayout =
ImageLayout
.Center;
565
Assert.Equal(
ImageLayout
.Center, label.BackgroundImageLayout);
568
label.BackgroundImageLayout =
ImageLayout
.Center;
569
Assert.Equal(
ImageLayout
.Center, label.BackgroundImageLayout);
572
label.BackgroundImageLayout =
ImageLayout
.Stretch;
573
Assert.Equal(
ImageLayout
.Stretch, label.BackgroundImageLayout);
596
label.BackgroundImageLayout =
ImageLayout
.Center;
602
label.BackgroundImageLayout =
ImageLayout
.Stretch;
606
label.BackgroundImageLayout =
ImageLayout
.Zoom;
System\Windows\Forms\ListBoxTests.cs (13)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
532
[EnumData<
ImageLayout
>]
533
public void ListBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
562
control.BackgroundImageLayout =
ImageLayout
.Center;
563
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
567
control.BackgroundImageLayout =
ImageLayout
.Center;
568
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
572
control.BackgroundImageLayout =
ImageLayout
.Stretch;
573
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
578
control.BackgroundImageLayout =
ImageLayout
.Center;
579
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
584
[InvalidEnumData<
ImageLayout
>]
585
public void ListBox_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ListControlTests.cs (1)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ListViewTests.cs (13)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
554
[EnumData<
ImageLayout
>]
555
public void ListView_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
586
control.BackgroundImageLayout =
ImageLayout
.Center;
587
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
591
control.BackgroundImageLayout =
ImageLayout
.Center;
592
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
596
control.BackgroundImageLayout =
ImageLayout
.Stretch;
597
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
602
control.BackgroundImageLayout =
ImageLayout
.Center;
603
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
608
[InvalidEnumData<
ImageLayout
>]
609
public void ListView_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\MdiClientTests.cs (14)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
254
[EnumData<
ImageLayout
>]
255
public void MdiClient_BackgroundImageLayout_GetWithParent_GetReturnsExpected(
ImageLayout
parentBackgroundImageLayout)
266
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
274
[EnumData<
ImageLayout
>]
275
public void MdiClient_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
304
control.BackgroundImageLayout =
ImageLayout
.Center;
305
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
309
control.BackgroundImageLayout =
ImageLayout
.Center;
310
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
314
control.BackgroundImageLayout =
ImageLayout
.Stretch;
315
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
320
control.BackgroundImageLayout =
ImageLayout
.Center;
321
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\MdiControlStripTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, mdiControlStrip.BackgroundImageLayout);
System\Windows\Forms\MenuStripTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\MonthCalendarTests.cs (13)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
432
[EnumData<
ImageLayout
>]
433
public void MonthCalendar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
464
control.BackgroundImageLayout =
ImageLayout
.Center;
465
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
469
control.BackgroundImageLayout =
ImageLayout
.Center;
470
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
474
control.BackgroundImageLayout =
ImageLayout
.Stretch;
475
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
480
control.BackgroundImageLayout =
ImageLayout
.Center;
481
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
486
[InvalidEnumData<
ImageLayout
>]
487
public void MonthCalendar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\PanelTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\PictureBoxTests.cs (1)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ProgressBarTests.cs (13)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
276
[EnumData<
ImageLayout
>]
277
public void ProgressBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
309
control.BackgroundImageLayout =
ImageLayout
.Center;
310
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
314
control.BackgroundImageLayout =
ImageLayout
.Center;
315
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
319
control.BackgroundImageLayout =
ImageLayout
.Stretch;
320
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
325
control.BackgroundImageLayout =
ImageLayout
.Center;
326
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
331
[InvalidEnumData<
ImageLayout
>]
332
public void ProgressBar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\PropertyGridTests.cs (13)
42
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
469
[EnumData<
ImageLayout
>]
470
public void PropertyGrid_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
501
control.BackgroundImageLayout =
ImageLayout
.Center;
502
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
506
control.BackgroundImageLayout =
ImageLayout
.Center;
507
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
511
control.BackgroundImageLayout =
ImageLayout
.Stretch;
512
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
517
control.BackgroundImageLayout =
ImageLayout
.Center;
518
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
523
[InvalidEnumData<
ImageLayout
>]
524
public void PropertyGrid_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\RadioButtonTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\RichTextBoxTests.cs (11)
39
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
797
[EnumData<
ImageLayout
>]
798
public void RichTextBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
830
control.BackgroundImageLayout =
ImageLayout
.Center;
831
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
835
control.BackgroundImageLayout =
ImageLayout
.Center;
836
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
840
control.BackgroundImageLayout =
ImageLayout
.Stretch;
841
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
846
control.BackgroundImageLayout =
ImageLayout
.Center;
847
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\ScrollableControlTests.cs (58)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
1512
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1528
public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
1584
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1586
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (hScroll || vScroll) ? 0 : 1;
1596
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1597
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1598
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1599
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1600
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1601
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1603
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1604
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1605
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
1606
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
1607
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1608
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1628
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1637
: backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center)
1646
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1647
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1648
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
1649
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
1650
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1651
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1653
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1654
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1655
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1656
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1657
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1658
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1675
public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
1727
public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
1784
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1786
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (!hScroll && vScroll) ? 0 : 1;
1796
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1797
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1798
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1799
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1800
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1801
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1803
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1804
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1805
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1806
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1807
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1808
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1815
public void ScrollableControl_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ScrollBarTests.cs (14)
27
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
304
[EnumData<
ImageLayout
>]
305
public void ScrollBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
334
control.BackgroundImageLayout =
ImageLayout
.Center;
335
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
339
control.BackgroundImageLayout =
ImageLayout
.Center;
340
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
344
control.BackgroundImageLayout =
ImageLayout
.Stretch;
345
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
350
control.BackgroundImageLayout =
ImageLayout
.Center;
351
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
356
[InvalidEnumData<
ImageLayout
>]
357
public void ScrollBar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
623
[EnumData<
ImageLayout
>]
System\Windows\Forms\SplitterPanelTests.cs (1)
38
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\SplitterTests.cs (11)
27
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
258
[EnumData<
ImageLayout
>]
259
public void Splitter_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
291
control.BackgroundImageLayout =
ImageLayout
.Center;
292
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
296
control.BackgroundImageLayout =
ImageLayout
.Center;
297
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
301
control.BackgroundImageLayout =
ImageLayout
.Stretch;
302
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
307
control.BackgroundImageLayout =
ImageLayout
.Center;
308
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\StatusStripTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\TabControlTests.cs (13)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
676
[EnumData<
ImageLayout
>]
677
public void TabControl_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
709
control.BackgroundImageLayout =
ImageLayout
.Center;
710
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
714
control.BackgroundImageLayout =
ImageLayout
.Center;
715
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
719
control.BackgroundImageLayout =
ImageLayout
.Stretch;
720
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
725
control.BackgroundImageLayout =
ImageLayout
.Center;
726
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
731
[InvalidEnumData<
ImageLayout
>]
732
public void TabControl_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\TableLayoutPanelTests.cs (1)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\TabPageTests.cs (36)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
145
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
3960
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3974
public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4014
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4025
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4026
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4027
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4028
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4029
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4030
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4032
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4033
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4034
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4035
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4036
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4037
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4044
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
4100
public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4153
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4164
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4165
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4166
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4167
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4168
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4169
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4171
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4172
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4173
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4174
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4175
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4176
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4183
public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ToolStripButtonTests.cs (6)
32
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
113
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
200
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
290
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
378
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
476
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripComboBoxTests.cs (6)
150
[InlineData(
ImageLayout
.None)]
151
[InlineData(
ImageLayout
.Tile)]
152
[InlineData(
ImageLayout
.Center)]
153
[InlineData(
ImageLayout
.Stretch)]
154
[InlineData(
ImageLayout
.Zoom)]
155
public void ToolStripComboBox_BackgroundImageLayout_SetAndGet(
ImageLayout
layout)
System\Windows\Forms\ToolStripContentPanelTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripControlHostTests.cs (7)
29
BackgroundImageLayout =
ImageLayout
.Zoom,
446
[EnumData<
ImageLayout
>]
447
public void ToolStripControlHost_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
472
Assert.Throws<ObjectDisposedException>(() => item.BackgroundImageLayout =
ImageLayout
.Zoom);
570
c.BackgroundImageLayout =
ImageLayout
.Zoom;
571
Assert.Equal(
ImageLayout
.Zoom, c.BackgroundImageLayout);
572
Assert.Equal(
ImageLayout
.Zoom, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
31
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
120
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
219
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
319
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripDropDownTests.cs (11)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
852
[EnumData<
ImageLayout
>]
853
public void ToolStripDropDown_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
884
control.BackgroundImageLayout =
ImageLayout
.Center;
885
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
889
control.BackgroundImageLayout =
ImageLayout
.Center;
890
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
894
control.BackgroundImageLayout =
ImageLayout
.Stretch;
895
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
900
control.BackgroundImageLayout =
ImageLayout
.Center;
901
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripItemTests.cs (19)
34
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
119
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
214
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
1903
[EnumData<
ImageLayout
>]
1904
public void ToolStripItem_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
1918
[EnumData<
ImageLayout
>]
1919
public void ToolStripItem_BackgroundImageLayout_SetWithOwner_GetReturnsExpected(
ImageLayout
value)
1938
[EnumData<
ImageLayout
>]
1939
public void ToolStripItem_BackgroundImageLayout_SetWithOwnerWithHandle_GetReturnsExpected(
ImageLayout
value)
1971
[EnumData<
ImageLayout
>]
1972
public void ToolStripItem_BackgroundImageLayout_SetWithParent_GetReturnsExpected(
ImageLayout
value)
1991
[InlineData(
ImageLayout
.None, 1)]
1992
[InlineData(
ImageLayout
.Tile, 0)]
1993
[InlineData(
ImageLayout
.Center, 1)]
1994
[InlineData(
ImageLayout
.Stretch, 1)]
1995
[InlineData(
ImageLayout
.Zoom, 1)]
1996
public void ToolStripItem_BackgroundImageLayout_SetWithParentWithHandle_GetReturnsExpected(
ImageLayout
value, int expectedInvalidatedCallCount)
2028
[InvalidEnumData<
ImageLayout
>]
2029
public void ToolStripItem_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
32
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
278
BackgroundImageLayout =
ImageLayout
.Center,
System\Windows\Forms\ToolStripPanelTests.cs (1)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripSeparatorTests.cs (3)
32
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
134
[EnumData<
ImageLayout
>]
135
public void ToolStripSeparator_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
System\Windows\Forms\ToolStripTests.cs (56)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
194
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
5853
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5869
public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
5926
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5928
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (hScroll || vScroll) ? 0 : 1;
5938
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5939
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5940
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
5941
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
5942
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5943
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5945
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5946
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5947
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
5948
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
5949
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5950
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5978
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5987
: backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center)
5996
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
5997
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
5998
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
5999
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
6000
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected2 };
6001
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected2 };
6003
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6004
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6005
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6006
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6007
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6008
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6016
public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
6067
public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
6124
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
6135
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6136
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6137
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
6138
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
6139
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6140
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6142
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6143
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6144
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6145
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6146
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6147
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6154
public void ToolStrip_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ToolStripTextBoxTests.cs (4)
64
[InlineData(
ImageLayout
.Center)]
65
[InlineData(
ImageLayout
.Stretch)]
66
[InlineData(
ImageLayout
.Zoom)]
67
public void ToolStripTextBox_BackgroundImageLayout_GetSet_ReturnsExpected(
ImageLayout
imageLayout)
System\Windows\Forms\TreeViewTests.cs (13)
27
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
849
[EnumData<
ImageLayout
>]
850
public void TreeView_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
879
control.BackgroundImageLayout =
ImageLayout
.Center;
880
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
884
control.BackgroundImageLayout =
ImageLayout
.Center;
885
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
889
control.BackgroundImageLayout =
ImageLayout
.Stretch;
890
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
895
control.BackgroundImageLayout =
ImageLayout
.Center;
896
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
901
[InvalidEnumData<
ImageLayout
>]
902
public void BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\UpDownBaseTests.cs (11)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
661
[EnumData<
ImageLayout
>]
662
public void UpDownBase_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
694
control.BackgroundImageLayout =
ImageLayout
.Center;
695
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
699
control.BackgroundImageLayout =
ImageLayout
.Center;
700
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
704
control.BackgroundImageLayout =
ImageLayout
.Stretch;
705
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
710
control.BackgroundImageLayout =
ImageLayout
.Center;
711
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\UserControlTests.cs (1)
37
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\VScrollBarTests.cs (1)
25
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\WebBrowserTests.cs (1)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
TextBoxBaseTests.cs (10)
499
[EnumData<
ImageLayout
>]
500
public void TextBoxBase_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
532
control.BackgroundImageLayout =
ImageLayout
.Center;
533
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
537
control.BackgroundImageLayout =
ImageLayout
.Center;
538
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
542
control.BackgroundImageLayout =
ImageLayout
.Stretch;
543
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
548
control.BackgroundImageLayout =
ImageLayout
.Center;
549
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
TextBoxTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
ToolStripContainerTests.cs (2)
101
_toolStripContainer.BackgroundImageLayout =
ImageLayout
.Center;
106
_toolStripContainer.BackgroundImageLayout =
ImageLayout
.Stretch;
TrackBarTests.cs (11)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
494
[EnumData<
ImageLayout
>]
495
public void TrackBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
526
control.BackgroundImageLayout =
ImageLayout
.Center;
527
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
531
control.BackgroundImageLayout =
ImageLayout
.Center;
532
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
536
control.BackgroundImageLayout =
ImageLayout
.Stretch;
537
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
542
control.BackgroundImageLayout =
ImageLayout
.Center;
543
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System.Windows.Forms.UI.IntegrationTests (3)
PropertyGridTests.cs (3)
170
_propertyGrid.BackgroundImageLayout.Should().Be(
ImageLayout
.Tile);
172
_propertyGrid.BackgroundImageLayout =
ImageLayout
.Center;
173
_propertyGrid.BackgroundImageLayout.Should().Be(
ImageLayout
.Center);