600 references to ImageLayout
System.Windows.Forms (59)
System\Windows\Forms\ActiveX\AxHost.cs (1)
273
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Control.cs (8)
864
[DefaultValue(
ImageLayout
.Tile)]
867
public virtual
ImageLayout
BackgroundImageLayout
869
get => Properties.GetValueOrDefault(s_backgroundImageLayoutProperty,
ImageLayout
.Tile);
880
if (value is
ImageLayout
.Center or
ImageLayout
.Zoom or
ImageLayout
.Stretch)
891
Properties.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue:
ImageLayout
.Tile);
8094
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)
132
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
232
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (1)
70
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBar.cs (1)
49
public override
ImageLayout
BackgroundImageLayout
System\Windows\Forms\Controls\Unsupported\ToolBar\ToolBar.cs (1)
69
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:
415
ImageLayout
backgroundImageLayout,
423
if (backgroundImageLayout ==
ImageLayout
.Tile)
447
if (rightToLeft == RightToLeft.Yes && backgroundImageLayout ==
ImageLayout
.None)
463
if (backgroundImageLayout is
ImageLayout
.Stretch or
ImageLayout
.Zoom)
468
else if (backgroundImageLayout ==
ImageLayout
.None)
System\Windows\Forms\Scrolling\ScrollableControl.cs (3)
662
(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)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System.Windows.Forms.Tests (537)
System\Windows\Forms\AxHostTests.cs (7)
41
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
135
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
323
[EnumData<
ImageLayout
>]
324
public void AxHost_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
340
[InvalidEnumData<
ImageLayout
>]
341
public void AxHost_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
551
[EnumData<
ImageLayout
>]
System\Windows\Forms\ButtonBaseTests.cs (2)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
2650
[EnumData<
ImageLayout
>]
System\Windows\Forms\ButtonTests.cs (1)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\CheckBoxTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ComboBoxTests.cs (13)
38
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
559
[EnumData<
ImageLayout
>]
560
public void ComboBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
589
control.BackgroundImageLayout =
ImageLayout
.Center;
590
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
594
control.BackgroundImageLayout =
ImageLayout
.Center;
595
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
599
control.BackgroundImageLayout =
ImageLayout
.Stretch;
600
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
605
control.BackgroundImageLayout =
ImageLayout
.Center;
606
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
611
[InvalidEnumData<
ImageLayout
>]
612
public void ComboBox_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ContainerControlTests.cs (1)
39
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.cs (5)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
117
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
213
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
309
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
405
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ControlTests.Handlers.cs (50)
558
BackgroundImageLayout =
ImageLayout
.Center
562
BackgroundImageLayout =
ImageLayout
.Center
3840
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3854
public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
3903
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3914
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3915
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3916
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
3917
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
3918
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3919
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3921
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3922
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3923
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
3924
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
3925
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3926
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
3947
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3958
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3959
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3960
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3961
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
3962
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
3963
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
3965
yield return new object[] { parent, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3966
yield return new object[] { parent, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3967
yield return new object[] { parent, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3968
yield return new object[] { parent, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3969
yield return new object[] { parent, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3970
yield return new object[] { parent, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
3976
public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
4026
public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4075
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4086
yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4087
yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4088
yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4089
yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4090
yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4091
yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4093
yield return new object[] { true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4094
yield return new object[] { true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4095
yield return new object[] { true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4096
yield return new object[] { true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4097
yield return new object[] { false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4098
yield return new object[] { false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4103
public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ControlTests.Properties.cs (31)
1986
[EnumData<
ImageLayout
>]
1987
public void Control_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
2005
[InlineData(
ImageLayout
.Center, 1)]
2006
[InlineData(
ImageLayout
.None, 1)]
2007
[InlineData(
ImageLayout
.Stretch, 1)]
2008
[InlineData(
ImageLayout
.Tile, 0)]
2009
[InlineData(
ImageLayout
.Zoom, 1)]
2010
public void Control_BackgroundImageLayout_SetWithHandle_GetReturnsExpected(
ImageLayout
value, int expectedInvalidatedCallCount)
2041
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, false };
2042
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, false };
2043
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Center, true };
2044
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Stretch, true };
2045
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Zoom, true };
2047
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.None, false };
2048
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Tile, false };
2049
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Center, false };
2050
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Stretch, false };
2051
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb),
ImageLayout
.Zoom, false };
2056
public void Control_BackgroundImageLayout_SetWithBackgroundImage_GetReturnsExpected(Image backgroundImage,
ImageLayout
value, bool expectedDoubleBuffered)
2086
control.BackgroundImageLayout =
ImageLayout
.Center;
2087
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
2091
control.BackgroundImageLayout =
ImageLayout
.Center;
2092
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
2096
control.BackgroundImageLayout =
ImageLayout
.Stretch;
2097
Assert.Equal(
ImageLayout
.Stretch, 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);
2133
[InvalidEnumData<
ImageLayout
>]
2134
public void Control_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\DataGridViewTests.cs (2)
3497
TestEvent(nameof(DataGridView.BackgroundImageLayoutChanged), nameof(DataGridView.BackgroundImageLayout),
ImageLayout
.Center,
ImageLayout
.Stretch);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
37
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\DateTimePickerTests.cs (3)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
749
control.BackgroundImageLayout =
ImageLayout
.Center;
753
control.BackgroundImageLayout =
ImageLayout
.Stretch;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
46
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\DomainUpDownTests.cs (1)
47
_sub.BackgroundImageLayout.Should().Be(
ImageLayout
.Tile);
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\FormTests.cs (1)
44
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\GroupBoxTests.cs (1)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\HScrollBarTests.cs (1)
28
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\LabelTests.cs (11)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
563
Assert.Equal(
ImageLayout
.Tile, label.BackgroundImageLayout); // Default value
566
label.BackgroundImageLayout =
ImageLayout
.Center;
567
Assert.Equal(
ImageLayout
.Center, label.BackgroundImageLayout);
570
label.BackgroundImageLayout =
ImageLayout
.Center;
571
Assert.Equal(
ImageLayout
.Center, label.BackgroundImageLayout);
574
label.BackgroundImageLayout =
ImageLayout
.Stretch;
575
Assert.Equal(
ImageLayout
.Stretch, label.BackgroundImageLayout);
598
label.BackgroundImageLayout =
ImageLayout
.Center;
604
label.BackgroundImageLayout =
ImageLayout
.Stretch;
608
label.BackgroundImageLayout =
ImageLayout
.Zoom;
System\Windows\Forms\ListBoxTests.cs (13)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
534
[EnumData<
ImageLayout
>]
535
public void ListBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
564
control.BackgroundImageLayout =
ImageLayout
.Center;
565
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
569
control.BackgroundImageLayout =
ImageLayout
.Center;
570
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
574
control.BackgroundImageLayout =
ImageLayout
.Stretch;
575
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
580
control.BackgroundImageLayout =
ImageLayout
.Center;
581
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
586
[InvalidEnumData<
ImageLayout
>]
587
public void ListBox_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ListControlTests.cs (1)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ListViewTests.cs (13)
37
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
556
[EnumData<
ImageLayout
>]
557
public void ListView_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 ListView_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\MdiClientTests.cs (14)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
256
[EnumData<
ImageLayout
>]
257
public void MdiClient_BackgroundImageLayout_GetWithParent_GetReturnsExpected(
ImageLayout
parentBackgroundImageLayout)
268
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
276
[EnumData<
ImageLayout
>]
277
public void MdiClient_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
306
control.BackgroundImageLayout =
ImageLayout
.Center;
307
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
311
control.BackgroundImageLayout =
ImageLayout
.Center;
312
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
316
control.BackgroundImageLayout =
ImageLayout
.Stretch;
317
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
322
control.BackgroundImageLayout =
ImageLayout
.Center;
323
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\MdiControlStripTests.cs (1)
36
Assert.Equal(
ImageLayout
.Tile, mdiControlStrip.BackgroundImageLayout);
System\Windows\Forms\MenuStripTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\MonthCalendarTests.cs (13)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
434
[EnumData<
ImageLayout
>]
435
public void MonthCalendar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
466
control.BackgroundImageLayout =
ImageLayout
.Center;
467
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
471
control.BackgroundImageLayout =
ImageLayout
.Center;
472
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
476
control.BackgroundImageLayout =
ImageLayout
.Stretch;
477
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
482
control.BackgroundImageLayout =
ImageLayout
.Center;
483
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
488
[InvalidEnumData<
ImageLayout
>]
489
public void MonthCalendar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\PanelTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\PictureBoxTests.cs (1)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ProgressBarTests.cs (13)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
278
[EnumData<
ImageLayout
>]
279
public void ProgressBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
311
control.BackgroundImageLayout =
ImageLayout
.Center;
312
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
316
control.BackgroundImageLayout =
ImageLayout
.Center;
317
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
321
control.BackgroundImageLayout =
ImageLayout
.Stretch;
322
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
327
control.BackgroundImageLayout =
ImageLayout
.Center;
328
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
333
[InvalidEnumData<
ImageLayout
>]
334
public void ProgressBar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\PropertyGridTests.cs (13)
44
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
471
[EnumData<
ImageLayout
>]
472
public void PropertyGrid_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
503
control.BackgroundImageLayout =
ImageLayout
.Center;
504
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
508
control.BackgroundImageLayout =
ImageLayout
.Center;
509
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
513
control.BackgroundImageLayout =
ImageLayout
.Stretch;
514
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
519
control.BackgroundImageLayout =
ImageLayout
.Center;
520
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
525
[InvalidEnumData<
ImageLayout
>]
526
public void PropertyGrid_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\RadioButtonTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\RichTextBoxTests.cs (11)
41
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
799
[EnumData<
ImageLayout
>]
800
public void RichTextBox_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
832
control.BackgroundImageLayout =
ImageLayout
.Center;
833
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
837
control.BackgroundImageLayout =
ImageLayout
.Center;
838
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
842
control.BackgroundImageLayout =
ImageLayout
.Stretch;
843
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
848
control.BackgroundImageLayout =
ImageLayout
.Center;
849
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\ScrollableControlTests.cs (58)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
1514
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1530
public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
1586
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1588
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (hScroll || vScroll) ? 0 : 1;
1598
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1599
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1600
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1601
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1602
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1603
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1605
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1606
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1607
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
1608
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
1609
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1610
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1630
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1639
: backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center)
1648
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1649
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1650
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
1651
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
1652
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1653
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1655
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1656
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1657
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1658
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1659
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1660
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected1 };
1677
public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
1729
public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
1786
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
1788
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (!hScroll && vScroll) ? 0 : 1;
1798
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1799
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1800
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1801
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
1802
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1803
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
1805
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1806
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1807
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1808
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1809
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1810
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
1817
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)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
306
[EnumData<
ImageLayout
>]
307
public void ScrollBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
336
control.BackgroundImageLayout =
ImageLayout
.Center;
337
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
341
control.BackgroundImageLayout =
ImageLayout
.Center;
342
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
346
control.BackgroundImageLayout =
ImageLayout
.Stretch;
347
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
352
control.BackgroundImageLayout =
ImageLayout
.Center;
353
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
358
[InvalidEnumData<
ImageLayout
>]
359
public void ScrollBar_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
625
[EnumData<
ImageLayout
>]
System\Windows\Forms\SplitterPanelTests.cs (1)
40
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\SplitterTests.cs (11)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
260
[EnumData<
ImageLayout
>]
261
public void Splitter_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
293
control.BackgroundImageLayout =
ImageLayout
.Center;
294
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
298
control.BackgroundImageLayout =
ImageLayout
.Center;
299
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
303
control.BackgroundImageLayout =
ImageLayout
.Stretch;
304
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
309
control.BackgroundImageLayout =
ImageLayout
.Center;
310
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\StatusStripTests.cs (1)
34
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\TabControlTests.cs (13)
32
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
678
[EnumData<
ImageLayout
>]
679
public void TabControl_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
711
control.BackgroundImageLayout =
ImageLayout
.Center;
712
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
716
control.BackgroundImageLayout =
ImageLayout
.Center;
717
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
721
control.BackgroundImageLayout =
ImageLayout
.Stretch;
722
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
727
control.BackgroundImageLayout =
ImageLayout
.Center;
728
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
733
[InvalidEnumData<
ImageLayout
>]
734
public void TabControl_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\TableLayoutPanelTests.cs (1)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\TabPageTests.cs (36)
38
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
147
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
3962
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
3976
public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4016
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4027
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4028
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4029
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4030
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4031
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4032
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4034
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4035
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4036
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4037
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4038
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4039
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4046
public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
4102
public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
4155
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
4166
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4167
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4168
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4169
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
4170
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4171
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
4173
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4174
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4175
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4176
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4177
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4178
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
4185
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)
34
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
115
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
202
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
292
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
380
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
478
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripComboBoxTests.cs (6)
148
[InlineData(
ImageLayout
.None)]
149
[InlineData(
ImageLayout
.Tile)]
150
[InlineData(
ImageLayout
.Center)]
151
[InlineData(
ImageLayout
.Stretch)]
152
[InlineData(
ImageLayout
.Zoom)]
153
public void ToolStripComboBox_BackgroundImageLayout_SetAndGet(
ImageLayout
layout)
System\Windows\Forms\ToolStripContentPanelTests.cs (1)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripControlHostTests.cs (7)
31
BackgroundImageLayout =
ImageLayout
.Zoom,
448
[EnumData<
ImageLayout
>]
449
public void ToolStripControlHost_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
474
Assert.Throws<ObjectDisposedException>(() => item.BackgroundImageLayout =
ImageLayout
.Zoom);
572
c.BackgroundImageLayout =
ImageLayout
.Zoom;
573
Assert.Equal(
ImageLayout
.Zoom, c.BackgroundImageLayout);
574
Assert.Equal(
ImageLayout
.Zoom, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
33
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
122
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
221
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
321
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
System\Windows\Forms\ToolStripDropDownTests.cs (11)
38
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
854
[EnumData<
ImageLayout
>]
855
public void ToolStripDropDown_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
886
control.BackgroundImageLayout =
ImageLayout
.Center;
887
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
891
control.BackgroundImageLayout =
ImageLayout
.Center;
892
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
896
control.BackgroundImageLayout =
ImageLayout
.Stretch;
897
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
902
control.BackgroundImageLayout =
ImageLayout
.Center;
903
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripItemTests.cs (19)
36
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
121
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
216
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
1905
[EnumData<
ImageLayout
>]
1906
public void ToolStripItem_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
1920
[EnumData<
ImageLayout
>]
1921
public void ToolStripItem_BackgroundImageLayout_SetWithOwner_GetReturnsExpected(
ImageLayout
value)
1940
[EnumData<
ImageLayout
>]
1941
public void ToolStripItem_BackgroundImageLayout_SetWithOwnerWithHandle_GetReturnsExpected(
ImageLayout
value)
1973
[EnumData<
ImageLayout
>]
1974
public void ToolStripItem_BackgroundImageLayout_SetWithParent_GetReturnsExpected(
ImageLayout
value)
1993
[InlineData(
ImageLayout
.None, 1)]
1994
[InlineData(
ImageLayout
.Tile, 0)]
1995
[InlineData(
ImageLayout
.Center, 1)]
1996
[InlineData(
ImageLayout
.Stretch, 1)]
1997
[InlineData(
ImageLayout
.Zoom, 1)]
1998
public void ToolStripItem_BackgroundImageLayout_SetWithParentWithHandle_GetReturnsExpected(
ImageLayout
value, int expectedInvalidatedCallCount)
2030
[InvalidEnumData<
ImageLayout
>]
2031
public void ToolStripItem_BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
30
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
276
BackgroundImageLayout =
ImageLayout
.Center,
System\Windows\Forms\ToolStripPanelTests.cs (1)
35
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\ToolStripSeparatorTests.cs (3)
34
Assert.Equal(
ImageLayout
.Tile, item.BackgroundImageLayout);
136
[EnumData<
ImageLayout
>]
137
public void ToolStripSeparator_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
System\Windows\Forms\ToolStripTests.cs (56)
38
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
196
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
5855
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5871
public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
5928
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5930
int expected = backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center) && (hScroll || vScroll) ? 0 : 1;
5940
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5941
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5942
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
5943
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
5944
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5945
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
5947
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5948
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5949
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
5950
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 2 };
5951
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5952
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
5980
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
5989
: backgroundImage is not null && (backgroundImageLayout ==
ImageLayout
.Zoom || backgroundImageLayout ==
ImageLayout
.Stretch || backgroundImageLayout ==
ImageLayout
.Center)
5998
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
5999
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
6000
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
6001
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected1 };
6002
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected2 };
6003
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, expected2 };
6005
yield return new object[] { parent, hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6006
yield return new object[] { parent, hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6007
yield return new object[] { parent, hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6008
yield return new object[] { parent, hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6009
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6010
yield return new object[] { parent, hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, expected2 };
6018
public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout, int expectedPaintCallCount)
6069
public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage,
ImageLayout
backgroundImageLayout)
6126
foreach (
ImageLayout
backgroundImageLayout in Enum.GetValues(typeof(
ImageLayout
)))
6137
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6138
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6139
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
6140
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 1 };
6141
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6142
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.None, 0 };
6144
yield return new object[] { hScroll, vScroll, true, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6145
yield return new object[] { hScroll, vScroll, true, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6146
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(100, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6147
yield return new object[] { hScroll, vScroll, true, Color.FromArgb(0, 50, 100, 150), new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6148
yield return new object[] { hScroll, vScroll, false, Color.Empty, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6149
yield return new object[] { hScroll, vScroll, false, Color.Red, new Bitmap(10, 10, PixelFormat.Format32bppArgb),
ImageLayout
.Tile, 1 };
6156
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)
66
[InlineData(
ImageLayout
.Center)]
67
[InlineData(
ImageLayout
.Stretch)]
68
[InlineData(
ImageLayout
.Zoom)]
69
public void ToolStripTextBox_BackgroundImageLayout_GetSet_ReturnsExpected(
ImageLayout
imageLayout)
System\Windows\Forms\TreeViewTests.cs (13)
29
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
851
[EnumData<
ImageLayout
>]
852
public void TreeView_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
881
control.BackgroundImageLayout =
ImageLayout
.Center;
882
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
886
control.BackgroundImageLayout =
ImageLayout
.Center;
887
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
891
control.BackgroundImageLayout =
ImageLayout
.Stretch;
892
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
897
control.BackgroundImageLayout =
ImageLayout
.Center;
898
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
903
[InvalidEnumData<
ImageLayout
>]
904
public void BackgroundImageLayout_SetInvalid_ThrowsInvalidEnumArgumentException(
ImageLayout
value)
System\Windows\Forms\UpDownBaseTests.cs (11)
33
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
663
[EnumData<
ImageLayout
>]
664
public void UpDownBase_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
696
control.BackgroundImageLayout =
ImageLayout
.Center;
697
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
701
control.BackgroundImageLayout =
ImageLayout
.Center;
702
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
706
control.BackgroundImageLayout =
ImageLayout
.Stretch;
707
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
712
control.BackgroundImageLayout =
ImageLayout
.Center;
713
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
System\Windows\Forms\UserControlTests.cs (1)
39
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\VScrollBarTests.cs (1)
27
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
System\Windows\Forms\WebBrowserTests.cs (1)
30
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
TextBoxBaseTests.cs (10)
501
[EnumData<
ImageLayout
>]
502
public void TextBoxBase_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
534
control.BackgroundImageLayout =
ImageLayout
.Center;
535
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
539
control.BackgroundImageLayout =
ImageLayout
.Center;
540
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
544
control.BackgroundImageLayout =
ImageLayout
.Stretch;
545
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
550
control.BackgroundImageLayout =
ImageLayout
.Center;
551
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
TextBoxTests.cs (1)
36
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
ToolStripContainerTests.cs (2)
103
_toolStripContainer.BackgroundImageLayout =
ImageLayout
.Center;
108
_toolStripContainer.BackgroundImageLayout =
ImageLayout
.Stretch;
TrackBarTests.cs (11)
31
Assert.Equal(
ImageLayout
.Tile, control.BackgroundImageLayout);
496
[EnumData<
ImageLayout
>]
497
public void TrackBar_BackgroundImageLayout_Set_GetReturnsExpected(
ImageLayout
value)
528
control.BackgroundImageLayout =
ImageLayout
.Center;
529
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
533
control.BackgroundImageLayout =
ImageLayout
.Center;
534
Assert.Equal(
ImageLayout
.Center, control.BackgroundImageLayout);
538
control.BackgroundImageLayout =
ImageLayout
.Stretch;
539
Assert.Equal(
ImageLayout
.Stretch, control.BackgroundImageLayout);
544
control.BackgroundImageLayout =
ImageLayout
.Center;
545
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);