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