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