3407 references to Rectangle
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (2)
194new Rectangle(1, 2, 3, 4), 195new Rectangle(int.MinValue, int.MaxValue, 0, 0),
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
169new Rectangle(0, 0, imageWidth, imageHeight),
PresentationUI (5)
MS\Internal\Documents\SignatureSummaryDialog.cs (5)
656Rectangle iconRect = new Rectangle( 666Rectangle statusRect = new Rectangle( 674Rectangle intentRect = new Rectangle( 701Rectangle signByRect = new Rectangle( 709Rectangle localeRect = new Rectangle(
System.ComponentModel.TypeConverter (2)
System\Drawing\RectangleConverter.cs (2)
53return new Rectangle(values[0], values[1], values[2], values[3]); 113return new Rectangle((int)x, (int)y, (int)width, (int)height);
System.Drawing.Common.Tests (494)
mono\System.Drawing.Imaging\BmpCodecTests.cs (1)
242BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
109BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing.Imaging\IconCodecTests.cs (5)
132BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 328BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 546BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 750BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 1525BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
112BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 227BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
145BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 297BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 470BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
119BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
mono\System.Drawing\BitmapTests.cs (13)
63Rectangle rect = new(0, 0, bmp.Width, bmp.Height); 73Rectangle rect = new(0, 0, bmp.Width, bmp.Height); 90Rectangle r = new(4, 4, 4, 4); 110Rectangle r = new(4, 4, 4, 4); 216BitmapData bd = bmp.LockBits(new Rectangle(0, 0, 2, 1), ImageLockMode.ReadOnly, format); 319Rectangle rect = new(0, 0, 50, 50); 411data = test.LockBits(new Rectangle(0, 0, test.Width, test.Height), ImageLockMode.ReadOnly, test.PixelFormat); 504BitmapData bd = bmp.LockBits(new Rectangle(0, 0, width, height), mode, fmt); 680data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); 709data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); 733data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 753data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); 798BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, PixelFormat.Format1bppIndexed);
mono\System.Drawing\GraphicsTests.cs (67)
152g.Clip = new Region(new Rectangle(50, 40, 210, 220)); 179g.ExcludeClip(new Rectangle(40, 60, 100, 20)); 206g.IntersectClip(new Rectangle(290, 40, 60, 80)); 223g.IntersectClip(new Rectangle(290, 40, 60, 80)); 243g.SetClip(new Region(new Rectangle(50, 40, 210, 220)), CombineMode.Replace); 267g.SetClip(new Rectangle(50, 40, 210, 220)); 292g.Clip = new Region(new Rectangle(0, 0, 100, 100)); 305g.Clip = new Region(new Rectangle(1, 2, 20, 25)); 361Graphics.Clip = new Region(new Rectangle(0, 0, width, height)); 456g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 466g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 479RectangleF clip = new Rectangle(0, 0, 8, 8); 497g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 513g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 528g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 544g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 563g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 599g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 622g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 643g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 837g.DrawRectangle(pen, new Rectangle(15, 0, -10, 5)); 874g.FillRectangle(brush, new Rectangle(15, 0, -10, 5)); 955g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 988g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1003GraphicsContainer gc = g.BeginContainer(new Rectangle(10, 20, 30, 40), new Rectangle(10, 20, 300, 400), GraphicsUnit.Millimeter); 1022g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1103g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1193Rectangle rect = new(5, 5, 10, 10); 1214Rectangle rect = new(5, 5, 10, 10); 1378Rectangle rect = new(5, 5, 10, 10); 2337Assert.Throws<ArgumentNullException>(() => g.DrawIcon(null, new Rectangle(0, 0, 32, 32))); 2345g.DrawIcon(SystemIcons.Application, new Rectangle(0, 0, 40, 20)); 2348g.DrawIcon(SystemIcons.Asterisk, new Rectangle(0, 0, 0, 0)); 2350g.DrawIcon(SystemIcons.Error, new Rectangle(20, 40, 0, 0)); 2352g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(10, 20, -1, 0)); 2353g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(20, 10, 0, -1)); 2378Assert.Throws<ArgumentNullException>(() => g.DrawIconUnstretched(null, new Rectangle(0, 0, 40, 20))); 2386g.DrawIconUnstretched(SystemIcons.Information, new Rectangle(0, 0, 40, 20)); 2389g.DrawIconUnstretched(SystemIcons.Question, new Rectangle(0, 0, 0, 0)); 2391g.DrawIconUnstretched(SystemIcons.Warning, new Rectangle(20, 40, 0, 0)); 2393g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(10, 20, -1, 0)); 2394g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(20, 10, 0, -1)); 2472Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new Rectangle(0, 0, 0, 0))); 2482g.DrawImage(bmp, new Rectangle(0, 0, 0, 0)); 2484g.DrawImage(bmp, new Rectangle(20, 40, 0, 0)); 2486g.DrawImage(bmp, new Rectangle(10, 20, -1, 0)); 2487g.DrawImage(bmp, new Rectangle(20, 10, 0, -1)); 2598Rectangle r = new(0, 0, 40, 40); 2624Rectangle r = new(1, 2, 3, 4); 2633Rectangle r = new(1, 2, 3, 4); 2682Rectangle r = new(1, 2, 3, 4); 2691Rectangle r = new(1, 2, 3, 4); 2742Rectangle r = new(1, 2, 3, 4); 2753Rectangle r = new(1, 2, 3, 4); 2781Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, new Rectangle(0, 0, -1, -1))); 2789g.DrawImageUnscaled(bmp, new Rectangle(0, 0, -1, -1)); 2829Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaledAndClipped(null, new Rectangle(0, 0, 0, 0))); 2839g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 0, 0)); 2841g.DrawImageUnscaledAndClipped(bmp, new Rectangle(20, 40, 0, 0)); 2843g.DrawImageUnscaledAndClipped(bmp, new Rectangle(10, 20, -1, 0)); 2844g.DrawImageUnscaledAndClipped(bmp, new Rectangle(20, 10, 0, -1)); 2846g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 10, 20)); 2847g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 40, 10)); 2848g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 80, 20)); 2875Rectangle baserect = new(0, 0, 19, 19); 2917Rectangle baserect = new(0, 0, 19, 19);
System\Drawing\BitmapTests.cs (68)
359yield return new object[] { new Bitmap(3, 3, PixelFormat.Format32bppArgb), new Rectangle(0, 0, 3, 3), PixelFormat.Format32bppArgb }; 360yield return new object[] { new Bitmap(3, 3, PixelFormat.Format32bppArgb), new Rectangle(0, 0, 3, 3), PixelFormat.Format24bppRgb }; 361yield return new object[] { new Bitmap(3, 3, PixelFormat.Format1bppIndexed), new Rectangle(1, 1, 1, 1), PixelFormat.Format64bppArgb }; 362yield return new object[] { new Bitmap(3, 3, PixelFormat.Format64bppPArgb), new Rectangle(1, 1, 1, 1), PixelFormat.Format16bppRgb565 }; 426AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, width, height), bitmap.PixelFormat)); 440Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(x, y, width, height), bitmap.PixelFormat)); 456Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), format)); 464Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 485AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 1014yield return new object[] { bitmap(), new Rectangle(0, 0, 2, 2), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, 8, 1 }; 1015yield return new object[] { bitmap(), new Rectangle(0, 0, 2, 2), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb, 8, 3 }; 1016yield return new object[] { bitmap(), new Rectangle(0, 0, 2, 2), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb, 8, 2 }; 1018yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb, 400, 1 }; 1019yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb, 400, 3 }; 1020yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format32bppRgb, 400, 2 }; 1022yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, 300, 65537 }; 1023yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb, 300, 65539 }; 1024yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format24bppRgb, 300, 65538 }; 1026yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, 300, 1 }; 1027yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb, 300, 3 }; 1028yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format24bppRgb, 300, 2 }; 1030yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb, 400, 65537 }; 1031yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb, 400, 65539 }; 1032yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format32bppRgb, 400, 65538 }; 1034yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, 300, 65537 }; 1036yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed, 100, 1 }; 1037yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format8bppIndexed, 100, 3 }; 1038yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed, 100, 2 }; 1040yield return new object[] { new Bitmap(184, 184, PixelFormat.Format1bppIndexed), new Rectangle(0, 0, 184, 184), ImageLockMode.ReadOnly, PixelFormat.Format1bppIndexed, 24, 1 }; 1041yield return new object[] { new Bitmap(184, 184, PixelFormat.Format1bppIndexed), new Rectangle(0, 0, 184, 184), ImageLockMode.ReadWrite, PixelFormat.Format1bppIndexed, 24, 3 }; 1042yield return new object[] { new Bitmap(184, 184, PixelFormat.Format1bppIndexed), new Rectangle(0, 0, 184, 184), ImageLockMode.WriteOnly, PixelFormat.Format1bppIndexed, 24, 2 }; 1044yield return new object[] { bitmap(), new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, 8, 1 }; 1045yield return new object[] { bitmap(), new Rectangle(1, 1, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb, 8, 3 }; 1046yield return new object[] { bitmap(), new Rectangle(1, 1, 1, 1), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb, 8, 2 }; 1048yield return new object[] { bitmap(), new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly - 1, PixelFormat.Format32bppArgb, 8, 0 }; 1050yield return new object[] { bitmap(), new Rectangle(0, 0, 2, 2), ImageLockMode.WriteOnly, PixelFormat.Format16bppGrayScale, 4, 65538 }; 1052yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed, 100, 65537 }; 1053yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format8bppIndexed, 100, 65539 }; 1054yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed, 100, 65538 }; 1056yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb, 300, 65539 }; 1057yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.WriteOnly, PixelFormat.Format24bppRgb, 300, 65538 }; 1113AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1116AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat, bitmapData)); 1134AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format)); 1137AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format, bitmapData)); 1146AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale)); 1147AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale, new BitmapData())); 1149AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale)); 1150AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale, new BitmapData())); 1152BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.WriteOnly, PixelFormat.Format16bppGrayScale); 1163AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat)); 1166AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat, bitmapData)); 1175AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb)); 1178AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, bitmapData)); 1186bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat); 1188Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1189Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat, new BitmapData())); 1191Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1192Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat, new BitmapData())); 1202BitmapData data = bitmap.LockBits(new Rectangle(offset, offset, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat); 1213BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat); 1225BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat); 1249BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat); 1348BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, 2, 1), ImageLockMode.ReadOnly, format); 1474BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); 1503data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); 1527BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); 1546data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
System\Drawing\BufferedGraphicsContextTests.cs (8)
35using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width - 1, context.MaximumBuffer.Height - 1)); 47using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1)); 84using (BufferedGraphics bufferedGraphics = context.Allocate(hdc, new Rectangle(0, 0, context.MaximumBuffer.Width - 1, context.MaximumBuffer.Height - 1))) 106using (BufferedGraphics bufferedGraphics = context.Allocate(hdc, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1))) 123AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(-1, new Rectangle(0, 0, 10, 10))); 139Assert.Throws<ArgumentNullException>("hdc", () => context.Allocate(null, new Rectangle(0, 0, 10, 10))); 150Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1); 165Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1);
System\Drawing\BufferedGraphicsTests.cs (9)
14BufferedGraphics graphics = context.Allocate(targetGraphics, new Rectangle(0, 0, 1, 1)); 29BufferedGraphics graphics = context.Allocate(targetGraphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1)); 47graphics.FillRectangle(brush, new Rectangle(0, 0, 3, 3)); 49using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, 3, 3)); 67graphics.FillRectangle(brush, new Rectangle(0, 0, 3, 3)); 72using BufferedGraphics bufferedGraphics = context.Allocate(hdc, new Rectangle(0, 0, 3, 3)); 92originalGraphics.FillRectangle(brush, new Rectangle(0, 0, 3, 3)); 94using BufferedGraphics graphics = context.Allocate(originalGraphics, new Rectangle(0, 0, 3, 3)); 111using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, 1, 1));
System\Drawing\Drawing2D\CustomLineCapTests.cs (1)
22strokePath.AddRectangle(new Rectangle(0, 0, 10, 10));
System\Drawing\Drawing2D\GraphicsPathTests.cs (30)
147gp.AddRectangle(new Rectangle(1, 1, 2, 2)); 160gp.AddRectangle(new Rectangle(1, 1, 2, 2)); 180gp.AddRectangle(new Rectangle(1, 1, 2, 2)); 346gpi.AddArc(new Rectangle(1, 1, 2, 2), Pi4, Pi4); 705gpi.AddRectangle(new Rectangle(1, 1, 2, 2)); 718gpi.AddRectangle(new Rectangle(1, 1, 1, 1)); 724gpi.AddRectangle(new Rectangle((int)endI.X, (int)endI.Y, 1, 1)); 748gpi.AddRectangle(new Rectangle(1, 2, width, height)); 815gpi.AddEllipse(new Rectangle(1, 1, 2, 2)); 854gpi.AddPie(new Rectangle(1, 1, 2, 2), Pi4, Pi4); 881AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(new Rectangle(1, 1, height, width), Pi4, Pi4)); 978inner.AddRectangle(new Rectangle(1, 1, 2, 2)); 1007gpi.AddString("mono", FontFamily.GenericMonospace, 0, 10, new Rectangle(10, 10, 10, 10), StringFormat.GenericDefault); 1023gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Rectangle(10, 10, 10, 10), StringFormat.GenericDefault); 1071gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new Rectangle(10, 10, 10, 10), StringFormat.GenericDefault)); 1089gp.AddRectangle(new Rectangle(1, 1, 2, 2)); 1140Rectangle rectangle = new(10, 10, 100, 100); 1272gp.AddRectangle(new Rectangle(0, 0, 100, 100)); 1662gp.AddRectangle(new Rectangle(1, 1, 2, 2)); 1714yield return new object[] { new Rectangle(1, 1, 2, 2), 0f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1715yield return new object[] { new Rectangle(1, 1, 2, 2), 0.5f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1716yield return new object[] { new Rectangle(1, 1, 2, 2), 1.0f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1717yield return new object[] { new Rectangle(1, 1, 2, 2), 1.1f, new RectangleF(0.45f, 0.45f, 3.10f, 3.10f) }; 1931gp.AddRectangle(new Rectangle(1, 2, 3, 4)); 1970gp.AddRectangle(new Rectangle(200, 201, 60, 61)); 2006gp.AddRectangle(new Rectangle(200, 201, 60, 61)); 2277gp.AddRectangle(new Rectangle(10, 10, 20, 20)); 2304gp.AddRectangle(new Rectangle(10, 10, 20, 20)); 2325gp.AddEllipse(new Rectangle(10, 10, 20, 20)); 2355path.AddRoundedRectangle(new Rectangle(10, 10, 20, 20), new(5, 5));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (82)
75yield return new object[] { new Rectangle(0, 0, 1, 2), Color.Empty, Color.Red, LinearGradientMode.BackwardDiagonal }; 76yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, LinearGradientMode.ForwardDiagonal }; 77yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, LinearGradientMode.Horizontal }; 78yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Plum, LinearGradientMode.Vertical }; 117yield return new object[] { new Rectangle(0, 0, 1, 2), Color.Empty, Color.Red, 90 }; 118yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 180 }; 119yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, 0 }; 120yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red, 360 }; 121yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Plum, 90 }; 204AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 206AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 208AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 215AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 217AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 219AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 228Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); 235using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 249LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 258using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 280using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 299using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 311using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 318using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 325using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 332using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 339using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 346LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 358using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { GammaCorrection = gammaCorrection }; 365LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 375using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 390using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 411using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 418using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 427using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 436using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 446using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 459LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 470LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 491using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 510using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) 535using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { LinearColors = colors }; 542using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 551using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 558LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 568LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 578using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { Transform = transform }; 585using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 592LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 606using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { WrapMode = wrapMode }; 615using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 622using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 629LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 639using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 649LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 658using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 674using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 695using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 703using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 717using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 726LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 739using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 756using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 769using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 776LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 789using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 806using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 819using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 826LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 840using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 857using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 870using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 877LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 891using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 902using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 914using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 921LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 934using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 0, true); 948using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 0, true); 962using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 974using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 981LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 991LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true);
System\Drawing\Drawing2D\MatrixTests.cs (6)
97yield return new object[] { new Rectangle(1, 4, 8, 16), new Point[] { new(32, 64), new(128, 256), new(512, 1024) }, new float[] { 12, 24, 30, 60, -100, -200 }, false, false }; 98yield return new object[] { new Rectangle(0, 0, 2, 4), new Point[] { new(8, 16), new(32, 64), new(128, 256) }, new float[] { 12, 24, 30, 60, 8, 16 }, false, false }; 99yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(0, 0), new(0, 0) }, new float[] { 0, 0, 0, 0, 0, 0 }, false, false }; 100yield return new object[] { new Rectangle(0, 0, 1, 1), new Point[] { new(0, 0), new(1, 0), new(0, 1) }, new float[] { 1, 0, 0, 1, 0, 0 }, true, true }; 147Assert.Throws<OutOfMemoryException>(() => new Matrix(new Rectangle(1, 1, 0, 1), new Point[3])); 154Assert.Throws<OutOfMemoryException>(() => new Matrix(new Rectangle(1, 1, 1, 0), new Point[3]));
System\Drawing\Graphics_DrawBezierTests.cs (1)
110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90));
System\Drawing\Graphics_GetContextTests.Core.cs (5)
29using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 62using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 81using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 100using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 121graphics.SetClip(new Rectangle(1, 2, 9, 10));
System\Drawing\Graphics_GetContextTests.cs (5)
33using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 65using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 83using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 101using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 122using Region initialClip = new(new Rectangle(1, 2, 9, 10));
System\Drawing\GraphicsTests.cs (39)
320graphics.FillRectangle(transparentBlackBrush, new Rectangle(0, 0, 2, 2)); 321graphics.FillRectangle(transparentWhiteBrush, new Rectangle(1, 1, 2, 2)); 410graphics.FillRectangle(transparentBlackBrush, new Rectangle(0, 0, 2, 2)); 411graphics.FillRectangle(transparentWhiteBrush, new Rectangle(1, 1, 2, 2)); 866graphics.FillRectangle(brush, new Rectangle(0, 0, 3, 3)); 1076graphics.FillRectangle(brush, new Rectangle(0, 0, 3, 2)); 1228LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); 1559graphics.FillRectangle(brush, new Rectangle(0, 0, 10, 10)); 1562Rectangle drawnRect = new(destinationX, destinationY, width, height); 1960AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new Rectangle(0, 0, 1, 1), 0, 90)); 1974AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 1986AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 1998AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 2013Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2032AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2043AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new Rectangle(0, 0, 1, 1))); 2056AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2070Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2088AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2169AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new Rectangle(0, 0, 1, 1))); 2183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2198Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2217AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2228AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new Rectangle(0, 0, 1, 1), 0, 90)); 2242AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2254AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 2266AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 2281Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2300AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2661AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new Rectangle(0, 0, 1, 1), 0, 90)); 2674AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2685AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 0, 1), 0, 90)); 2696AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 0), 0, 90)); 2710Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2728AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2741graphics.FillRectangle(brush, new Rectangle(0, 0, 2, 2)); 2834Rectangle rect = new(10, 10, 50, 50); 2974graphics.DrawRoundedRectangle(Pens.Red, new(0, 0, 10, 10), new(2, 2)); 2992graphics.FillRoundedRectangle(Brushes.Green, new(0, 0, 10, 10), new(2, 2));
System\Drawing\Imaging\ImageAttributesTests.cs (3)
32private readonly Rectangle _rectangle = new(0, 0, 64, 64); 136graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, null); 137graphicsBigBitmap.DrawImage(bitmapSmall, new Rectangle(100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, imageAttr);
System\Drawing\Imaging\MetafileTests.cs (5)
34private readonly Rectangle _rectangle = new(0, 0, 64, 64); 968Assert.Equal(new Rectangle(0, 0, 1, 1), metafile.GetBounds(ref graphicsUnit)); 975Assert.Equal(new Rectangle(0, 0, 0, 0), metafileHeader.Bounds); 984Assert.Equal(new Rectangle(-30, -40, 3096, 4127), metafile.GetBounds(ref graphicsUnit)); 992Assert.Equal(new Rectangle(-30, -40, 3096, 4127), header.Bounds);
System\Drawing\Printing\PrintDocumentTests.cs (2)
238Assert.Equal(new Rectangle(0, 0, 827, 1169), pageSettings.Bounds); 242Assert.Equal(new Rectangle(0, 0, 850, 1100), pageSettings.Bounds);
System\Drawing\Printing\PrinterUnitConvertTests.cs (2)
99var converted = PrinterUnitConvert.Convert(new Rectangle(100, 1000, 100, 1000), fromUnit, toUnit); 100Assert.Equal(new Rectangle(expectedLeftValue, expectedRightValue, expectedLeftValue, expectedRightValue), converted);
System\Drawing\RegionTests.cs (131)
56Rectangle rectangle = new(x, y, width, height); 83yield return new object[] { new Region(new Rectangle(0, 0, 0, 0)) }; 84yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 104graphicsPath.AddRectangle(new Rectangle(1, 2, 3, 4)); 113using Region region = new(new Rectangle(1, 2, 3, 4)); 167graphicsPath.AddRectangle(new Rectangle(1, 2, 3, 4)); 168graphicsPath.AddRectangle(new Rectangle(4, 5, 6, 7)); 194path1.AddRectangle(new Rectangle(-4194304, -4194304, 8388608, 8388608)); 198path2.AddRectangle(new Rectangle(-4194304, -4194304, 8388608, 8388608)); 203path3.AddRectangle(new Rectangle(-4194304, -4194304, 8388608, 8388608)); 204path3.AddRectangle(new Rectangle(1, 2, 3, 4)); 355using Region region = new(new Rectangle(20, 20, 20, 20)); 356using Region other = new(new Rectangle(20, 80, 20, 10)); 358other.Union(new Rectangle(60, 60, 30, 10)); 373region.Intersect(new Rectangle(5, 5, -10, -10)); 374region.Complement(new Rectangle(-5, -5, 12, 12)); 388using Region region = new(new Rectangle(1, 2, 3, 4)); 430region.Complement(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height)); 475Rectangle rect1 = new(20, 30, 60, 80); 476Rectangle rect2 = new(50, 40, 60, 80); 538yield return new object[] { new Region(), new Region(new Rectangle(1, 2, 3, 4)), false }; 541yield return new object[] { Empty(), new Region(new Rectangle(0, 0, 0, 0)), true }; 542yield return new object[] { Empty(), new Region(new Rectangle(1, 2, 3, 3)), false }; 544yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 3, 4)), true }; 545yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new RectangleF(1, 2, 3, 4)), true }; 546yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(2, 2, 3, 4)), false }; 547yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 3, 3, 4)), false }; 548yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 4, 4)), false }; 549yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 3, 5)), false }; 552graphics1.AddRectangle(new Rectangle(1, 2, 3, 4)); 555graphics2.AddRectangle(new Rectangle(1, 2, 3, 4)); 558graphics3.AddRectangle(new Rectangle(2, 2, 3, 4)); 561graphics4.AddRectangle(new Rectangle(1, 3, 3, 4)); 564graphics5.AddRectangle(new Rectangle(1, 2, 4, 4)); 567graphics6.AddRectangle(new Rectangle(1, 2, 3, 5)); 626new Region(new Rectangle(500, 30, 60, 80)), 633new Region(new Rectangle(500, 30, 60, 80)), 655new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 661new Region(new Rectangle(10, 10, 100, 100)), 674new Region(new Rectangle(70, 10, 100, 100)), 687new Region(new Rectangle(40, 100, 100, 100)), 700new Region(new Rectangle(40, 10, 100, 100)), 713new Region(new Rectangle(30, 30, 80, 80)), 730new Region(new Rectangle(50, 100, 100, 100)), 738new Region(new Rectangle(70, 60, 100, 70)), 746new Region(new Rectangle(70, 60, 100, 70)), 754new Region(new Rectangle(20, 20, 100, 100)), 761new Region(new Rectangle(130, 30, 60, 80)), 802using Region region = new(new Rectangle(1, 2, 3, 4)); 837region.Exclude(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height)); 911using Region region = new(new Rectangle(1, 2, 3, 4)); 936using Region region = new(new Rectangle(1, 2, 3, 4)); 1010using Region region = new(new Rectangle(1, 2, 3, 4)); 1047Rectangle smaller = new(5, 5, -10, -10); 1062new Region(new Rectangle(500, 30, 60, 80)), 1068new Region(new Rectangle(0, 0, 0, 0)), 1075new Region(new Rectangle(500, 30, 60, 80)), 1084new RectangleF[] { new Rectangle(520, 40, 60, 80) } 1134using Region region = new(new Rectangle(1, 2, 3, 4)); 1139Assert.Equal([new Rectangle(1, 2, 3, 4)], region.GetRegionScans(matrix)); 1170region.Intersect(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height)); 1183region.Intersect(new Rectangle(5, 5, -10, -10)); 1304infiniteExclude.Exclude(new Rectangle(387, 292, 189, 133)); 1305infiniteExclude.Exclude(new Rectangle(387, 66, 189, 133)); 1307yield return new object[] { infiniteExclude, new Rectangle(66, 292, 189, 133), true }; 1310yield return new object[] { new Region(new Rectangle(0, 0, 10, 10)), new Rectangle(0, 0, 0, 1), false }; 1311yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Rectangle(500, 30, 60, 80), true }; 1312yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Rectangle(520, 40, 60, 80), true }; 1314yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 1), true }; 1315yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 2), true }; 1316yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 10, 10), true }; 1317yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 1, 1), true }; 1318yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(2, 2, 1, 1), false }; 1319yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(0, 0, 1, 1), false }; 1320yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(3, 3, 1, 1), false }; 1356infiniteExclude.Exclude(new Rectangle(387, 292, 189, 133)); 1357infiniteExclude.Exclude(new Rectangle(387, 66, 189, 133)); 1362yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 29), false }; 1363yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 30), true }; 1365yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 1), false }; 1366yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 0), false }; 1367yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 0), false }; 1368yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 0), false }; 1369yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 1), true }; 1370yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 1), true }; 1371yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 1), false }; 1372yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 2), false }; 1373yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 2), false }; 1374yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 2), false }; 1424AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4))); 1428AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4), s_graphic)); 1490new Region(new Rectangle(500, 30, 60, 80)), 1497new Region(new Rectangle(500, 30, 60, 80)), 1504new Region(new Rectangle(500, 30, 60, 80)), 1511new Region(new Rectangle(500, 30, 60, 80)), 1525new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 1532new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 1538new Region(new Rectangle(20, 20, 20, 20)), 1554new Region(new Rectangle(20, 180, 40, 50)), 1572new Region(new Rectangle(20, 330, 40, 50)), 1592new Region(new Rectangle(10, 20, 50, 50)), 1609new Region(new Rectangle(10, 10, 100, 100)), 1622new Region(new Rectangle(70, 10, 100, 100)), 1635new Region(new Rectangle(40, 100, 100, 100)), 1647new Region(new Rectangle(40, 10, 100, 100)), 1659new Region(new Rectangle(30, 30, 80, 80)), 1696using Region region = new(new Rectangle(1, 2, 3, 4)); 1701Assert.Equal([new Rectangle(-4194304, -4194304, 8388608, 8388608)], region.GetRegionScans(matrix)); 1733region.Union(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height)); 1853region.Intersect(new Rectangle(-10, -10, 20, 20)); 1865region.Intersect(new Rectangle(-10, -10, 20, 20)); 1903region.Intersect(new Rectangle(-10, -10, 20, 20)); 1926region.Intersect(new Rectangle(-10, -10, 20, 20)); 2011new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 2048using Region region = new(new Rectangle(1, 2, 3, 4)); 2091region.Xor(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height));
System\Drawing\TextureBrushTests.cs (4)
81yield return new object[] { new Bitmap(10, 10), new Rectangle(0, 0, 10, 10) }; 82yield return new object[] { new Bitmap(10, 10), new Rectangle(5, 5, 5, 5) }; 289Rectangle rectangle = new(x, y, width, height); 814targetGraphics.FillRectangle(brush, new Rectangle(0, 0, 4, 4));
System.Drawing.Primitives (6)
System\Drawing\Rectangle.cs (6)
51new Rectangle(left, top, unchecked(right - left), unchecked(bottom - top)); 181return new Rectangle( 196return new Rectangle( 211return new Rectangle( 297return new Rectangle(x1, y1, x2 - x1, y2 - y1); 320return new Rectangle(x1, y1, x2 - x1, y2 - y1);
System.Private.Windows.Core (1)
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (1)
175value = new Rectangle(
System.Windows.Forms (267)
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (1)
45return new Rectangle(pxLeft, pyTop, pcxWidth, pcyHeight);
System\Windows\Forms\ActiveX\AxHost.cs (4)
1225SetObjectRects(new Rectangle(x, y, width, height)); 1231SetObjectRects(new Rectangle(x, y, width, height)); 3259Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3266Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.Height);
System\Windows\Forms\Control.cs (8)
1010get => new(_x, _y, _width, _height); 1164public Rectangle ClientRectangle => new Rectangle(0, 0, _clientWidth, _clientHeight); 1650=> new(0, 0, _clientWidth, _clientHeight); 5196Rectangle newBounds = new(suggestedX, suggestedY, 0, 0) 5206return new Rectangle(suggestedX, suggestedY, proposedWidth, proposedHeight); 5339return new Rectangle(sx, sy, sw, sh); 8227Rectangle shift = new(-Left, -Top, parent.Width, parent.Height); 8230Rectangle newClipRect = new(
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
611return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (5)
332Rectangle left = new(bounds.X, bounds.Y, size, bounds.Height); 333Rectangle right = new(bounds.X + bounds.Width - size, bounds.Y, size, bounds.Height); 334Rectangle top = new(bounds.X + size, bounds.Y, bounds.Width - size * 2, size); 335Rectangle bottom = new(bounds.X + size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size); 380Rectangle bounds = new(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (2)
280Rectangle textAdjusted = new( 358layout.CheckBounds = new Rectangle(Client.X, Client.Y, checkSizeFull, checkSizeFull);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
307RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (2)
152Rectangle vCross = new( 160Rectangle hCross = new(
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
303return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
277return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (7)
36_innerBorder = new Rectangle(_outerBorder.X + 1, _outerBorder.Y + 1, _outerBorder.Width - dropDownButtonWidth - 2, _outerBorder.Height - 2); 37_innerInnerBorder = new Rectangle(_innerBorder.X + 1, _innerBorder.Y + 1, _innerBorder.Width - 2, _innerBorder.Height - 2); 38_dropDownRect = new Rectangle(_innerBorder.Right + 1, _innerBorder.Y, dropDownButtonWidth, _innerBorder.Height + 1); 95new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 101new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height)); 143new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 149new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
4070Invalidate(new Rectangle(_layout.Inside.X, _layout.Inside.Y, RowHeadersWidth, ColumnHeadersHeight));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (22)
2979r = new Rectangle( 2989r = new Rectangle( 3004Rectangle r = new( 3025Rectangle r = new( 5638Rectangle rectInsertionBar = new(0, _layout.ColumnHeaders.Top, InsertionBarWidth, _layout.ColumnHeaders.Height); 8308? new Rectangle(cx - displayWidth, data.Y, displayWidth, data.Height) 8309: new Rectangle(cx, data.Y, displayWidth, data.Height); 9094Rectangle rowRect = new(data.X, cy, data.Width, displayHeight); 10021Invalidate(new Rectangle(data.X, top, data.Width, bottom - top)); 10307_layout.ResizeBoxRect = new Rectangle( 10324_horizScrollBar.Bounds = new Rectangle( 10365_vertScrollBar.Bounds = new Rectangle( 17449right = new Rectangle(oldClientRectangle.X + oldClientRectangle.Width - borderWidth, 17453bottom = new Rectangle(oldClientRectangle.X, 17471right = new Rectangle(newClientRectangle.X + newClientRectangle.Width - borderWidth, 17481bottom = new Rectangle(newClientRectangle.X, 17491right = new Rectangle(oldGridFocusRectangle.X + oldGridFocusRectangle.Width - 1, 17497bottom = new Rectangle(oldGridFocusRectangle.X, 19293Rectangle edge = new(0, 0, bounds.Width, borderWidth); 19323g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19333g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19832Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y),
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
27private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 415Rectangle rectCell = new(0, 0, DATAGRIDVIEWBUTTONCELL_themeMargin, DATAGRIDVIEWBUTTONCELL_themeMargin);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1019Rectangle bmpRect = new(DataGridView!.RightToLeftInternal ? 3598rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Right, bounds.Height); 3607rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Left, bounds.Height); 3859return new Rectangle(xEditingControl, yEditingControl, wEditingControl, hEditingControl);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
1237new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height), 1241resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1271resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1278Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1336Rectangle fullSize = new(checkBoxX - 1, checkBoxY - 1, checkBoxSize.Width + 3, checkBoxSize.Height + 3); 1350RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height); 1384Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.Height - 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
838DataGridViewColumnHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), state); 840g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.Width - backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (2)
32Rectangle cornerClip = new(bounds.Left, bounds.Bottom - 2, 2, 2); 35cornerClip = new Rectangle(bounds.Right - 2, bounds.Bottom - 2, 2, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1983g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.X, valBounds.Y, valBounds.Width - 1, valBounds.Height - 1)); 2013dropRect = new Rectangle( 2021dropRect = new Rectangle( 2030dropRect = new Rectangle(
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
19private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 385Rectangle rectCell = new(0, 0, ThemeMargin, ThemeMargin); 396s_rectThemeMargins = new Rectangle(0, 0, 2, 3); 410s_rectThemeMargins = new Rectangle(2, 1, 0, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
584imageBounds = new Rectangle(bounds.X, bounds.Y, imgWidth, imgHeight); 591imageBounds = new Rectangle( 600imageBounds = new Rectangle(
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
700DataGridViewRowHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Height, backgroundBounds.Width), state); 706new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), 1029Rectangle bmpRect = new(width, height, s_iconsWidth, s_iconsHeight);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (3)
163return new Rectangle( 434new Rectangle(0, 0, Width, Height), 445new Rectangle(0, 0, Width, Height),
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
632targetData = result.LockBits(new Rectangle(0, 0, _imageSize.Width, _imageSize.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
System\Windows\Forms\Controls\Labels\Label.cs (2)
902return new Rectangle(xLoc, yLoc, pointImageSize.Width, pointImageSize.Height); 1435Rectangle rectInScreen = RectangleToScreen(new Rectangle(0, 0, Width, Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
423return new Rectangle(xLoc, yLoc, width, height); 580Rectangle visualRectangle = new(
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (4)
540Rectangle box = new( 569Rectangle textBounds = new( 626Rectangle stringBounds = new( 719Rectangle emptyRectangle = new(
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2327Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
106resultBounds = new Rectangle(originalBounds.X, originalBounds.Y, textSize.Width, textSize.Height);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6899Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
42: new Rectangle(
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (1)
20: new Rectangle(
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
63return new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
2620Rectangle toolStripBounds = new(0, 1, toolStripWidth, toolStripHeight); 2898pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, 0, width, psheetLoc.Y));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
62return new Rectangle(4, 4, size.Width - 8, size.Height - 8);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
84Rectangle dropDownButtonRect = new(0, 0, Width, Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (6)
660_outlineRect = new Rectangle( 1577Rectangle textRect = new(stringX, rect.Y + 1, maxSpace, rect.Height - 1); 1719compatibleDC.HDC.FillRectangle(new Rectangle(0, 0, rectangle.Width, rectangle.Height), brush); 1720explorerTreeRenderer.DrawBackground(compatibleDC, new Rectangle(0, 0, rectangle.Width, rectangle.Height), hwnd); 1845Rectangle rectPaint = new( 1905Rectangle textRectangle = new(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
122Invalidate(new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
536_uiItemRects[i] = new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
619return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 1881Rectangle rect = new(0, 0, 0, 0); 2121Invalidate(new Rectangle(left, 0, Size.Width - left, Size.Height)); 2213ControlPaint.DrawFocusRectangle(g, new Rectangle(_offset2Units, _offset2Units, Size.Width - doubleOffset, Size.Height - doubleOffset)); 2359Rectangle clearRect = new(1, 1, Size.Width - 2, Size.Height - 2); 3350Rectangle clearRect = new(1, yPosition, Size.Width - 2, Size.Height - yPosition - 1); 3583Rectangle rectInvalidate = new(_lastClientRect.Width - 1, 0, newRect.Width - _lastClientRect.Width + 1, _lastClientRect.Height); 3589Rectangle rectInvalidate = new(0, _lastClientRect.Height - 1, _lastClientRect.Width, newRect.Height - _lastClientRect.Height + 1); 4325Rectangle rectTarget = new(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
364Rectangle bottomGrip = new(0, Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize); 365Rectangle topGrip = new(0, 0, s_resizeGripSize, s_resizeGripSize); 510Rectangle lRect = new(0, _resizeUp ? 0 : Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
616Rectangle rectWithBorder = new(
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2899Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
826Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
216return new Rectangle(0, statusStripSize.Height - gripHeight, GripWidth, gripHeight); 220return new Rectangle(statusStripSize.Width - GripWidth, statusStripSize.Height - gripHeight, GripWidth, gripHeight);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1525Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
66_dropDownArrowRect = new Rectangle(_dropDownArrowPadding.Left, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height); 71_dropDownArrowRect = new Rectangle(options.Client.Right, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height); 82_dropDownArrowRect = new Rectangle(0, options.Client.Bottom + _dropDownArrowPadding.Top, _ownerItem.Bounds.Width - 1, s_dropDownArrowSize.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
364_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 369_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 380_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.Height), ContentAlignment.MiddleCenter); 399_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.Height), ContentAlignment.MiddleCenter); 416_imageMarginBounds = new Rectangle(0, 0, checkAndImageMarginWidth, Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (7)
74new Rectangle(startX, startY, 2, 2) : 75new Rectangle(startY, startX, 2, 2); 100e.Graphics.DrawRectangle(SystemPens.ButtonHighlight, new Rectangle(0, 0, e.Item.Width - 1, e.Item.Height - 1)); 314g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, 1, 1, 1)); 319g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 326g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 333g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3255=> SetBounds(new Rectangle(x, y, width, height));
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (4)
79g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, 1, 1, 1)); 84g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 91g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 98g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1));
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (18)
168overflowArrowRect = new Rectangle(0, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 172overflowArrowRect = new Rectangle(item.Width - _overflowButtonWidth, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 322ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width, item.Height), item.BorderStyle, (Border3DSide)item.BorderSides); 457edging = new Rectangle(bounds.Width - 1, 3, 1, bounds.Height - 3); 461edging = new Rectangle(3, bounds.Height - 1, bounds.Width - 3, bounds.Height - 1); 505new Rectangle(startX, startY, 2, 2) : 506new Rectangle(startY, startX, 2, 2); 862Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 865Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 866Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 873topRightHorizontalPixels = new Rectangle(topRight.X - 1, topRight.Y, 1, 1); 874topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 2); 878topRightHorizontalPixels = new Rectangle(topRight.X - 2, topRight.Y, 2, 1); 879topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 3); 1046? new Rectangle( 1050: new Rectangle(e.ImageRectangle.Left - 2, 1, e.ImageRectangle.Width + 4, e.Item.Height - 2); 1321Rectangle fillRect = new(overflowBoundsFill.X - 1, 0, 1, 1); 1396Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1040new Rectangle(0, 0, size.Width, size.Height),
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
125return new Rectangle(itemBounds.X + 1, 0, itemBounds.Width - 2, 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
316_splitterBounds = new Rectangle(splitButtonButtonBounds.Right, splitButtonButtonBounds.Top, _splitterWidth, splitButtonButtonBounds.Height); 322_splitterBounds = new Rectangle(dropDownButtonBounds.Right, dropDownButtonBounds.Top, _splitterWidth, dropDownButtonBounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (4)
143insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 146insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 149insertionRect = new Rectangle(item.Bounds.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 152insertionRect = new Rectangle(item.Bounds.Left, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (8)
301alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 302: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 314alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 315: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 438alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 439: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 446alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 447: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height));
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (2)
499ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width - 1, item.Height - 1), item.BorderStyle, (Border3DSide)item.BorderSides); 776vsRenderer.DrawBackground(e.Graphics, new Rectangle(0, 0, e.ToolStrip.Width - 1, e.ToolStrip.Height - 1));
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (4)
120t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None); 130t_visualStyleRenderer.DrawEdge(g, new Rectangle((int)Math.Round(x), bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None); 150t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, bounds.Y, bounds.Width, LineWidth), Edges.Top, edgeStyle, EdgeEffects.None); 160t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, (int)Math.Round(y), bounds.Width, LineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
3151Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (5)
531Rectangle clipLeft = new(bounds.Left, bounds.Top, border, bounds.Height); 532Rectangle clipTop = new(bounds.Left, bounds.Top, bounds.Width, border); 533Rectangle clipRight = new(bounds.Right - border, bounds.Top, border, bounds.Height); 534Rectangle clipBottom = new(bounds.Left, bounds.Bottom - border, bounds.Width, border); 862upDownButtonsBounds = new Rectangle(
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
280new Rectangle(0, 0, _parent._defaultButtonsWidth, half_height), 300new Rectangle(0, half_height, _parent._defaultButtonsWidth, half_height), 307new Rectangle(0, 0, _parent._defaultButtonsWidth, half_height), 313new Rectangle(0, half_height, _parent._defaultButtonsWidth, half_height),
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (3)
105return new(clientLeft, clientTop, clientWidth, clientHeight); 310return new(offsetLeft, offsetTop, offsetWidth, offsetHeight); 409return new(scrollLeft, scrollTop, scrollWidth, scrollHeight);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
201RECT posRect = new Rectangle(0, 0, width, height); 791Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height);
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
109internal static RECT GetClipRect() => new Rectangle(0, 0, 32000, 32000);
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
235Rectangle pageHostBounds = new(2 * BUTTON_PAD + selectorWidth, 2 * BUTTON_PAD + STRIP_HEIGHT, 238grayStrip.Bounds = new Rectangle(pageHostBounds.X, BUTTON_PAD, 243Rectangle pageBounds = new(0, 0, pageHostBounds.Width, pageHostBounds.Height); 258_selector.Bounds = new Rectangle(BUTTON_PAD, BUTTON_PAD,
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (1)
241return new Rectangle(x, y, size.Width, size.Height);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
316using Region windowRegion = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (3)
40_region = new Region(new Rectangle(0, 0, 0, 0)); 66_region.Union(new Rectangle(x, y, 1, 1)); 72_region.Intersect(new Rectangle(0, 0, size.Width, size.Height));
System\Windows\Forms\Form.cs (5)
151private Rectangle _restoredWindowBounds = new(-1, -1, -1, -1); 158private Rectangle _restoreBounds = new(-1, -1, -1, -1); 4212form.SetBounds(new Rectangle(Left, Top, adjustedSize.Width, adjustedSize.Height), BoundsSpecified.None); 4411new Rectangle(size.Width - SizeGripSize, size.Height - SizeGripSize, SizeGripSize, SizeGripSize)); 5015_restoredWindowBounds = new Rectangle(-1, -1, -1, -1);
System\Windows\Forms\Layout\CommonProperties.cs (1)
336Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
698return new Rectangle(topLeftPoint.X, topLeftPoint.Y, clientRectangle.right, clientRectangle.bottom);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
2285return new Rectangle(containerRectangle.X + splitterRectangle.X, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
System\Windows\Forms\Layout\DefaultLayout.cs (7)
234return new Rectangle(anchorInfo.Left, anchorInfo.Top, width, height); 336return new Rectangle(left, top, right - left, bottom - top); 401Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 414Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height); 427Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 440Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 458Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height);
System\Windows\Forms\Layout\FlowLayout.cs (2)
76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 86Rectangle rowBounds = new(displayRect.X,
System\Windows\Forms\Layout\LayoutUtils.cs (1)
16public static readonly Rectangle s_maxRectangle = new(0, 0, int.MaxValue, int.MaxValue);
System\Windows\Forms\Layout\TableLayout.cs (3)
1250Rectangle cellBounds = new((int)(startX + cellBorderWidth / 2.0f), (int)(top + cellBorderWidth / 2.0f), width - cellBorderWidth, height - cellBorderWidth); 1475Rectangle cellsOccupied1 = new(layoutInfo1.ColumnStart, layoutInfo1.RowStart, layoutInfo1.ColumnSpan, layoutInfo1.RowSpan); 1480Rectangle cellsOccupied2 = new(layoutInfo2.ColumnStart, layoutInfo2.RowStart, layoutInfo2.ColumnSpan, layoutInfo2.RowSpan);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (3)
380Rectangle outsideCellBounds = new( 386Rectangle insideCellBounds = new( 432Rectangle tableBounds = new(
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
462private Rectangle FocusRectangle => new(0, 0, Width - 1, Height - 1); 464private Rectangle ResizeBoxRectangle => new(_vScrollBar.Left, _hScrollBar.Top, _vScrollBar.Width, _hScrollBar.Height); 672pageRenderArea[imageIndex - StartPage] = new Rectangle(x, y, imagePixels.Width, imagePixels.Height);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System\Windows\Forms\Rendering\ControlPaint.cs (11)
268new Rectangle(0, 0, width, height), 1030RECT rc = new Rectangle(x, y, width, height); 1151bounds = new Rectangle(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1238DrawFlatCheckBox(graphics, new Rectangle(x, y, width, height), state); 1348Rectangle offsetRectangle = new( 1469new Rectangle(x, y, width, height), 1495Rectangle fillRect = new( 1594=> DrawImageDisabled(graphics, image, new Rectangle(x, y, image.Width, image.Height), unscaledImage: false); 1641new Rectangle(0, 0, imageSize.Width, imageSize.Height), 2378bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2398bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
560_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, HorizontalScroll.Maximum, _displayRect.Height); 565_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, _displayRect.Width, VerticalScroll.Maximum);
System\Windows\Forms\SystemInformation.cs (1)
462return new Rectangle(0, 0, size.Width, size.Height);
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1555new Rectangle(centeredX, toolRectangle.Top - height, width, height), 1556new Rectangle(toolRectangle.Right, centeredY, width, height), 1557new Rectangle(centeredX, toolRectangle.Bottom, width, height), 1558new Rectangle(toolRectangle.Left - width, centeredY, width, height),
System.Windows.Forms.Design (95)
System\ComponentModel\Design\ByteViewer.cs (2)
144new Rectangle( 154new Rectangle(
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
598Rectangle baseVar = new(e.Bounds.X + offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3);
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (2)
196Rectangle bounds = new(0, 0, Width, Height); 201_dropDownRectangle = new Rectangle(bounds.Right - PushButtonWidth - 1, 4, PushButtonWidth, bounds.Height - 8);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
488e.Graphics.DrawRectangle(borderPen, new Rectangle(0, 0, Width - 1, Height - 1)); 508g.SetClip(new Rectangle(0, yPos, lineWidth, lineHeight));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
294Rectangle rect = new(1, 1, width - 2, height - 2); 297swatchGraphics.DrawRectangle(SystemPens.ControlDark, new Rectangle(0, 0, width - 1, height - 1));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (5)
70ButtonRenderer.DrawButton(g, new Rectangle(-1, -1, Width + 2, Height + 2), "…", Font, Focused, buttonState); 93ComboBoxRenderer.DrawDropDownButton(g, new Rectangle(0, 0, Width, Height), state); 116new Rectangle(-1, -1, Width + 2, Height + 2), 137new Rectangle( 155ControlPaint.DrawFocusRectangle(g, new Rectangle(2, 2, Width - 5, Height - 5));
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorUI.cs (2)
275_editor.PaintValue(value, graphics, new Rectangle(die.Bounds.X + 2, die.Bounds.Y + 2, 22, die.Bounds.Height - 4)); 276graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(die.Bounds.X + 2, die.Bounds.Y + 2, 22 - 1, die.Bounds.Height - 4 - 1));
System\Drawing\Design\CursorEditor.CursorUI.cs (3)
69e.Graphics.FillRectangle(SystemBrushes.Control, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4)); 70e.Graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32 - 1, e.Bounds.Height - 4 - 1)); 72cursor.DrawStretched(e.Graphics, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4));
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
26_glyphBounds = new Rectangle(containerBounds.X + glyphOffset, containerBounds.Y - (int)(glyphSize * .5), glyphSize, glyphSize);
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
161_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.Width, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (4)
372invalidRect = new Rectangle(diffs[k].X1, diffs[k].Y1, diffs[k].X2 - diffs[k].X1, diffs[k].Y2 - diffs[k].Y1); 393invalidRect = new Rectangle(line.X1, line.Y1, line.X2 - line.X1, line.Y2 - line.Y1); 535Rectangle clipBounds = new(0, 0, rootControl.ClientRectangle.Width, rootControl.ClientRectangle.Height); 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
744Rectangle newRect = new(newPosition.X, newPosition.Y, 765_dragAssistanceManager.OnMouseMove(new Rectangle(-100, -100, 0, 0)); /*just an invalid rect - so we won't snap*/// ); 1033Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.X, 1040new Rectangle(0, 0, _dragComponents[i].dragImage.Width, _dragComponents[i].dragImage.Height),
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (8)
33bounds = new Rectangle(controlBounds.X + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 38bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 43bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Bottom - DesignerUtils.s_handleOverlap, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 48bounds = new Rectangle(controlBounds.X + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Bottom - DesignerUtils.s_handleOverlap, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 58bounds = new Rectangle(controlBounds.X + (controlBounds.Width / 2) - (DesignerUtils.s_handleSize / 2), controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 70bounds = new Rectangle(controlBounds.X + (controlBounds.Width / 2) - (DesignerUtils.s_handleSize / 2), controlBounds.Bottom - DesignerUtils.s_handleOverlap, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 82bounds = new Rectangle(controlBounds.X + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + (controlBounds.Height / 2) - (DesignerUtils.s_handleSize / 2), DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 94bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + (controlBounds.Height / 2) - (DesignerUtils.s_handleSize / 2), DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
System\Windows\Forms\Design\Behavior\LockedHandleGlyph.cs (1)
26bounds = new Rectangle((controlBounds.X + DesignerUtils.s_lockHandleOverlap) - DesignerUtils.s_lockHandleWidth,
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (1)
34bounds = new Rectangle(
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
603_dragManager.OnMouseMove(new Rectangle(-100, -100, 0, 0)); 618Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.X, _resizeComponents[0].resizeBounds.Y,
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (2)
316Rectangle newRectangle = new(mouseLoc.X - DesignerUtils.s_boxImageSize / 2, mouseLoc.Y - DesignerUtils.s_boxImageSize / 2, 351Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (8)
111_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 120_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 129_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 138_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth); 160_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 169_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 178_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 187_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth);
System\Windows\Forms\Design\ComponentTray.cs (2)
2290e.Graphics.DrawImage(_toolboxBitmap, new Rectangle(x, y, _cxIcon, _cyIcon)); 2302e.Graphics.DrawImage(_toolboxBitmap, new Rectangle(rc.X, y, _cxIcon, _cyIcon));
System\Windows\Forms\Design\ControlCommandSet.cs (1)
717Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y,
System\Windows\Forms\Design\ControlDesigner.cs (1)
2251Rectangle imageRect = new(marginX, marginY, glyphSize.Width, glyphSize.Height);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
905Rectangle bounds = new(0, selectedIndex * _selectedColumns.ItemHeight, _selectedColumns.Width, _selectedColumns.ItemHeight); 1006Rectangle focusRectangle = new(bounds.X, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2); 1021e.Graphics.FillRectangle(backBrush, new Rectangle(focusRectangle.Right + 1, e.Bounds.Y, e.Bounds.Width - focusRectangle.Right - 1, e.Bounds.Height)); 1025e.Graphics.FillRectangle(backBrush, new Rectangle(bounds.X, e.Bounds.Y, e.Bounds.Width - bounds.X, e.Bounds.Height));
System\Windows\Forms\Design\DesignerUtils.cs (5)
462SelectionBorderGlyphType.Top => new Rectangle(originalBounds.Left - borderSize, originalBounds.Top - borderSize, originalBounds.Width + 2 * borderSize, borderSize), 463SelectionBorderGlyphType.Bottom => new Rectangle(originalBounds.Left - borderSize, originalBounds.Bottom, originalBounds.Width + 2 * borderSize, borderSize), 464SelectionBorderGlyphType.Left => new Rectangle(originalBounds.Left - borderSize, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 465SelectionBorderGlyphType.Right => new Rectangle(originalBounds.Right, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 671BitmapData data = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
152return new Rectangle( 458Rectangle invalidRect = new(
System\Windows\Forms\Design\InheritanceUI.cs (1)
37s_inheritanceGlyphRect = new Rectangle(0, 0, size.Width, size.Height);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0);
System\Windows\Forms\Design\ParentControlDesigner.cs (7)
1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1783Rectangle frameRect = new(offset.X - _adornerWindowToScreenOffset.X, 1825_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1938Rectangle r = new(_mouseDragBase.X - _adornerWindowToScreenOffset.X, 1975Rectangle frameRect = new(_mouseDragOffset.X - _adornerWindowToScreenOffset.X, 2016_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2032Rectangle paintRect = new(Math.Min(displayRect.X, clientRect.X),
System\Windows\Forms\Design\SelectionUIHandler.cs (1)
346Rectangle tempNewBounds = GetUpdatedRect(oldBounds, new Rectangle(targetX, targetY, targetWidth, targetHeight), true);
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (3)
36Rectangle rect = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT); 59Rectangle glyphBounds = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT); 72Rectangle rect = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT);
System\Windows\Forms\Design\SelectionUIService.cs (1)
830Region region = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (2)
134Rectangle rect = new(_outerRect.X, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT); 514Rectangle rcOuterNew = new(_innerRect.X - GRABHANDLE_WIDTH, _innerRect.Y - GRABHANDLE_HEIGHT, _innerRect.Width + 2 * GRABHANDLE_WIDTH, _innerRect.Height + 2 * GRABHANDLE_HEIGHT);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
1109Rectangle gBounds = new(startLoc - halfSize, checkBounds.Top, DesignerUtils.s_resizeGlyphSize, checkBounds.Height); 1136Rectangle gBounds = new(checkBounds.Left, startLoc - halfSize, checkBounds.Width, DesignerUtils.s_resizeGlyphSize);
System\Windows\Forms\Design\TabOrder.cs (1)
197_region = new Region(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\ToolStripTemplateNode.cs (9)
1873Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1887Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1898_hotRegion = new Rectangle(bounds.Left + 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1902_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1919_hotRegion = new Rectangle(bounds.Left + 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1923_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1988Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 2007Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 2032Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System.Windows.Forms.Design.Tests (6)
System\ComponentModel\Design\ByteViewerTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, control.Width, control.Height), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, control.Width, control.Height), control.ClientRectangle); 65Assert.Equal(new Rectangle(0, 0, control.Width, control.Height), control.DisplayRectangle);
System\Drawing\Design\ImageEditorTests.cs (2)
170PaintValueEventArgs e = new(null, otherImage, graphics, new Rectangle(1, 2, 3, 4)); 187PaintValueEventArgs e = new(null, value, graphics, new Rectangle(1, 2, 3, 4));
System\Windows\Forms\Design\ImageIndexEditorTests.cs (1)
37PaintValueEventArgs paintValueEventArgs = new(_context, value, graphics, new Rectangle(0, 0, 10, 10));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Automation\UiaTextRange.cs (2)
398Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 864Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
System.Windows.Forms.Primitives.Tests (15)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (6)
545Rectangle expected = new(10, 33, 96, 19); 657providerMock.Setup(m => m.BoundingRectangle).Returns(new Rectangle(1, 1, 94, 15)); 707providerMock.Setup(m => m.BoundingRectangle).Returns(new Rectangle(5, 1, 118, 153)); 716.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height)); 789providerMock.Setup(m => m.BoundingRectangle).Returns(new Rectangle(5, 1, 118, 153)); 798.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height));
System\Windows\Forms\DeviceContextHdcScopeTests.cs (6)
18Rectangle clipRectangle = new(1, 1, 5, 5); 36Assert.Equal(new Rectangle(-1, -2, 10, 10), (Rectangle)clipRect); 66Assert.Equal(new Rectangle(0, -1, 5, 5), (Rectangle)clipRect); 81Assert.Equal(new Rectangle(0, 0, 10, 10), (Rectangle)clipRect); 101Rectangle clipRectangle = new(1, 1, 5, 5); 169Assert.Equal(new Rectangle(0, -1, 5, 5), (Rectangle)clipRect);
System\Windows\Forms\DeviceContextScopeTests.cs (2)
41using Region region = new(new Rectangle(1, 1, 2, 3)); 52Assert.Equal(new Rectangle(2, 1, 1, 3), (Rectangle)rect);
Windows\Win32\RegionTests.cs (1)
54Rectangle rectangle = new(1, 2, 3, 4);
System.Windows.Forms.Primitives.TestUtilities (2)
Metafiles\RecordTypes\EMRBITBLT.cs (1)
35RECT dest = new Rectangle(xDest, yDest, cxDest, cyDest);
Win32\EditControl.cs (1)
19: base(s_editClass, new Rectangle(0, 0, 100, 50), windowName, style, extendedStyle, isMainWindow, parentWindow, parameters, menuHandle)
System.Windows.Forms.Tests (2502)
CheckedListBoxTests.cs (6)
406yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.None, Color.Red, Color.Blue }; 407yield return new object[] { null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Checked, Color.Red, Color.Blue }; 408yield return new object[] { new Font("Arial", 8.25f), new Rectangle(10, 20, 30, 40), 1, DrawItemState.Default, Color.Red, Color.Blue }; 464DrawItemEventArgs e = new(graphics, null, new Rectangle(1, 2, 3, 4), -1, DrawItemState.Default); 475DrawItemEventArgs e = new(graphics, null, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Default); 488DrawItemEventArgs e = new(graphics, null, new Rectangle(1, 2, 3, 4), 2, DrawItemState.Default);
NumericUpDownTests.cs (5)
36Assert.Equal(new Rectangle(0, 0, 120, 23), upDown.Bounds); 44new Rectangle(1, 1, 98, 17), 86new Rectangle(0, 0, 99, 18), 89new Rectangle(1, 1, 97, 16), 115Assert.Equal(new Rectangle(0, 0, 120, 23), upDown.Bounds);
System\Drawing\Design\PaintValueEventArgsTests.cs (1)
15yield return new object[] { new Mock<ITypeDescriptorContext>(MockBehavior.Strict).Object, new(), new Rectangle(1, 2, 3, 4) };
System\Drawing\Design\UITypeEditorTests.cs (1)
121yield return new object[] { new(), graphics, new Rectangle(1, 2, 3, 4) };
System\Windows\Forms\AbstractButtonBaseTests.cs (1)
80overChangeRectangle.Should().Be(new Rectangle(-1, -1, 1, 1));
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (11)
316.Returns(new Rectangle(1, 2, 3, 4)); 337.Returns(new Rectangle(1, 2, 3, 4)); 383.Returns(new Rectangle(1, 2, 3, 4)); 387.Returns(new Rectangle(1, 2, 3, 4)); 965.Returns(new Rectangle(1, 2, 3, 4)); 987.Returns(new Rectangle(1, 2, 3, 4)); 1035.Returns(new Rectangle(1, 2, 3, 4)); 1039.Returns(new Rectangle(1, 2, 3, 4)); 1069.Returns(new Rectangle(1, 2, 3, 4)) 1088.Returns(new Rectangle(1, 2, 3, 4)) 1093.Returns(new Rectangle(1, 2, 3, 4))
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
438yield return new object[] { comboBoxStyle, index, new Rectangle(x, y, width, height) };
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
99Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (2)
665Rectangle expectedBounds = new(subItem.Bounds.X, subItem.Bounds.Y, expectedWidth, expectedHeight) 933Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
25Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarCellAccessibleObjectTests.cs (6)
35yield return new object[] { 0, 0, new Rectangle(13, 81, 31, 15) }; 36yield return new object[] { 0, 1, new Rectangle(44, 81, 31, 15) }; 37yield return new object[] { 0, 2, new Rectangle(75, 81, 31, 15) }; 38yield return new object[] { 1, 0, new Rectangle(13, 96, 31, 15) }; 39yield return new object[] { 1, 1, new Rectangle(44, 96, 31, 15) }; 40yield return new object[] { 1, 2, new Rectangle(75, 96, 31, 15) };
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (1)
140Rectangle expected = new(0, 0, 10, 10);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
24Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]);
System\Windows\Forms\AccessibleObjects\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObjectTests.cs (1)
115Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]);
System\Windows\Forms\AxHostTests.cs (6)
42Assert.Equal(new Rectangle(0, 0, 75, 23), control.Bounds); 50Assert.Equal(new Rectangle(0, 0, 75, 23), control.ClientRectangle); 67Assert.Equal(new Rectangle(0, 0, 75, 23), control.DisplayRectangle); 136Assert.Equal(new Rectangle(0, 0, 75, 23), control.Bounds); 144Assert.Equal(new Rectangle(0, 0, 75, 23), control.ClientRectangle); 161Assert.Equal(new Rectangle(0, 0, 75, 23), control.DisplayRectangle);
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (3)
125new Rectangle(-1, int.MinValue, 10, 13), 468Rectangle value = new(1, 1, 2, 2); 904public Rectangle Rectangle = new(1, 2, 3, 4);
System\Windows\Forms\ButtonBaseTests.cs (3)
34Assert.Equal(new Rectangle(0, 0, 75, 23), control.Bounds); 42Assert.Equal(new Rectangle(0, 0, 75, 23), control.ClientRectangle); 58Assert.Equal(new Rectangle(0, 0, 75, 23), control.DisplayRectangle);
System\Windows\Forms\ButtonRenderingTests.cs (1)
242new Rectangle(0, 0, button.Width - 1, button.Height - 1),
System\Windows\Forms\ButtonTests.cs (3)
36Assert.Equal(new Rectangle(0, 0, 75, 23), control.Bounds); 44Assert.Equal(new Rectangle(0, 0, 75, 23), control.ClientRectangle); 61Assert.Equal(new Rectangle(0, 0, 75, 23), control.DisplayRectangle);
System\Windows\Forms\CheckBoxRendererTests.cs (3)
77bounds: new Rectangle(41, 5, 20, 12), 114bounds: new Rectangle(3, 0, 20, 12), 148bounds: new Rectangle(3, 0, 20, 12),
System\Windows\Forms\CheckBoxTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, 104, 24), control.Bounds); 46Assert.Equal(new Rectangle(0, 0, 104, 24), control.ClientRectangle); 62Assert.Equal(new Rectangle(0, 0, 104, 24), control.DisplayRectangle);
System\Windows\Forms\ClipboardTests.cs (1)
817Rectangle expected = new(1, 1, 2, 2);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (3)
562yield return new object[] { comboBoxStyle, new Size(0, 0), new Rectangle(0, 0, 80, 16) }; 564yield return new object[] { comboBoxStyle, new Size(50, 50), new Rectangle(0, 0, width, 15) }; 566yield return new object[] { comboBoxStyle, new Size(250, 100), new Rectangle(0, 0, width, 15) };
System\Windows\Forms\ComboBoxTests.cs (8)
39Assert.Equal(new Rectangle(0, 0, 121, control.PreferredHeight), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 117, control.PreferredHeight - 4), control.ClientRectangle); 66Assert.Equal(new Rectangle(0, 0, 117, control.PreferredHeight - 4), control.DisplayRectangle); 390comboBox.InvokeOnPaint(new PaintEventArgs(graphics, new Rectangle(0, 0, 100, 100))); 1828Bounds = new Rectangle(1, 2, 30, 40) 1910Bounds = new Rectangle(1, 2, 30, 40) 2012Bounds = new Rectangle(1, 2, 30, 40) 2116Bounds = new Rectangle(1, 2, 30, 40)
System\Windows\Forms\ContentsResizedEventArgsTests.cs (2)
14yield return new object[] { new Rectangle(1, 2, 3, 4) }; 15yield return new object[] { new Rectangle(-1, -2, -3, -4) };
System\Windows\Forms\ControlPaintTests.cs (256)
543yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Empty, style }; 544yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, style }; 545yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.ControlLight, style }; 546yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.Control, style }; 547yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.ControlDark, style }; 548yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, style }; 549yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, style }; 550yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, style }; 551yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, style }; 552yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, style }; 553yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, style }; 576ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4), Color.Red, style); 579ControlPaint.DrawBorder(graphics, new Rectangle(1, 2, 3, 4), Color.Red, style); 586yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 588yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 590yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 591yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 0, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 592yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 0, style, Color.Blue, 0, style, Color.Yellow, 4, style }; 593yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 0, style, Color.Blue, 3, style, Color.Yellow, 0, style }; 594yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 0, style, Color.Blue, 0, style, Color.Yellow, 0, style }; 595yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 2, style, Color.Blue, 0, style, Color.Yellow, 4, style }; 596yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 2, style, Color.Blue, 0, style, Color.Yellow, 0, style }; 597yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 0, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 0, style }; 599yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 0, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 600yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 0, style, Color.Blue, 0, style, Color.Yellow, 4, style }; 601yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 0, style, Color.Blue, 3, style, Color.Yellow, 0, style }; 602yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 0, style, Color.Blue, 0, style, Color.Yellow, 0, style }; 604yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 0, style, Color.Yellow, 4, style }; 605yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 0, style, Color.Yellow, 0, style }; 607yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 0, style }; 632yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 633yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, -1, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 634yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, -1, style, Color.Blue, -1, style, Color.Yellow, 4, style }; 635yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, -1, style, Color.Blue, 3, style, Color.Yellow, -1, style }; 636yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, -1, style, Color.Blue, -1, style, Color.Yellow, -1, style }; 637yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, 2, style, Color.Blue, -1, style, Color.Yellow, 4, style }; 638yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, 2, style, Color.Blue, -1, style, Color.Yellow, -1, style }; 639yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, -1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, -1, style }; 641yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, -1, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 642yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, -1, style, Color.Blue, -1, style, Color.Yellow, 4, style }; 643yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, -1, style, Color.Blue, 3, style, Color.Yellow, -1, style }; 644yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, -1, style, Color.Blue, -1, style, Color.Yellow, -1, style }; 646yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, -1, style, Color.Yellow, 4, style }; 647yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, -1, style, Color.Yellow, -1, style }; 649yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, -1, style }; 675Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4), Color.Red, style)); 683Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Red, 1, style, Color.Red, 1, style, Color.Red, 1, style)); 689yield return new object[] { new Rectangle(1, 2, -3, -4) }; 690yield return new object[] { new Rectangle(0, 0, 3, 4) }; 691yield return new object[] { new Rectangle(1, 2, 3, 4) }; 692yield return new object[] { new Rectangle(1, 2, 4, 3) }; 693yield return new object[] { new Rectangle(1, 2, 3, 3) }; 713yield return new object[] { new Rectangle(1, 2, -3, -4), style }; 714yield return new object[] { new Rectangle(0, 0, 3, 4), style }; 715yield return new object[] { new Rectangle(1, 2, 3, 4), style }; 716yield return new object[] { new Rectangle(1, 2, 4, 3), style }; 717yield return new object[] { new Rectangle(1, 2, 3, 3), style }; 740yield return new object[] { new Rectangle(1, 2, -3, -4), style, side }; 741yield return new object[] { new Rectangle(0, 0, 3, 4), style, side }; 742yield return new object[] { new Rectangle(1, 2, 3, 4), style, side }; 743yield return new object[] { new Rectangle(1, 2, 4, 3), style, side }; 744yield return new object[] { new Rectangle(1, 2, 3, 3), style, side }; 802Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4))); 803Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4), style)); 804Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4), style, Border3DSide.All)); 814yield return new object[] { new Rectangle(0, 0, 3, 4), state }; 815yield return new object[] { new Rectangle(1, 2, 3, 4), state }; 816yield return new object[] { new Rectangle(1, 2, 4, 3), state }; 817yield return new object[] { new Rectangle(1, 2, 3, 3), state }; 850Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawButton(null, new Rectangle(1, 2, 3, 4), state)); 865Assert.Throws<ArgumentException>(() => ControlPaint.DrawButton(graphics, new Rectangle(0, 0, width, height), state)); 876Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawButton(graphics, new Rectangle(0, 0, -3, 4), state)); 887Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawButton(graphics, new Rectangle(0, 0, 3, -4), state)); 897yield return new object[] { new Rectangle(0, 0, 3, 4), button, state }; 898yield return new object[] { new Rectangle(1, 2, 3, 4), button, state }; 899yield return new object[] { new Rectangle(1, 2, 4, 3), button, state }; 900yield return new object[] { new Rectangle(1, 2, 3, 3), button, state }; 934Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCaptionButton(null, new Rectangle(1, 2, 3, 4), CaptionButton.Close, state)); 948Assert.Throws<ArgumentException>(() => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, width, height), CaptionButton.Close, state)); 959Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, -3, 4), CaptionButton.Close, state)); 970Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, 3, -4), CaptionButton.Close, state)); 978yield return new object[] { new Rectangle(0, 0, 3, 4), state }; 979yield return new object[] { new Rectangle(1, 2, 3, 4), state }; 980yield return new object[] { new Rectangle(1, 2, 4, 3), state }; 981yield return new object[] { new Rectangle(1, 2, 3, 3), state }; 1014Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCheckBox(null, new Rectangle(1, 2, 3, 4), state)); 1029Assert.Throws<ArgumentException>(() => ControlPaint.DrawCheckBox(graphics, new Rectangle(0, 0, width, height), state)); 1040Assert.Throws<ArgumentOutOfRangeException>(expectedParamName, () => ControlPaint.DrawCheckBox(graphics, new Rectangle(0, 0, -3, 4), state)); 1051Assert.Throws<ArgumentOutOfRangeException>(expectedParamName, () => ControlPaint.DrawCheckBox(graphics, new Rectangle(0, 0, 3, -4), state)); 1059yield return new object[] { new Rectangle(0, 0, 3, 4), state }; 1060yield return new object[] { new Rectangle(1, 2, 3, 4), state }; 1061yield return new object[] { new Rectangle(1, 2, 4, 3), state }; 1062yield return new object[] { new Rectangle(1, 2, 3, 3), state }; 1095Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawComboButton(null, new Rectangle(1, 2, 3, 4), state)); 1109Assert.Throws<ArgumentException>(() => ControlPaint.DrawComboButton(graphics, new Rectangle(0, 0, width, height), state)); 1120Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawComboButton(graphics, new Rectangle(0, 0, -3, 4), state)); 1131Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawComboButton(graphics, new Rectangle(0, 0, 3, -4), state)); 1138yield return new object[] { new Rectangle(1, 2, -3, -4) }; 1139yield return new object[] { new Rectangle(0, 0, 3, 4) }; 1140yield return new object[] { new Rectangle(1, 2, 3, 4) }; 1141yield return new object[] { new Rectangle(1, 2, 4, 3) }; 1142yield return new object[] { new Rectangle(1, 2, 3, 3) }; 1160Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawContainerGrabHandle(null, new Rectangle(1, 2, 3, 4))); 1166yield return new object[] { new Rectangle(1, 2, -3, -4) }; 1167yield return new object[] { new Rectangle(0, 0, 3, 4) }; 1168yield return new object[] { new Rectangle(1, 2, 3, 4) }; 1169yield return new object[] { new Rectangle(1, 2, 4, 3) }; 1170yield return new object[] { new Rectangle(1, 2, 3, 3) }; 1188yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue }; 1189yield return new object[] { new Rectangle(0, 0, 3, 4), Color.Red, Color.Blue }; 1190yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Blue }; 1191yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, Color.Blue }; 1192yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, Color.Blue }; 1193yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, Color.Blue }; 1194yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, Color.Blue }; 1195yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Black }; 1196yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.White }; 1197yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Empty }; 1198yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Transparent }; 1199yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Red }; 1200yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, Color.Blue }; 1201yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, Color.Blue }; 1219Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4))); 1220Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4), Color.Red, Color.Blue)); 1230yield return new object[] { new Rectangle(1, 2, -3, -4), primary, enabled }; 1231yield return new object[] { new Rectangle(0, 0, 3, 4), primary, enabled }; 1232yield return new object[] { new Rectangle(1, 2, 3, 4), primary, enabled }; 1233yield return new object[] { new Rectangle(1, 2, 4, 3), primary, enabled }; 1234yield return new object[] { new Rectangle(1, 2, 3, 3), primary, enabled }; 1258Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrabHandle(null, new Rectangle(1, 2, 3, 4), primary, enabled)); 1264yield return new object[] { new Rectangle(1, 2, -3, -4), new Size(1, 1), Color.Red }; 1265yield return new object[] { new Rectangle(0, 0, 3, 4), new Size(1, 1), Color.Red }; 1266yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red }; 1267yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Black }; 1268yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.White }; 1269yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Empty }; 1270yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Transparent }; 1271yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(10, 20), Color.Red }; 1272yield return new object[] { new Rectangle(1, 2, 4, 3), new Size(10, 20), Color.Red }; 1273yield return new object[] { new Rectangle(1, 2, 3, 3), new Size(10, 20), Color.Red }; 1291Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red)); 1303Assert.Throws<ArgumentOutOfRangeException>("pixelsBetweenDots", () => ControlPaint.DrawGrid(graphics, new Rectangle(0, 0, width, height), new Size(width, height), Color.Red)); 1357yield return new object[] { new Rectangle(1, 2, -3, -4), primary }; 1358yield return new object[] { new Rectangle(0, 0, 3, 4), primary }; 1359yield return new object[] { new Rectangle(1, 2, 3, 4), primary }; 1360yield return new object[] { new Rectangle(1, 2, 4, 3), primary }; 1361yield return new object[] { new Rectangle(1, 2, 3, 3), primary }; 1382Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawLockedFrame(null, new Rectangle(1, 2, 3, 4), primary)); 1389yield return new object[] { new Rectangle(0, 0, 3, 4), glyph }; 1390yield return new object[] { new Rectangle(1, 2, 3, 4), glyph }; 1391yield return new object[] { new Rectangle(1, 2, 4, 3), glyph }; 1392yield return new object[] { new Rectangle(1, 2, 3, 3), glyph }; 1412yield return new object[] { new Rectangle(0, 0, 3, 4), glyph, Color.Red, Color.Blue }; 1413yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Blue }; 1414yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Black, Color.Blue }; 1415yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.White, Color.Blue }; 1416yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Empty, Color.Blue }; 1417yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Transparent, Color.Blue }; 1418yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Black }; 1419yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.White }; 1420yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Empty }; 1421yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Transparent }; 1422yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.Red }; 1423yield return new object[] { new Rectangle(1, 2, 4, 3), glyph, Color.Red, Color.Red }; 1424yield return new object[] { new Rectangle(1, 2, 3, 3), glyph, Color.Red, Color.Red }; 1470Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMenuGlyph(null, new Rectangle(1, 2, 3, 4), glyph)); 1488Assert.Throws<ArgumentException>(() => ControlPaint.DrawMenuGlyph(graphics, new Rectangle(0, 0, width, height), glyph)); 1500Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawMenuGlyph(graphics, new Rectangle(0, 0, -3, 4), glyph)); 1512Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawMenuGlyph(graphics, new Rectangle(0, 0, 3, -4), glyph)); 1520yield return new object[] { new Rectangle(0, 0, 3, 4), state }; 1521yield return new object[] { new Rectangle(1, 2, 3, 4), state }; 1522yield return new object[] { new Rectangle(1, 2, 4, 3), state }; 1523yield return new object[] { new Rectangle(1, 2, 3, 3), state }; 1556Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMixedCheckBox(null, new Rectangle(1, 2, 3, 4), state)); 1570Assert.Throws<ArgumentException>(() => ControlPaint.DrawMixedCheckBox(graphics, new Rectangle(0, 0, width, height), state)); 1581Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawMixedCheckBox(graphics, new Rectangle(0, 0, -3, 4), state)); 1592Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawMixedCheckBox(graphics, new Rectangle(0, 0, 3, -4), state)); 1600yield return new object[] { new Rectangle(0, 0, 3, 4), state }; 1601yield return new object[] { new Rectangle(1, 2, 3, 4), state }; 1602yield return new object[] { new Rectangle(1, 2, 4, 3), state }; 1603yield return new object[] { new Rectangle(1, 2, 3, 3), state }; 1636Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawRadioButton(null, new Rectangle(1, 2, 3, 4), state)); 1650Assert.Throws<ArgumentException>(() => ControlPaint.DrawRadioButton(graphics, new Rectangle(0, 0, width, height), state)); 1661Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawRadioButton(graphics, new Rectangle(0, 0, -3, 4), state)); 1672Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawRadioButton(graphics, new Rectangle(0, 0, 3, -4), state)); 1681yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Empty, style }; 1682yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, style }; 1683yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.ControlLight, style }; 1684yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.Control, style }; 1685yield return new object[] { new Rectangle(1, 2, 3, 4), SystemColors.ControlDark, style }; 1686yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black, style }; 1687yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White, style }; 1688yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent, style }; 1689yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty, style }; 1690yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red, style }; 1691yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red, style }; 1737yield return new object[] { new Rectangle(0, 0, 3, 4), button, state }; 1738yield return new object[] { new Rectangle(1, 2, 3, 4), button, state }; 1739yield return new object[] { new Rectangle(1, 2, 4, 3), button, state }; 1740yield return new object[] { new Rectangle(1, 2, 3, 3), button, state }; 1774Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawScrollButton(null, new Rectangle(1, 2, 3, 4), ScrollButton.Up, state)); 1788Assert.Throws<ArgumentException>(() => ControlPaint.DrawScrollButton(graphics, new Rectangle(0, 0, width, height), ScrollButton.Up, state)); 1799Assert.Throws<ArgumentOutOfRangeException>("width", () => ControlPaint.DrawScrollButton(graphics, new Rectangle(0, 0, -3, 4), ScrollButton.Up, state)); 1810Assert.Throws<ArgumentOutOfRangeException>("height", () => ControlPaint.DrawScrollButton(graphics, new Rectangle(0, 0, 3, -4), ScrollButton.Up, state)); 1819yield return new object[] { active, new Rectangle(1, 2, -3, -4), new Rectangle(1, 2, -3, -4), Color.Red }; 1820yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), Color.Red }; 1821yield return new object[] { active, new Rectangle(1, 2, 3, 4), new Rectangle(0, 1, 4, 5), Color.Red }; 1822yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Red }; 1823yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Black }; 1824yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.White }; 1825yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Transparent }; 1826yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.Empty }; 1847Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSelectionFrame(null, active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), Color.Red)); 1853yield return new object[] { Color.Red, new Rectangle(1, 2, -3, -4) }; 1854yield return new object[] { Color.Red, new Rectangle(0, 0, 3, 4) }; 1855yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1856yield return new object[] { Color.Black, new Rectangle(1, 2, 3, 4) }; 1857yield return new object[] { Color.White, new Rectangle(1, 2, 3, 4) }; 1858yield return new object[] { Color.Empty, new Rectangle(1, 2, 3, 4) }; 1859yield return new object[] { Color.Transparent, new Rectangle(1, 2, 3, 4) }; 1860yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1861yield return new object[] { Color.Red, new Rectangle(1, 2, 3, 4) }; 1862yield return new object[] { Color.Red, new Rectangle(1, 2, 4, 3) }; 1892Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null, Color.Red, new Rectangle(1, 2, 3, 4))); 1948yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default }; 1950yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter }; 1951yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1952yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1953yield return new object[] { s, SystemFonts.MenuFont, Color.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1954yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1955yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter }; 1977Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default)); 1983yield return new object[] { new Rectangle(1, 2, -3, -4) }; 1984yield return new object[] { new Rectangle(0, 0, 3, 4) }; 1985yield return new object[] { new Rectangle(1, 2, 3, 4) }; 1986yield return new object[] { new Rectangle(1, 2, 4, 3) }; 1987yield return new object[] { new Rectangle(1, 2, 3, 3) }; 2005Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawVisualStyleBorder(null, new Rectangle(1, 2, 3, 4))); 2011yield return new object[] { new Rectangle(1, 2, -3, -4), Color.Red }; 2012yield return new object[] { new Rectangle(0, 0, 3, 4), Color.Red }; 2013yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red }; 2014yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Black }; 2015yield return new object[] { new Rectangle(1, 2, 3, 4), Color.White }; 2016yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Empty }; 2017yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Transparent }; 2018yield return new object[] { new Rectangle(1, 2, 4, 3), Color.Red }; 2019yield return new object[] { new Rectangle(1, 2, 3, 3), Color.Red };
System\Windows\Forms\ControlPaintTests.Rendering.cs (10)
21Rectangle bounds = new(10, 10, 10, 10); 28new Rectangle(10, 10, 9, 9), 40Rectangle bounds = new(10, 10, 10, 10); 100Rectangle bounds = new(10, 10, 10, 10); 175Rectangle bounds = new(10, 10, 10, 10); 249Rectangle bounds = new(10, 10, 10, 10); 323Rectangle bounds = new(10, 10, 10, 10); 336new Rectangle(8, 8, 13, 13), 351Rectangle bounds = new(10, 10, 10, 10); 364new Rectangle(8, 8, 13, 13),
System\Windows\Forms\ControlTests.cs (6)
214Assert.Equal(new Rectangle(left, top, width, height), control.Bounds); 221Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 238Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 406Assert.Equal(new Rectangle(left, top, width, height), control.Bounds); 413Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 430Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle);
System\Windows\Forms\ControlTests.Handlers.cs (36)
2183yield return new object[] { testData, new Region(new Rectangle(1, 2, 3, 4)) }; 2335yield return new object[] { testData, new Region(new Rectangle(1, 2, 3, 4)) }; 2737yield return new object[] { new InvalidateEventArgs(new Rectangle(1, 2, 3, 4)) }; 2770yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2771yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2774yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2775yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2778yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2779yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2783yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2784yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2787yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) }; 2788yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) }; 2874yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2875yield return new object[] { true, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2877yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2878yield return new object[] { true, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2880yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2881yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 1 }; 2884yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2885yield return new object[] { false, Color.Empty, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 2887yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 }; 2888yield return new object[] { false, Color.Red, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 }; 3856using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 3891Bounds = new Rectangle(1, 2, 30, 40) 3895Bounds = new Rectangle(1, 2, 30, 40) 3932Bounds = new Rectangle(1, 2, 30, 40) 3936Bounds = new Rectangle(1, 2, 30, 40) 3978using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 3982Bounds = new Rectangle(1, 2, 10, 20), 4001Assert.Equal(new Rectangle(1, 2, 0, 0), e.ClipRectangle); 4028using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4105using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4109Bounds = new Rectangle(1, 2, 30, 40) 4113Bounds = new Rectangle(1, 2, 10, 20), 4132Assert.Equal(new Rectangle(1, 2, 10, 20), e.ClipRectangle);
System\Windows\Forms\ControlTests.Internals.cs (1)
175Rectangle expectedBounds = new(expected, expected, expected, expected);
System\Windows\Forms\ControlTests.Methods.cs (531)
450yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 637yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 859yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 1831yield return new object[] { new Rectangle(0, 0, 1, 1) }; 1832yield return new object[] { new Rectangle(0, 0, 10, 10) }; 1833yield return new object[] { new Rectangle(2, 3, 10, 15) }; 1834yield return new object[] { new Rectangle(2, 3, 15, 10) }; 1835yield return new object[] { new Rectangle(0, 0, 100, 150) }; 1881Assert.Throws<ArgumentNullException>("bitmap", () => control.DrawToBitmap(null, new Rectangle(1, 2, 3, 4))); 1899Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(x, y, width, height))); 1913Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 1927Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 2342Bounds = new Rectangle(1, 2, 30, 40) 2402yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, Rectangle.Empty }; 2403yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2404yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2405yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2406yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2408yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2409yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2410yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2411yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2412yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2414yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 12) }; 2415yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2416yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2417yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2418yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2420yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, -12) }; 2421yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2422yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2423yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2424yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2442yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 4, 4) }; 2445yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Width, new Rectangle(0, 0, 4, 0) }; 2446yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Height, new Rectangle(0, 0, 0, 4) }; 2448yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 4, 4) }; 2449yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2450yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2451yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 4, 4) }; 2452yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2454yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2455yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2456yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2457yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2458yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2460yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 2, 4) }; 2461yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2462yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2463yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 2, 4) }; 2464yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2466yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 6, 4) }; 2467yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2468yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2469yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2470yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2575yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(1, 2, 0, 0) }; 2576yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2577yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2578yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2579yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2581yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2582yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2583yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2584yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2585yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2587yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(1, 2, 6, 12) }; 2588yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2589yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2590yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2591yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2593yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(1, 2, -6, -12) }; 2594yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2595yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2596yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2597yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2664yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 0) }; 2665yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2666yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2667yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2668yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 2670yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2671yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2672yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2673yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2674yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2676yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 12) }; 2677yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2678yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2679yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2680yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 2682yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, -12) }; 2683yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2684yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2685yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2686yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) }; 2714yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 0, 4) }; 2715yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2716yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2717yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 2718yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2720yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2721yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2722yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2723yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2724yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2726yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 4) }; 2727yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2728yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2729yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 2730yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2732yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, 4) }; 2733yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2734yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2735yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 2736yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2764yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 4) }; 2765yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 2766yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 2767yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2768yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2770yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 2771yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 2772yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 2773yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2774yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2776yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 4) }; 2777yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 2778yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 2779yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2780yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 2782yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, 4) }; 2783yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 2784yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 2785yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 2786yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 3200yield return new object[] { opaque, new Rectangle(0, 0, 10, 20) }; 3201yield return new object[] { opaque, new Rectangle(1, 2, 3, 4) }; 3202yield return new object[] { opaque, new Rectangle(5, 10, 5, 10) }; 3203yield return new object[] { opaque, new Rectangle(100, 200, 300, 400) }; 3204yield return new object[] { opaque, new Rectangle(-100, -200, -300, -400) }; 3230yield return new object[] { opaque, Rectangle.Empty, new Rectangle(0, 0, 10, 20) }; 3231yield return new object[] { opaque, new Rectangle(0, 0, 10, 20), new Rectangle(0, 0, 10, 20) }; 3232yield return new object[] { opaque, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4) }; 3233yield return new object[] { opaque, new Rectangle(5, 10, 5, 10), new Rectangle(5, 10, 5, 10) }; 3234yield return new object[] { opaque, new Rectangle(100, 200, 300, 400), new Rectangle(100, 200, 300, 400) }; 3235yield return new object[] { opaque, new Rectangle(-100, -200, -300, -400), new Rectangle(-100, -200, -300, -400) }; 3337yield return new object[] { opaque, new Rectangle(0, 0, 10, 20), invalidateChildren }; 3338yield return new object[] { opaque, new Rectangle(1, 2, 3, 4), invalidateChildren }; 3339yield return new object[] { opaque, new Rectangle(5, 10, 5, 10), invalidateChildren }; 3340yield return new object[] { opaque, new Rectangle(100, 200, 300, 400), invalidateChildren }; 3341yield return new object[] { opaque, new Rectangle(-100, -200, -300, -400), invalidateChildren }; 3370yield return new object[] { opaque, Rectangle.Empty, invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3371yield return new object[] { opaque, new Rectangle(0, 0, 10, 20), invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3372yield return new object[] { opaque, new Rectangle(1, 2, 3, 4), invalidateChildren, new Rectangle(1, 2, 3, 4) }; 3373yield return new object[] { opaque, new Rectangle(5, 10, 5, 10), invalidateChildren, new Rectangle(5, 10, 5, 10) }; 3374yield return new object[] { opaque, new Rectangle(100, 200, 300, 400), invalidateChildren, new Rectangle(100, 200, 300, 400) }; 3375yield return new object[] { opaque, new Rectangle(-100, -200, -300, -400), invalidateChildren, new Rectangle(-100, -200, -300, -400) }; 3476yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)) }; 3477yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)) }; 3478yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)) }; 3479yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)) }; 3480yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)) }; 3507yield return new object[] { opaque, null, new Rectangle(0, 0, 10, 20) }; 3508yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), new Rectangle(0, 0, 10, 20) }; 3509yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), new Rectangle(1, 2, 3, 4) }; 3510yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), new Rectangle(5, 10, 5, 10) }; 3511yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), new Rectangle(100, 200, 300, 400) }; 3512yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), new Rectangle(-100, -200, -300, -400) }; 3513yield return new object[] { opaque, new Region(), new Rectangle(-4194304, -4194304, 8388608, 8388608) }; 3615yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), invalidateChildren }; 3616yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), invalidateChildren }; 3617yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), invalidateChildren }; 3618yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), invalidateChildren }; 3619yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), invalidateChildren }; 3649yield return new object[] { opaque, null, invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3650yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3651yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), invalidateChildren, new Rectangle(1, 2, 3, 4) }; 3652yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), invalidateChildren, new Rectangle(5, 10, 5, 10) }; 3653yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), invalidateChildren, new Rectangle(100, 200, 300, 400) }; 3654yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), invalidateChildren, new Rectangle(-100, -200, -300, -400) }; 3655yield return new object[] { opaque, new Region(), invalidateChildren, new Rectangle(-4194304, -4194304, 8388608, 8388608) }; 4264using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4273using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4320using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4495yield return new object[] { new Rectangle(1, 2, 3, 4) }; 4528yield return new object[] { true, Color.Empty, new Rectangle(100, 200, 300, 400) }; 4529yield return new object[] { true, Color.Empty, new Rectangle(1, 2, 300, 400) }; 4532yield return new object[] { true, Color.Red, new Rectangle(100, 200, 300, 400) }; 4533yield return new object[] { true, Color.Red, new Rectangle(1, 2, 300, 400) }; 4536yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400) }; 4537yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400) }; 4541yield return new object[] { false, Color.Empty, new Rectangle(100, 200, 300, 400) }; 4542yield return new object[] { false, Color.Empty, new Rectangle(1, 2, 300, 400) }; 4545yield return new object[] { false, Color.Red, new Rectangle(100, 200, 300, 400) }; 4546yield return new object[] { false, Color.Red, new Rectangle(1, 2, 300, 400) }; 4632yield return new object[] { true, Color.Empty, new Rectangle(100, 200, 300, 400), 0 }; 4633yield return new object[] { true, Color.Empty, new Rectangle(1, 2, 300, 400), 0 }; 4635yield return new object[] { true, Color.Red, new Rectangle(100, 200, 300, 400), 0 }; 4636yield return new object[] { true, Color.Red, new Rectangle(1, 2, 300, 400), 0 }; 4638yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(100, 200, 300, 400), 0 }; 4639yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new Rectangle(1, 2, 300, 400), 1 }; 4642yield return new object[] { false, Color.Empty, new Rectangle(100, 200, 300, 400), 0 }; 4643yield return new object[] { false, Color.Empty, new Rectangle(1, 2, 300, 400), 0 }; 4645yield return new object[] { false, Color.Red, new Rectangle(100, 200, 300, 400), 0 }; 4646yield return new object[] { false, Color.Red, new Rectangle(1, 2, 300, 400), 0 }; 7384Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 7385Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 7393Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7403Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 7404Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 7412Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7495Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 7496Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 7504Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 7514Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 7515Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 7523Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 7593Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 7594Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 7602Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7612Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 7613Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 7621Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7711Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 7712Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 7720Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7731Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 7732Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 7740Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 7834Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 7835Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 7843Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 7856Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 7857Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 7865Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 7982Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 7983Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 7991Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 8009Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8010Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8018Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 8171Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8172Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8180Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8190Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8191Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8199Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8282Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8283Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8291Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8301Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8302Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8310Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8380Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 8381Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 8389Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8399Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 8400Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 8408Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8568Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8569Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8577Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8588Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8589Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8597Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8691Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8692Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8700Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8713Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8714Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8722Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8839Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8840Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8848Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8866Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 8867Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 8875Assert.Equal(new Rectangle(expectedX, expectedY, expectedWidth, expectedHeight), control.Bounds); 8985Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 8986Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 8994Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9006Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 9007Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 9015Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9127Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9128Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9136Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 9148Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9149Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9157Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 9256Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 9257Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 9265Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9277Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 9278Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 9286Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9393Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 9394Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 9402Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9415Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 9416Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 9424Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 9548Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9549Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9557Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 9572Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9573Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9581Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 9706Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9707Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9715Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 9735Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 9736Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 9744Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 10468Bounds = new Rectangle(1, 2, 3, 4) 10555Bounds = new Rectangle(10, 20, 30, 40) 10559Bounds = new Rectangle(1, 2, 3, 4), 10744Bounds = new Rectangle(1, 2, 3, 4) 10764Assert.Equal(new Rectangle(0, 0, 3, 4), control.ClientRectangle); 10765Assert.Equal(new Rectangle(0, 0, 3, 4), control.DisplayRectangle); 10773Assert.Equal(new Rectangle(1, 2, 3, 4), control.Bounds); 10786Assert.Equal(new Rectangle(0, 0, 3, 4), control.ClientRectangle); 10787Assert.Equal(new Rectangle(0, 0, 3, 4), control.DisplayRectangle); 10795Assert.Equal(new Rectangle(1, 2, 3, 4), control.Bounds); 10811Bounds = new Rectangle(10, 20, 30, 40) 10815Bounds = new Rectangle(1, 2, 3, 4), 10842Assert.Equal(new Rectangle(0, 0, 3, 4), control.ClientRectangle); 10843Assert.Equal(new Rectangle(0, 0, 3, 4), control.DisplayRectangle); 10851Assert.Equal(new Rectangle(1, 2, 3, 4), control.Bounds); 10868Assert.Equal(new Rectangle(0, 0, 3, 4), control.ClientRectangle); 10869Assert.Equal(new Rectangle(0, 0, 3, 4), control.DisplayRectangle); 10877Assert.Equal(new Rectangle(1, 2, 3, 4), control.Bounds); 10954Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 10955Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 10963Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 10973Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 10974Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 10982Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11065Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11066Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11074Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11084Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11085Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11093Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11163Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 11164Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 11172Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11182Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 11183Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 11191Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11272Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11273Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11281Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11292Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11293Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11301Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11395Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11396Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11404Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11417Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11418Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11426Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11524Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11525Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11533Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11551Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 11552Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 11560Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11649Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11650Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11658Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11668Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11669Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11677Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11758Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11759Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11767Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11778Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11779Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11787Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11893Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11894Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11902Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 11915Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 11916Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 11924Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 12022Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 12023Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 12031Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 12049Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.ClientRectangle); 12050Assert.Equal(new Rectangle(0, 0, clientWidth, clientHeight), control.DisplayRectangle); 12058Assert.Equal(new Rectangle(x, y, width, height), control.Bounds);
System\Windows\Forms\ControlTests.Properties.cs (229)
2477control.Bounds = new Rectangle(x, y, width, height); 2479Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 2480Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2488Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2496control.Bounds = new Rectangle(x, y, width, height); 2498Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 2499Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2507Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2566control.Bounds = new Rectangle(x, y, width, height); 2568Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2569Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 2577Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 2585control.Bounds = new Rectangle(x, y, width, height); 2587Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2588Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 2596Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 2651control.Bounds = new Rectangle(x, y, width, height); 2653Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 2654Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 2662Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2670control.Bounds = new Rectangle(x, y, width, height); 2672Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 2673Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 2681Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2756control.Bounds = new Rectangle(x, y, width, height); 2758Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 2759Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2767Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2776control.Bounds = new Rectangle(x, y, width, height); 2778Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 2779Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2787Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 2856control.Bounds = new Rectangle(x, y, width, height); 2858Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2859Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 2867Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 2878control.Bounds = new Rectangle(x, y, width, height); 2880Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2881Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 2889Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 2981control.Bounds = new Rectangle(x, y, width, height); 2983Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2984Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 2992Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 3008control.Bounds = new Rectangle(x, y, width, height); 3010Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 3011Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 3019Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 5729Assert.Equal(new Rectangle(0, 0, 0, value), control.ClientRectangle); 5730Assert.Equal(new Rectangle(0, 0, 0, value), control.DisplayRectangle); 5738Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 5748Assert.Equal(new Rectangle(0, 0, 0, value), control.ClientRectangle); 5749Assert.Equal(new Rectangle(0, 0, 0, value), control.DisplayRectangle); 5757Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 5839Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 5840Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 5848Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 5858Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 5859Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 5867Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 5927Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 5928Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 5936Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 5946Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 5947Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 5955Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 6035Assert.Equal(new Rectangle(0, 0, 0, value), control.ClientRectangle); 6036Assert.Equal(new Rectangle(0, 0, 0, value), control.DisplayRectangle); 6044Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 6055Assert.Equal(new Rectangle(0, 0, 0, value), control.ClientRectangle); 6056Assert.Equal(new Rectangle(0, 0, 0, value), control.DisplayRectangle); 6064Assert.Equal(new Rectangle(0, 0, 0, value), control.Bounds); 6147Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.ClientRectangle); 6148Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.DisplayRectangle); 6156Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.Bounds); 6169Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.ClientRectangle); 6170Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.DisplayRectangle); 6178Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.Bounds); 6284Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.ClientRectangle); 6285Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.DisplayRectangle); 6293Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.Bounds); 6311Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.ClientRectangle); 6312Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.DisplayRectangle); 6320Assert.Equal(new Rectangle(0, 0, 0, expectedHeight), control.Bounds); 6692Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6693Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6702Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6714Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6715Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6724Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6784Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6785Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6793Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6806Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6807Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6815Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6882Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6883Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6892Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6907Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6908Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 6917Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 6993Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 6994Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7002Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 7022Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7023Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7031Assert.Equal(new Rectangle(value, 0, 0, 0), control.Bounds); 7173Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7174Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7183Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7195Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7196Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7205Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7263Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7264Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7273Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7286Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7287Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7296Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7365Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7366Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7375Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7390Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7391Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7400Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7476Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7477Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7486Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7506Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 7507Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 7516Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 9871yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 11113Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 11114Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 11122Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11132Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 11133Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 11141Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11224Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11225Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11233Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 11243Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11244Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11252Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 11319Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 11320Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 11328Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11338Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 11339Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 11347Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11434Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 11435Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 11443Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11454Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 11455Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 11463Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 11551Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11552Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11560Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 11573Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11574Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11582Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 11693Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11694Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11702Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 11720Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 11721Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 11729Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 12128Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12129Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12137Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12149Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12150Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12158Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12218Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12219Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12227Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12240Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12241Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12249Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12316Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12317Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12325Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12340Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12341Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12349Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12425Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12426Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12434Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 12454Assert.Equal(new Rectangle(0, 0, 0, 0), control.ClientRectangle); 12455Assert.Equal(new Rectangle(0, 0, 0, 0), control.DisplayRectangle); 12463Assert.Equal(new Rectangle(0, value, 0, 0), control.Bounds); 13148Assert.Equal(new Rectangle(0, 0, value, 0), control.ClientRectangle); 13149Assert.Equal(new Rectangle(0, 0, value, 0), control.DisplayRectangle); 13157Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13167Assert.Equal(new Rectangle(0, 0, value, 0), control.ClientRectangle); 13168Assert.Equal(new Rectangle(0, 0, value, 0), control.DisplayRectangle); 13176Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13258Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 13259Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 13267Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 13277Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 13278Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 13286Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 13346Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 13347Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 13355Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13365Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 13366Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 13374Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13454Assert.Equal(new Rectangle(0, 0, value, 0), control.ClientRectangle); 13455Assert.Equal(new Rectangle(0, 0, value, 0), control.DisplayRectangle); 13463Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13474Assert.Equal(new Rectangle(0, 0, value, 0), control.ClientRectangle); 13475Assert.Equal(new Rectangle(0, 0, value, 0), control.DisplayRectangle); 13483Assert.Equal(new Rectangle(0, 0, value, 0), control.Bounds); 13566Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.ClientRectangle); 13567Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.DisplayRectangle); 13575Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.Bounds); 13588Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.ClientRectangle); 13589Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.DisplayRectangle); 13597Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.Bounds); 13703Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.ClientRectangle); 13704Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.DisplayRectangle); 13712Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.Bounds); 13730Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.ClientRectangle); 13731Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.DisplayRectangle); 13739Assert.Equal(new Rectangle(0, 0, expectedWidth, 0), control.Bounds);
System\Windows\Forms\CursorTests.cs (9)
201Cursor.Clip = new Rectangle(1, 2, 3, 4); 210Cursor.Clip = new Rectangle(0, 0, 0, 0); 365yield return new object[] { new Rectangle(1, 2, 3, 4) }; 366yield return new object[] { new Rectangle(-1, -2, 3, 4) }; 367yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 368yield return new object[] { new Rectangle(0, 0, Cursors.Default.Size.Width, Cursors.Default.Size.Height) }; 369yield return new object[] { new Rectangle(1, 0, Cursors.Default.Size.Width, Cursors.Default.Size.Height) }; 370yield return new object[] { new Rectangle(0, 2, 3, Cursors.Default.Size.Height) }; 371yield return new object[] { new Rectangle(0, 0, Cursors.Default.Size.Width, 4) };
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (16)
13yield return new object[] { new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, -1, DataGridViewElementStates.Displayed, "value", "formattedValue", "", new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All }; 14yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, 1, (DataGridViewElementStates)7, "value", "formattedValue", "errorText", new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All }; 85e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None); 96Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 109Assert.Throws<InvalidOperationException>(() => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 122Assert.Throws<InvalidOperationException>(() => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 135e.PaintBackground(new Rectangle(1, 2, 3, 4), true); 146Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.PaintBackground(new Rectangle(1, 2, 3, 4), true)); 159Assert.Throws<InvalidOperationException>(() => e.PaintBackground(new Rectangle(1, 2, 3, 4), true)); 172Assert.Throws<InvalidOperationException>(() => e.PaintBackground(new Rectangle(1, 2, 3, 4), true)); 185e.PaintContent(new Rectangle(1, 2, 3, 4)); 196Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.PaintContent(new Rectangle(1, 2, 3, 4))); 209Assert.Throws<InvalidOperationException>(() => e.PaintContent(new Rectangle(1, 2, 3, 4))); 222Assert.Throws<InvalidOperationException>(() => e.PaintContent(new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\DataGridViewCellTests.cs (30)
3146yield return new object[] { new DataGridViewAdvancedBorderStyle(), new Rectangle(0, 0, 0, 0) }; 3150new Rectangle(0, 0, 0, 0) 3158new Rectangle(2, 2, 2, 2) 3166new Rectangle(2, 2, 2, 2) 3174new Rectangle(1, 1, 1, 1) 3182new Rectangle(1, 0, 0, 0) 3190new Rectangle(0, 0, 1, 0) 3198new Rectangle(0, 1, 0, 0) 3206new Rectangle(0, 0, 0, 1) 3228Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width, expected.Height + 10), cell.BorderWidths(advancedBorderStyle)); 3241Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle)); 3259Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height + 11), cell.BorderWidths(advancedBorderStyle)); 3280Assert.Equal(new Rectangle(expected.X + 10, expected.Y, expected.Width, expected.Height + 11), cell.BorderWidths(advancedBorderStyle)); 3296Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle)); 6029cell.PaintBorder(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle()); 6036Assert.Throws<ArgumentNullException>("graphics", () => cell.PaintBorder(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle())); 6045Assert.Throws<ArgumentNullException>("cellStyle", () => cell.PaintBorder(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), null, new DataGridViewAdvancedBorderStyle())); 6055cell.PaintErrorIcon(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 20, 19), errorText); 6065cell.PaintErrorIcon(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 20, 19), errorText); 6081Assert.Throws<ArgumentNullException>("graphics", () => cell.PaintErrorIcon(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, cellValueBoundsWidth, cellValueBoundsHeight), errorText)); 6229Assert.Throws<InvalidOperationException>(() => cell.PositionEditingControl(true, true, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), true, true, true, true)); 6236Assert.Throws<InvalidOperationException>(() => cell.PositionEditingPanel(new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), true, true, true, true));
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (14)
13yield return new object[] { new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, DataGridViewElementStates.Displayed, "", new DataGridViewCellStyle(), true, false }; 14yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, (DataGridViewElementStates)7, "errorText", new DataGridViewCellStyle(), true, true }; 64yield return new object[] { new Rectangle(1, 2, 3, 4) }; 65yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 90e.DrawFocus(new Rectangle(1, 2, 3, 4), true); 103Assert.Throws<InvalidOperationException>(() => e.DrawFocus(new Rectangle(1, 2, 3, 4), true)); 114e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None); 127Assert.Throws<InvalidOperationException>(() => e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 138e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true); 151Assert.Throws<InvalidOperationException>(() => e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true)); 162e.PaintCellsContent(new Rectangle(1, 2, 3, 4)); 175Assert.Throws<InvalidOperationException>(() => e.PaintCellsContent(new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (14)
16yield return new object[] { new DataGridView(), graphics, new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, DataGridViewElementStates.Displayed, "", new DataGridViewCellStyle(), true, false }; 17yield return new object[] { new DataGridView(), graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, (DataGridViewElementStates)7, "errorText", new DataGridViewCellStyle(), true, true }; 65yield return new object[] { new Rectangle(1, 2, 3, 4) }; 66yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 117e.DrawFocus(new Rectangle(1, 2, 3, 4), true); 130Assert.Throws<InvalidOperationException>(() => e.DrawFocus(new Rectangle(1, 2, 3, 4), true)); 141e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None); 154Assert.Throws<InvalidOperationException>(() => e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 165e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true); 178Assert.Throws<InvalidOperationException>(() => e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true)); 189e.PaintCellsContent(new Rectangle(1, 2, 3, 4)); 202Assert.Throws<InvalidOperationException>(() => e.PaintCellsContent(new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\DataGridViewRowTests.cs (75)
4186yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor = Color.Blue, SelectionBackColor = Color.Red }, true }; 4187yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new DataGridViewCellStyle { BackColor = Color.Blue, SelectionBackColor = Color.Red }, true }; 4188yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor = Color.Blue, SelectionBackColor = Color.Red }, true }; 4189yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new DataGridViewCellStyle { BackColor = Color.Blue, SelectionBackColor = Color.Red }, false }; 4215Assert.Throws<InvalidOperationException>(() => row.DrawFocus(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new DataGridViewCellStyle(), true)); 4229Assert.Throws<ArgumentNullException>("graphics", () => row.DrawFocus(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new DataGridViewCellStyle(), true)); 4245Assert.Throws<ArgumentNullException>("cellStyle", () => row.DrawFocus(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, null, true)); 4569yield return new object[] { new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), 0, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, true, false }; 4570yield return new object[] { new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), 0, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, false, true }; 4571yield return new object[] { new Rectangle(1000, 2000, 100, 100), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, true, false }; 4813Assert.Equal(new Rectangle(1, 2, 3, 4), e.ClipBounds); 4814Assert.Equal(new Rectangle(2, 3, 4, 5), e.RowBounds); 4829row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4833row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4838row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4857Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4861Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4866Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4890Assert.Equal(new Rectangle(1, 2, 3, 4), e.ClipBounds); 4891Assert.Equal(new Rectangle(2, 3, 4, 5), e.RowBounds); 4899row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4903row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4908row.Paint(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false); 4927Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4931Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4935Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4940Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false)); 4969Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true)); 4983Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true)); 5009Assert.Throws<ArgumentOutOfRangeException>("index", () => row.Paint(graphics, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), rowIndex, DataGridViewElementStates.None, true, true)); 5015yield return new object[] { new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), 0, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, true, false, DataGridViewPaintParts.All }; 5016yield return new object[] { new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), 0, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, false, true, DataGridViewPaintParts.None }; 5017yield return new object[] { new Rectangle(1000, 2000, 100, 100), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.Displayed | DataGridViewElementStates.Displayed, true, false, DataGridViewPaintParts.All }; 5264Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5278Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5292Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, new Rectangle(1, 2, 1000, 10000), new Rectangle(1, 2, 1000, 1000), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5319Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => row.PaintCells(graphics, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), rowIndex, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5586Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5601Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5616Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5641Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => row.PaintHeader(graphics, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), rowIndex, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5657Assert.Throws<InvalidOperationException>(() => row.PaintHeader(graphics, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
35Assert.Equal(new Rectangle(0, 0, 240, 150), dataGrid.Bounds);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (3)
39Assert.Equal(new Rectangle(0, 0, 100, control.PreferredHeight), control.Bounds); 48Assert.Equal(new Rectangle(0, 0, 96, control.PreferredHeight - 4), control.ClientRectangle); 64Assert.Equal(new Rectangle(0, 0, 96, control.PreferredHeight - 4), control.DisplayRectangle);
System\Windows\Forms\DateTimePickerTests.cs (3)
36Assert.Equal(new Rectangle(0, 0, 200, control.PreferredHeight), control.Bounds); 51Assert.Equal(new Rectangle(0, 0, 196, control.PreferredHeight - 4), control.ClientRectangle); 68Assert.Equal(new Rectangle(0, 0, 196, control.PreferredHeight - 4), control.DisplayRectangle);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (5)
48Assert.Equal(new Rectangle(0, 0, control.Width, control.Height), control.Bounds); 56Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.Height), control.ClientRectangle); 76Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, control.Width, control.Height), control.DesktopBounds); 79Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.Height), control.DisplayRectangle); 136Assert.Equal(new Rectangle(-1, -1, control.Width, control.Height), control.RestoreBounds);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (3)
36Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 62Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle);
System\Windows\Forms\DomainUpDownTests.cs (5)
49_sub.Bounds.Should().Be(new Rectangle(0, 0, 120, _sub.PreferredHeight)); 57_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 58_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7)); 64_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3)); 65_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3));
System\Windows\Forms\DrawItemEventArgsTests.cs (22)
14yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window }; 15yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight }; 16yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window }; 17yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window }; 39yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue }; 40yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue }; 41yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue }; 42yield return new object[] { SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue }; 65Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None)); 66Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue)); 71yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.None }; 72yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Selected }; 73yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus }; 74yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus | DrawItemState.Selected }; 75yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus | DrawItemState.NoFocusRect }; 76yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus | DrawItemState.NoFocusRect | DrawItemState.Selected }; 77yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.None }; 78yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Selected }; 79yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus }; 80yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus | DrawItemState.Selected }; 81yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus | DrawItemState.NoFocusRect }; 82yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus | DrawItemState.NoFocusRect | DrawItemState.Selected };
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (12)
14yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 15yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 16yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 40Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont)); 49DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont) 66yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 67yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 68yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 90DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 99DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont); 105yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default, Color.Empty, Color.Empty, null }; 106yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (21)
14yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked }; 15yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, ListViewItemStates.Focused }; 16yield return new object[] { new Rectangle(1, 2, 3, 4), 1, ListViewItemStates.Checked }; 38Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewItemEventArgs(null, new ListViewItem(), new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default)); 46Assert.Throws<ArgumentNullException>("item", () => new DrawListViewItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default)); 55DrawListViewItemEventArgs e = new(graphics, new ListViewItem(), new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked) 72yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Default }; 73yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Focused }; 74yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Checked }; 78yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Default }; 79yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Focused }; 80yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Checked }; 87yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Default }; 88yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Focused }; 89yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Checked }; 94yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Default }; 95yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Focused }; 96yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Checked }; 102yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Default }; 103yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Focused }; 104yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4), ListViewItemStates.Checked };
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (33)
14yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, -1, new ColumnHeader(), ListViewItemStates.Checked }; 15yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, -1, new ColumnHeader(), ListViewItemStates.Checked }; 16yield return new object[] { new Rectangle(-1, 2, -3, -4), new ListViewItem(), new ListViewItem.ListViewSubItem(), 0, 0, new ColumnHeader(), ListViewItemStates.Focused }; 17yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), 1, 2, new ColumnHeader(), ListViewItemStates.Checked }; 41Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default)); 49Assert.Throws<ArgumentNullException>("item", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default)); 59Assert.Throws<ArgumentNullException>("subItem", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, itemIndex, 0, new ColumnHeader(), ListViewItemStates.Default)); 68DrawListViewSubItemEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, -1, new ColumnHeader(), ListViewItemStates.Checked) 85yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null, ListViewItemStates.Default }; 86yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null, ListViewItemStates.Checked }; 87yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null, ListViewItemStates.Focused }; 88yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Default }; 89yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Checked }; 90yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Focused }; 91yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null, ListViewItemStates.Default }; 92yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null, ListViewItemStates.Checked }; 93yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null, ListViewItemStates.Focused }; 94yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Default }; 95yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Checked }; 96yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(), ListViewItemStates.Focused }; 98yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Default }; 99yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Checked }; 100yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Focused }; 101yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Default }; 102yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Checked }; 103yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Focused }; 104yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Default }; 105yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Checked }; 106yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null, ListViewItemStates.Focused }; 107yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Default }; 108yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Checked }; 109yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Focused }; 129e.DrawFocusRectangle(new Rectangle(1, 2, 3, 4));
System\Windows\Forms\DrawToolTipEventArgsTests.cs (8)
14yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 15yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText", Color.Red, Color.Blue, SystemFonts.DefaultFont }; 35yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null, Color.Empty, Color.Empty, null }; 36yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty, Color.Empty, Color.Empty, null }; 37yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText", Color.Empty, Color.Empty, null }; 38yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 39yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue, SystemFonts.DefaultFont }; 40yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText", Color.Red, Color.Blue, SystemFonts.DefaultFont };
System\Windows\Forms\DrawTreeNodeEventArgsTests.cs (3)
14yield return new object[] { new TreeNode(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked }; 15yield return new object[] { new TreeNode(), new Rectangle(-1, -2, -3, -4), TreeNodeStates.Checked }; 38DrawTreeNodeEventArgs e = new(graphics, new TreeNode(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked)
System\Windows\Forms\FlowLayoutPanelTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 42Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 59Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle);
System\Windows\Forms\FormTests.cs (4)
46Assert.Equal(new Rectangle(0, 0, 300, 300), control.Bounds); 54Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.Height), control.ClientRectangle); 75Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, 300, 300), control.DesktopBounds); 138Assert.Equal(new Rectangle(0, 0, 300, 300), control.RestoreBounds);
System\Windows\Forms\GroupBoxTests.cs (11)
32Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 40Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 56Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 569Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 578Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 582Assert.Equal(new Rectangle(3, font.Height + 3, 194, 94 - font.Height), control.DisplayRectangle); 595Assert.Equal(new Rectangle(3, font.Height + 3, 194, 94 - font.Height), control.DisplayRectangle); 1515Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1523Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1563Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle); 1574Assert.Equal(new Rectangle(3, Control.DefaultFont.Height + 3, 194, 94 - Control.DefaultFont.Height), control.DisplayRectangle);
System\Windows\Forms\InvalidateEventArgsTests.cs (2)
14yield return new object[] { new Rectangle(1, 2, 3, 4) }; 15yield return new object[] { new Rectangle(-1, -2, -3, -4) };
System\Windows\Forms\LabelTests.cs (3)
32Assert.Equal(new Rectangle(0, 0, 100, 23), control.Bounds); 40Assert.Equal(new Rectangle(0, 0, 100, 23), control.ClientRectangle); 56Assert.Equal(new Rectangle(0, 0, 100, 23), control.DisplayRectangle);
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
84Assert.Equal(new Rectangle(0, 0, 10, 20), child1.Bounds); 85Assert.Equal(new Rectangle(11, 2, 10, 20), child2.Bounds); 86Assert.Equal(new Rectangle(24, 0, 100, 200), largeChild.Bounds); 87Assert.Equal(new Rectangle(127, 3, 0, 0), emptyChild.Bounds); 88Assert.Equal(new Rectangle(131, 2, 0, 0), emptyChildWithMargin.Bounds); 89Assert.Equal(new Rectangle(134, 0, 50, 100), child3.Bounds); 90Assert.Equal(new Rectangle(184, 0, 10, 20), child4.Bounds); 145Assert.Equal(new Rectangle(190, 0, 10, 20), child1.Bounds); 146Assert.Equal(new Rectangle(177, 2, 10, 20), child2.Bounds); 147Assert.Equal(new Rectangle(76, 0, 100, 200), largeChild.Bounds); 148Assert.Equal(new Rectangle(73, 3, 0, 0), emptyChild.Bounds); 149Assert.Equal(new Rectangle(67, 2, 0, 0), emptyChildWithMargin.Bounds); 150Assert.Equal(new Rectangle(16, 0, 50, 100), child3.Bounds); 151Assert.Equal(new Rectangle(6, 0, 10, 20), child4.Bounds); 206Assert.Equal(new Rectangle(0, 0, 10, 20), child1.Bounds); 207Assert.Equal(new Rectangle(1, 22, 10, 20), child2.Bounds); 208Assert.Equal(new Rectangle(14, 0, 100, 200), largeChild.Bounds); 209Assert.Equal(new Rectangle(117, 3, 0, 0), emptyChild.Bounds); 210Assert.Equal(new Rectangle(115, 8, 0, 0), emptyChildWithMargin.Bounds); 211Assert.Equal(new Rectangle(120, 0, 50, 100), child3.Bounds); 212Assert.Equal(new Rectangle(170, 0, 10, 20), child4.Bounds); 267Assert.Equal(new Rectangle(0, 80, 10, 20), child1.Bounds); 268Assert.Equal(new Rectangle(1, 56, 10, 20), child2.Bounds); 269Assert.Equal(new Rectangle(14, -100, 100, 200), largeChild.Bounds); 270Assert.Equal(new Rectangle(117, 97, 0, 0), emptyChild.Bounds); 271Assert.Equal(new Rectangle(115, 90, 0, 0), emptyChildWithMargin.Bounds); 272Assert.Equal(new Rectangle(120, 0, 50, 100), child3.Bounds); 273Assert.Equal(new Rectangle(170, 80, 10, 20), child4.Bounds);
System\Windows\Forms\ListBoxTests.cs (5)
33Assert.Equal(new Rectangle(0, 0, 120, 96), control.Bounds); 41Assert.Equal(new Rectangle(0, 0, 116, 92), control.ClientRectangle); 63Assert.Equal(new Rectangle(0, 0, 116, 92), control.DisplayRectangle); 5385yield return new object[] { new RECT(1, 2, 3, 4), new Rectangle(1, 2, 2, 2) }; 5520yield return new object[] { new DrawItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0, DrawItemState.Checked) };
System\Windows\Forms\ListViewInsertionMarkTests.cs (2)
216yield return new object[] { new RECT(1, 2, 3, 4), new Rectangle(1, 2, 2, 2) }; 258Assert.Equal(new Rectangle(1, 2, 2, 2), insertionMark.Bounds);
System\Windows\Forms\ListViewTests.cs (4)
40Assert.Equal(new Rectangle(0, 0, 121, 97), control.Bounds); 53Assert.Equal(new Rectangle(0, 0, 117, 93), control.ClientRectangle); 71Assert.Equal(new Rectangle(0, 0, 117, 93), control.DisplayRectangle); 4144yield return new object[] { new RECT(1, 2, 3, 4), new Rectangle(1, 2, 2, 2) };
System\Windows\Forms\MdiClientTests.cs (18)
538Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 539Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 547Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 557Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 558Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 566Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 640Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 641Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 649Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 662Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 663Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 671Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 1088Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 1089Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 1097Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds); 1115Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.ClientRectangle); 1116Assert.Equal(new Rectangle(0, 0, expectedClientWidth, expectedClientHeight), control.DisplayRectangle); 1124Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.Bounds);
System\Windows\Forms\MdiControlStripTests.cs (3)
37Assert.Equal(new Rectangle(0, 0, 200, 24), mdiControlStrip.Bounds); 45Assert.Equal(new Rectangle(0, 0, 200, 24), mdiControlStrip.ClientRectangle); 68Assert.Equal(new Rectangle(6, 2, 194, 20), mdiControlStrip.DisplayRectangle);
System\Windows\Forms\MenuStripTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, 200, 24), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, 200, 24), control.ClientRectangle); 66Assert.Equal(new Rectangle(6, 2, 194, 20), control.DisplayRectangle);
System\Windows\Forms\MonthCalendarTests.cs (1)
4329Rectangle expectedBounds = new(13, 42, 16, 16);
System\Windows\Forms\PaintEventArgsTests.cs (5)
14yield return new object[] { new Rectangle(1, 2, 3, 4) }; 15yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 33Assert.Throws<ArgumentNullException>("graphics", () => new PaintEventArgs((Graphics)null, new Rectangle(1, 2, 3, 4))); 41PaintEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4)); 53using SubPaintEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4));
System\Windows\Forms\PanelTests.cs (3)
36Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 60Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle);
System\Windows\Forms\PictureBoxTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, 100, 50), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, 100, 50), control.ClientRectangle); 59Assert.Equal(new Rectangle(0, 0, 100, 50), control.DisplayRectangle);
System\Windows\Forms\ProgressBarRendererTest.cs (1)
69Rectangle rectangle1 = new(0, 0, 50, 50);
System\Windows\Forms\ProgressBarTests.cs (2)
31Assert.Equal(new Rectangle(0, 0, 100, 23), control.Bounds); 38Assert.Equal(new Rectangle(0, 0, 100, 23), control.ClientRectangle);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (7)
42Validate.TextOut("Misc", new(25, 4, 25, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 46Validate.TextOut(" ", new(145, 22, 5, 14))), // blank?? 48Validate.TextOut(pt.X.ToString(), new(145, 22, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 51Validate.TextOut(nameof(Point.X), new(25, 23, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 55Validate.TextOut(" ", new(145, 41, 5, 14))), // blank?? 57Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 60Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\PropertyGridTests.cs (3)
46Assert.Equal(new Rectangle(0, 0, 130, 130), control.Bounds); 59Assert.Equal(new Rectangle(0, 0, 130, 130), control.ClientRectangle); 88Assert.Equal(new Rectangle(0, 0, 130, 130), control.DisplayRectangle);
System\Windows\Forms\PropertyStoreTests.cs (3)
160Rectangle one = new(1, 2, 3, 4); 161Rectangle two = new(5, 6, 7, 8); 176Rectangle one = new(1, 2, 3, 4);
System\Windows\Forms\RadioButtonRendererTests.cs (2)
71bounds: new Rectangle(41, 5, 20, 12), 137bounds: new Rectangle(3, 0, 20, 12),
System\Windows\Forms\RadioButtonTests.cs (3)
35Assert.Equal(new Rectangle(0, 0, 104, 24), control.Bounds); 45Assert.Equal(new Rectangle(0, 0, 104, 24), control.ClientRectangle); 61Assert.Equal(new Rectangle(0, 0, 104, 24), control.DisplayRectangle);
System\Windows\Forms\RichTextBoxTests.cs (11)
43Assert.Equal(new Rectangle(0, 0, 100, 96), control.Bounds); 54Assert.Equal(new Rectangle(0, 0, 96, 92), control.ClientRectangle); 71Assert.Equal(new Rectangle(0, 0, 96, 92), control.DisplayRectangle); 10322yield return new object[] { BorderStyle.Fixed3D, Rectangle.Empty, new Rectangle(0, 0, 0, 1) }; 10326yield return new object[] { BorderStyle.Fixed3D, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 5) }; 10327yield return new object[] { BorderStyle.FixedSingle, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4) }; 10328yield return new object[] { BorderStyle.None, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4) }; 10663richTextBox1.DrawToBitmap(bitmap1, new Rectangle(0, 0, 10, 10));
System\Windows\Forms\ScreenTests.cs (4)
124yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 125yield return new object[] { new Rectangle(0, 0, 0, 0) }; 126yield return new object[] { new Rectangle(1, 2, 3, 4) }; 127yield return new object[] { new Rectangle(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue) };
System\Windows\Forms\ScrollableControlTests.cs (44)
199yield return new object[] { true, width, height, width - 20, height + 50, new Rectangle(0, 0, width - SystemInformation.VerticalScrollBarWidth, height) }; 200yield return new object[] { true, width, height, width + 50, height - 20, new Rectangle(0, 0, width, height - SystemInformation.HorizontalScrollBarHeight) }; 201yield return new object[] { true, width, height, width + 50, height + 50, new Rectangle(0, 0, width - SystemInformation.VerticalScrollBarWidth, height - SystemInformation.HorizontalScrollBarHeight) }; 202yield return new object[] { true, width, height, width - 20, height - 20, new Rectangle(0, 0, width, height) }; 205yield return new object[] { false, width, height, width + 50, height - 20, new Rectangle(0, 0, width, height) }; 206yield return new object[] { false, width, height, width - 20, height + 50, new Rectangle(0, 0, width, height) }; 207yield return new object[] { false, width, height, width + 50, height + 50, new Rectangle(0, 0, width, height) }; 208yield return new object[] { false, width, height, width - 20, height - 20, new Rectangle(0, 0, width, height) }; 717Assert.Equal(new Rectangle(1, 2, 66, 74), control.DisplayRectangle); 720Assert.Equal(new Rectangle(1, 2, 66, 74), control.DisplayRectangle); 1532using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1570Bounds = new Rectangle(1, 2, 30, 40) 1574Bounds = new Rectangle(1, 2, 30, 40) 1665Bounds = new Rectangle(1, 2, 30, 40) 1669Bounds = new Rectangle(1, 2, 30, 40) 1679using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1683Bounds = new Rectangle(1, 2, 10, 20), 1704Assert.Equal(new Rectangle(1, 2, 0, 0), e.ClipRectangle); 1731using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1819using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1823Bounds = new Rectangle(1, 2, 30, 40) 1827Bounds = new Rectangle(1, 2, 10, 20), 1848Assert.Equal(new Rectangle(1, 2, 10, 20), e.ClipRectangle); 2335Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2403Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 2481yield return new object[] { true, true, true, new Size(70, 80), null, new Rectangle(0, 0, 70, 80) }; 2482yield return new object[] { false, true, true, new Size(70, 80), null, new Rectangle(0, 0, 70, 80) }; 2484yield return new object[] { true, true, true, new Size(70, 80), new Control(), new Rectangle(0, 0, 70, 80) }; 2487yield return new object[] { false, true, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 70, 80) }; 2490yield return new object[] { true, false, false, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2493yield return new object[] { true, false, false, new Size(0, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2494yield return new object[] { true, false, false, new Size(-1, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2495yield return new object[] { true, false, false, new Size(70, 0), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2496yield return new object[] { true, false, false, new Size(70, -1), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2499yield return new object[] { true, true, false, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2500yield return new object[] { true, false, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2501yield return new object[] { true, true, true, new Size(70, 80), new LargeControl(), new Rectangle(0, 0, 100, 150) }; 2503yield return new object[] { true, true, false, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2504yield return new object[] { true, false, true, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2505yield return new object[] { true, true, true, new Size(70, 80), new SmallControl(), new Rectangle(0, 0, 70, 80) }; 2512yield return new object[] { true, true, true, new Size(70, 80), parentControl, new Rectangle(0, 0, 100, 150) }; 2513yield return new object[] { true, hScroll, true, new Size(70, 80), childControl, new Rectangle(0, 0, 100, 150) }; 2521yield return new object[] { true, true, true, new Size(70, 80), parentControl, new Rectangle(0, 0, 100, 150) }; 2522yield return new object[] { true, true, vScroll, new Size(70, 80), childControl, new Rectangle(0, 0, 100, 150) };
System\Windows\Forms\ScrollBarTests.cs (80)
1774yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 0, 4) }; 1775yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 1776yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 1777yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 0, 4) }; 1778yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1780yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 1781yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 1782yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 1783yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1784yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1786yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 6, 4) }; 1787yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 1788yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 1789yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 6, 4) }; 1790yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1792yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, -6, 4) }; 1793yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 1794yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 1795yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, -6, 4) }; 1796yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1822yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 3, 0) }; 1823yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.X, new Rectangle(0, 2, 3, 4) }; 1824yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Y, new Rectangle(1, 0, 3, 4) }; 1825yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1826yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.Height, new Rectangle(1, 2, 3, 0) }; 1828yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.All, new Rectangle(1, 2, 3, 4) }; 1829yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.X, new Rectangle(1, 2, 3, 4) }; 1830yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Y, new Rectangle(1, 2, 3, 4) }; 1831yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1832yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), BoundsSpecified.Height, new Rectangle(1, 2, 3, 4) }; 1834yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.All, new Rectangle(2, 6, 3, 12) }; 1835yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.X, new Rectangle(2, 2, 3, 4) }; 1836yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Y, new Rectangle(1, 6, 3, 4) }; 1837yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1838yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(2, 3), BoundsSpecified.Height, new Rectangle(1, 2, 3, 12) }; 1840yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.All, new Rectangle(-2, -6, 3, -12) }; 1841yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.X, new Rectangle(-2, 2, 3, 4) }; 1842yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Y, new Rectangle(1, -6, 3, 4) }; 1843yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Width, new Rectangle(1, 2, 3, 4) }; 1844yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(-2, -3), BoundsSpecified.Height, new Rectangle(1, 2, 3, -12) };
System\Windows\Forms\SplitterPanelTests.cs (27)
42Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 56Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 464Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 465Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 473Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 483Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 484Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 492Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 541Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 542Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 551Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 563Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 564Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 573Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 829Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 830Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 838Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 848Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.ClientRectangle); 849Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.DisplayRectangle); 857Assert.Equal(new Rectangle(0, 0, value.Width, value.Height), control.Bounds); 1186Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 1187Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1195Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 1205Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 1206Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1214Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds);
System\Windows\Forms\SplitterTests.cs (12)
31Assert.Equal(new Rectangle(0, 0, 3, 3), control.Bounds); 39Assert.Equal(new Rectangle(0, 0, 3, 3), control.ClientRectangle); 55Assert.Equal(new Rectangle(0, 0, 3, 3), control.DisplayRectangle); 1204Bounds = new Rectangle(10, 10, 50, 50) 1248Bounds = new Rectangle(0, 0, 0, 100) 1254Bounds = new Rectangle(50, 0, 3, 3) 1367Bounds = new Rectangle(0, 0, 0, 100) 1373Bounds = new Rectangle(50, 0, 3, 3) 2015Bounds = new Rectangle(0, 0, 0, 100) 2021Bounds = new Rectangle(50, 0, 3, 3) 2116Bounds = new Rectangle(0, 0, 0, 100) 2122Bounds = new Rectangle(50, 0, 3, 3)
System\Windows\Forms\StatusStripTests.cs (14)
35Assert.Equal(new Rectangle(0, 0, 200, 22), control.Bounds); 43Assert.Equal(new Rectangle(0, 0, 200, 22), control.ClientRectangle); 66Assert.Equal(new Rectangle(1, 0, 185, 22), control.DisplayRectangle); 137Assert.Equal(new Rectangle(188, 0, 12, 22), control.SizeGripBounds); 621yield return new object[] { true, layoutStyle, RightToLeft.Yes, new Rectangle(0, 0, 12, 22) }; 622yield return new object[] { true, layoutStyle, RightToLeft.No, new Rectangle(188, 0, 12, 22) }; 623yield return new object[] { true, layoutStyle, RightToLeft.Inherit, new Rectangle(188, 0, 12, 22) }; 647yield return new object[] { true, layoutStyle, RightToLeft.Yes, new Rectangle(0, 10, 12, 22) }; 648yield return new object[] { true, layoutStyle, RightToLeft.No, new Rectangle(198, 10, 12, 22) }; 649yield return new object[] { true, layoutStyle, RightToLeft.Inherit, new Rectangle(198, 10, 12, 22) }; 674yield return new object[] { true, layoutStyle, RightToLeft.Yes, new Rectangle(0, 0, 12, 12) }; 675yield return new object[] { true, layoutStyle, RightToLeft.No, new Rectangle(178, 0, 12, 12) }; 676yield return new object[] { true, layoutStyle, RightToLeft.Inherit, new Rectangle(178, 0, 12, 12) }; 1212using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4));
System\Windows\Forms\StatusStripTests.Rendering.cs (2)
36Rectangle bitBltBounds = new(bounds.X, 0, bounds.Width - 1, bounds.Height - 1); 37Rectangle polylineBounds = new(bounds.X, 0, bounds.Width - 1, 15);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (38)
43Bounds = new Rectangle(0, 0, 400, 300) 72Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 90Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 94Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 119Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 122Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 166Bounds = new Rectangle(0, 0, 400, 300) 326Bounds = new Rectangle(0, 0, 400, 300) 369Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 390Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 394Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 425Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 428Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 467Bounds = new Rectangle(0, 0, 400, 300) 892Bounds = new Rectangle(0, 0, 400, 300) 925Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 929Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 945Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 949Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 965Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 969Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 990Bounds = new Rectangle(0, 0, 400, 300) 1037Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1041Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1060Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1064Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1086Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1090Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1117Bounds = new Rectangle(0, 0, 400, 300) 1201Assert.Equal(new Rectangle(4, 24, 392, 272), value1.Bounds); 1205Assert.Equal(new Rectangle(4, 24, 392, 272), value2.Bounds); 1229Bounds = new Rectangle(0, 0, 400, 300) 1274Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1278Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1297Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1301Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1323Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1327Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (75)
28Bounds = new Rectangle(0, 0, 400, 300) 58Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 77Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 81Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 107Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 110Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 154Bounds = new Rectangle(0, 0, 400, 300) 317Bounds = new Rectangle(0, 0, 400, 300) 361Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 383Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 387Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 419Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 422Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 461Bounds = new Rectangle(0, 0, 400, 300) 975Bounds = new Rectangle(0, 0, 400, 300) 1005Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1023Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1027Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1052Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 1055Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 1970Bounds = new Rectangle(0, 0, 400, 300) 2000Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2019Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2023Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 2051Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2054Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 2091Bounds = new Rectangle(0, 0, 400, 300) 2260Bounds = new Rectangle(0, 0, 400, 300) 2304Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2326Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2330Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 2364Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 2367Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 2410Bounds = new Rectangle(0, 0, 400, 300) 3015Bounds = new Rectangle(0, 0, 400, 300) 3046Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 3065Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 3069Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 3097Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 3100Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 3978Bounds = new Rectangle(0, 0, 400, 300) 4012Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4016Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4033Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4037Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4054Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4058Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4079Bounds = new Rectangle(0, 0, 400, 300) 4127Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4131Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4151Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4155Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4178Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4182Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4209Bounds = new Rectangle(0, 0, 400, 300) 4250Assert.Equal(new Rectangle(4, 24, 392, 272), value1.Bounds); 4254Assert.Equal(new Rectangle(4, 24, 392, 272), value2.Bounds); 4274Assert.Equal(new Rectangle(4, 24, 392, 272), value1.Bounds); 4278Assert.Equal(new Rectangle(4, 24, 392, 272), value2.Bounds); 4298Assert.Equal(new Rectangle(4, 24, 392, 272), value1.Bounds); 4302Assert.Equal(new Rectangle(4, 24, 392, 272), value2.Bounds); 4326Bounds = new Rectangle(0, 0, 400, 300) 4374Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4378Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4398Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4402Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4425Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4429Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4699Bounds = new Rectangle(0, 0, 400, 300) 4731Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4735Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4751Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4755Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds); 4771Assert.Equal(new Rectangle(0, 0, 200, 100), value1.Bounds); 4775Assert.Equal(new Rectangle(0, 0, 200, 100), value2.Bounds);
System\Windows\Forms\TabControlTests.cs (5)
33Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 40Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 3713yield return new object[] { new RECT(1, 2, 3, 4), new Rectangle(1, 2, 2, 2) }; 3758Assert.Equal(new Rectangle(1, 2, 2, 2), control.GetTabRect(0)); 4222yield return new object[] { new DrawItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0, DrawItemState.Checked) };
System\Windows\Forms\TableLayoutCellPaintEventArgsTests.cs (8)
14yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), -1, -1 }; 15yield return new object[] { new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), 0, 0 }; 16yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, 2 }; 38(Graphics)null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, 2));
System\Windows\Forms\TableLayoutPanelTests.cs (5)
37Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 45Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 65Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1431using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1471using PaintEventArgs eventArgs = new(graphics, new Rectangle(15, 2, 5, 20));
System\Windows\Forms\TabPageTests.cs (59)
40Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 65Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 149Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 156Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 174Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1899Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 1900Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1909Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1921Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 1922Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1931Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1989Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 1990Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 1999Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2012Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 2013Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 2022Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2090Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 2091Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 2100Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2115Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 2116Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 2125Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2214Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 2215Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 2244Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 2245Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 3978using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4048using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4052Bounds = new Rectangle(1, 2, 30, 40), 4057Bounds = new Rectangle(1, 2, 10, 20), 4077Assert.Equal(new Rectangle(1, 2, 0, 0), e.ClipRectangle); 4104using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4187using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 4191Bounds = new Rectangle(1, 2, 30, 40), 4196Bounds = new Rectangle(1, 2, 10, 20), 4346Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 4347Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 4355Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 4367Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 4368Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 4376Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 4483Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 4484Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 4492Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 4505Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 4506Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 4514Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 4638Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 4639Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 4647Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 4662Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 4663Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 4671Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 4816Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 4817Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 4846Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 4847Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (8)
470yield return new object[] { false, new Size(0, 0), new Rectangle(1, 0, 78, 16) }; 471yield return new object[] { false, new Size(50, 50), new Rectangle(1, 1, 44, 15) }; 472yield return new object[] { false, new Size(250, 100), new Rectangle(1, 1, 244, 15) }; 473yield return new object[] { true, new Size(0, 0), new Rectangle(4, 0, 72, 16) }; 477yield return new object[] { true, new Size(50, 50), new Rectangle(4, 1, 38, 44) }; 478yield return new object[] { true, new Size(250, 100), new Rectangle(4, 1, 238, 94) }; 482yield return new object[] { true, new Size(50, 50), new Rectangle(4, 1, 38, 30) }; 483yield return new object[] { true, new Size(250, 100), new Rectangle(4, 1, 238, 90) };
System\Windows\Forms\TextBoxRendererTests.cs (3)
78bounds: new Rectangle(6, 3, 16, 12), 101Rectangle textBounds = new(10, 20, 30, 40); 114bounds: new Rectangle(13, 20, 16, 12),
System\Windows\Forms\TextRendererTests.cs (73)
163yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red }; 164yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red }; 165yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 3, 4), Color.Red }; 166yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red }; 167yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black }; 168yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White }; 169yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent }; 170yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty }; 195yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue }; 196yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue }; 197yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue }; 198yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue }; 199yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue }; 200yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue }; 201yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue }; 202yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red }; 203yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black }; 204yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White }; 205yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent }; 206yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty }; 231yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, TextFormatFlags.Default, }; 232yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.Default, }; 233yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default, }; 234yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, TextFormatFlags.Default, }; 235yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, TextFormatFlags.Default, }; 236yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, TextFormatFlags.Default, }; 237yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, TextFormatFlags.Default, }; 239yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.HorizontalCenter }; 240yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 241yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right }; 242yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.SingleLine }; 243yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.SingleLine }; 244yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)1024 }; 245yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.RightToLeft }; 246yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)int.MaxValue }; 271yield return new object[] { hint, text, null, new Rectangle(1, 2, -3, -4), Color.Red, Color.Blue, TextFormatFlags.Default, }; 272yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Blue, Color.Blue, TextFormatFlags.Default, }; 273yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default, }; 274yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue, TextFormatFlags.Default, }; 275yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue, TextFormatFlags.Default, }; 276yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue, TextFormatFlags.Default, }; 277yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue, TextFormatFlags.Default, }; 278yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red, TextFormatFlags.Default, }; 279yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black, TextFormatFlags.Default, }; 280yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White, TextFormatFlags.Default, }; 281yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent, TextFormatFlags.Default, }; 282yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty, TextFormatFlags.Default, }; 284yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; 285yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right }; 286yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 287yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 288yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)1024 }; 289yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.RightToLeft }; 290yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 339TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red); 343TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default); 347TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue); 351TextRenderer.DrawText(mockDeviceContext.Object, "text", SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default); 371TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red); 375TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default); 379TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue); 383TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(), SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default); 700new Rectangle(0, 0, int.MaxValue, int.MaxValue), 716{ TextFormatFlags.GlyphOverhangPadding, new Rectangle(3, 0, 70, 12) }, 717{ TextFormatFlags.LeftAndRightPadding, new Rectangle(5, 0, 70, 12) }, 718{ TextFormatFlags.NoPadding, new Rectangle(0, 0, 70, 12) } 759using Region region = new(new Rectangle(1, 2, 6, 8)); 770new Rectangle(0, 0, int.MaxValue, int.MaxValue), 792{ TextFormatFlags.Default, new Rectangle(3, 0, 49, 12) }, 793{ TextFormatFlags.PreserveGraphicsTranslateTransform, new Rectangle(8, 10, 49, 12) }, 794{ TextFormatFlags.PreserveGraphicsClipping, new Rectangle(6, 12, 5, 0) }, 795{ TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.PreserveGraphicsTranslateTransform, new Rectangle(8, 12, 3, 7) }, 807using Region region = new(new Rectangle(1, 2, 6, 8));
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (7)
22yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down }; 23yield return new object[] { graphics, new ToolStripButton(), new Rectangle(-1, -2, -3, -4), Color.Blue, ArrowDirection.Down }; 41yield return new object[] { new Rectangle(1, 2, 3, 4) }; 42yield return new object[] { new Rectangle(-1, -2, -3, -4) }; 52ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 72ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 87ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down)
System\Windows\Forms\ToolStripButtonTests.cs (15)
33Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 40Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 114Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 121Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 201Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 208Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 291Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 298Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 379Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 386Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 477Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 484Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 1266using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1357using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1450yield return new object[] { displayStyle, new PaintEventArgs(graphics, new Rectangle(1, 2, 3, 4)) };
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (1)
79Rectangle dropDownRect = new(0, 0, 100, 100);
System\Windows\Forms\ToolStripContentPanelTests.cs (10)
38Assert.Equal(new Rectangle(0, 0, 200, 100), control.Bounds); 45Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 62Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 940Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 941Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 950Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 962Assert.Equal(new Rectangle(0, 0, 200, 100), control.ClientRectangle); 963Assert.Equal(new Rectangle(0, 0, 200, 100), control.DisplayRectangle); 972Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1855using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4));
System\Windows\Forms\ToolStripControlHostTests.cs (21)
30Bounds = new Rectangle(1, 2, 3, 4), 68Assert.Equal(new Rectangle(2, 2, 0, 0), item.ContentRectangle); 700Bounds = new Rectangle(10, 20, 30, 40) 707Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 708Assert.Equal(new Rectangle(10, 20, 30, 40), c.Bounds); 714Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 715Assert.Equal(new Rectangle(10, 20, 30, 40), c.Bounds); 2206Bounds = new Rectangle(1, 2, 3, 4) 2214Assert.Equal(new Rectangle(1, 2, value.Width, value.Height), c.Bounds); 2220Assert.Equal(new Rectangle(1, 2, value.Width, value.Height), c.Bounds); 2770Bounds = new Rectangle(10, 20, 30, 40) 2778Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 2779Assert.Equal(new Rectangle(10, 20, 30, 40), c.Bounds); 2784Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 2785Assert.Equal(new Rectangle(10, 20, 30, 40), c.Bounds); 2858Bounds = new Rectangle(1, 2, 3, 4) 2863Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds); 2867Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds); 3847Bounds = new Rectangle(1, 2, 3, 4) 3853Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds); 4110using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4));
System\Windows\Forms\ToolStripDropDownItemTests.cs (8)
32Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 36Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 121Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 125Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 220Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 224Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 320Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 324Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle);
System\Windows\Forms\ToolStripDropDownTests.cs (11)
39Assert.Equal(new Rectangle(0, 0, 100, 25), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 100, 25), control.ClientRectangle); 70Assert.Equal(new Rectangle(1, 2, 98, 21), control.DisplayRectangle); 116Assert.Equal(Screen.GetWorkingArea(new Rectangle(0, 0, 100, 25)).Size - new Size(2, 4), control.MaxItemSize); 1966Assert.Equal(new Rectangle(0, 0, 100, 25), control.ClientRectangle); 1967Assert.Equal(new Rectangle(1, 2, 98, 21), control.DisplayRectangle); 1976Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds); 1988Assert.Equal(new Rectangle(0, 0, 100, 25), control.ClientRectangle); 1989Assert.Equal(new Rectangle(1, 2, 98, 21), control.DisplayRectangle); 1998Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds); 2232yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) };
System\Windows\Forms\ToolStripItemImageRenderEventArgsTests.cs (9)
32yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4), null }; 33yield return new object[] { graphics, new ToolStripButton() { Image = image }, new Rectangle(1, 2, 3, 4), image }; 40}, new Rectangle(1, 2, 3, 4), image 48}, new Rectangle(1, 2, 3, 4), image 56}, new Rectangle(1, 2, 3, 4), null 82ToolStripItemImageRenderEventArgs e = new(g, item, new Rectangle(1, 2, 3, 4)); 85Assert.Equal(new Rectangle(1, 2, 3, 4), e.ImageRectangle); 92yield return new object[] { new ToolStripButton(), new Bitmap(10, 10), new Rectangle(1, 2, 3, 4) }; 93yield return new object[] { new ToolStripButton() { Image = new Bitmap(10, 10) }, new Bitmap(10, 10), new Rectangle(1, 2, 3, 4) };
System\Windows\Forms\ToolStripItemTests.cs (32)
35Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 39Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 120Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 124Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 215Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 219Assert.Equal(new Rectangle(2, 2, 19, 19), item.ContentRectangle); 2037yield return new object[] { new Padding(-23), new Rectangle(2, 2, 19, 19) }; 2038yield return new object[] { new Padding(-24), new Rectangle(2, 2, 19, 19) }; 2039yield return new object[] { new Padding(2), new Rectangle(0, 0, 23, 23) }; 2040yield return new object[] { new Padding(23), new Rectangle(-21, -21, 65, 65) }; 2041yield return new object[] { new Padding(24), new Rectangle(-22, -22, 67, 67) }; 10472yield return new object[] { new Rectangle(1, 2, 3, 4) }; 14533yield return new object[] { new Rectangle(1, 0, 23, 23), 1 }; 14534yield return new object[] { new Rectangle(0, 2, 23, 23), 1 }; 14535yield return new object[] { new Rectangle(1, 2, 23, 23), 1 }; 14536yield return new object[] { new Rectangle(0, 0, -1, -2), 0 }; 14537yield return new object[] { new Rectangle(0, 0, 0, 0), 0 }; 14538yield return new object[] { new Rectangle(0, 0, 1, 2), 0 }; 14539yield return new object[] { new Rectangle(0, 0, 22, 23), 0 }; 14540yield return new object[] { new Rectangle(0, 0, 23, 22), 0 }; 14541yield return new object[] { new Rectangle(0, 0, 23, 23), 0 }; 14542yield return new object[] { new Rectangle(1, 2, 3, 4), 1 }; 14683yield return new object[] { new Rectangle(1, 0, 23, 23), 1, 1 }; 14684yield return new object[] { new Rectangle(0, 2, 23, 23), 1, 1 }; 14685yield return new object[] { new Rectangle(1, 2, 23, 23), 1, 1 }; 14686yield return new object[] { new Rectangle(0, 0, -1, -2), 0, 1 }; 14687yield return new object[] { new Rectangle(0, 0, 0, 0), 0, 1 }; 14688yield return new object[] { new Rectangle(0, 0, 1, 2), 0, 1 }; 14689yield return new object[] { new Rectangle(0, 0, 22, 23), 0, 1 }; 14690yield return new object[] { new Rectangle(0, 0, 23, 22), 0, 1 }; 14691yield return new object[] { new Rectangle(0, 0, 23, 23), 0, 0 }; 14692yield return new object[] { new Rectangle(1, 2, 3, 4), 1, 1 };
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
13yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top }; 14yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Bottom }; 38yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.MiddleCenter, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix }; 39yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.BottomRight, TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.HidePrefix }; 40yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, (ContentAlignment)(-1), TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.RightToLeft | TextFormatFlags.HidePrefix }; 66Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top)); 67Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft)); 82ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue, SystemFonts.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
33Assert.Equal(new Rectangle(0, 0, 32, 19), item.Bounds); 37Assert.Equal(new Rectangle(-2, 2, 36, 15), item.ContentRectangle);
System\Windows\Forms\ToolStripRendererTests.cs (15)
31yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, arrowDirection }; 36yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Left - 1 }; 37yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Up + 1 }; 193yield return new object[] { graphics, new SubToolStripItem(), new Bitmap(10, 10), new Rectangle(1, 2, 3, 4) }; 194yield return new object[] { graphics, new SubToolStripItem { Enabled = false }, new Bitmap(10, 10), new Rectangle(1, 2, 3, 4) }; 198yield return new object[] { graphics, new SubToolStripItem { ImageScaling = imageScaling }, new Bitmap(10, 10), new Rectangle(1, 2, 3, 4) }; 295yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4), Color.Empty, null, TextFormatFlags.Left }; 296yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0), Color.Empty, null, TextFormatFlags.Left }; 297yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4), Color.Empty, null, TextFormatFlags.Left }; 300yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 301yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 302yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 303yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 304yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 305yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (10)
29yield return new object[] { new ToolStrip(), new Rectangle(0, 0, 100, 25), SystemColors.Control }; 30yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(0, 0, 100, 25), Color.Red }; 31yield return new object[] { new ToolStripDropDown(), new Rectangle(0, 0, 100, 25), SystemColors.Menu }; 32yield return new object[] { new MenuStrip(), new Rectangle(0, 0, 200, 24), SystemColors.MenuBar }; 52yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.Control }; 53yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.Empty, Color.Red }; 54yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.Menu }; 55yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.MenuBar }; 56yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.Blue, Color.Blue }; 94ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4), Color.Empty);
System\Windows\Forms\ToolStripSeparatorTests.cs (38)
33Assert.Equal(new Rectangle(0, 0, 6, 6), item.Bounds); 37Assert.Equal(new Rectangle(2, 2, 2, 2), item.ContentRectangle); 1119yield return new object[] { layoutStyle, new PaintEventArgs(graphics, new Rectangle(1, 2, 3, 4)) }; 1213using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1284using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 1353yield return new object[] { new Rectangle(1, 0, 23, 23), 1 }; 1354yield return new object[] { new Rectangle(0, 2, 23, 23), 1 }; 1355yield return new object[] { new Rectangle(1, 2, 23, 23), 1 }; 1356yield return new object[] { new Rectangle(0, 0, -1, -2), 0 }; 1357yield return new object[] { new Rectangle(0, 0, 0, 0), 0 }; 1358yield return new object[] { new Rectangle(0, 0, 1, 2), 0 }; 1359yield return new object[] { new Rectangle(0, 0, 5, 6), 0 }; 1360yield return new object[] { new Rectangle(0, 0, 6, 5), 0 }; 1361yield return new object[] { new Rectangle(0, 0, 6, 6), 0 }; 1362yield return new object[] { new Rectangle(1, 2, 3, 4), 1 }; 1443yield return new object[] { new Rectangle(1, 0, 23, 23), 1 }; 1444yield return new object[] { new Rectangle(0, 2, 23, 23), 1 }; 1445yield return new object[] { new Rectangle(1, 2, 23, 23), 1 }; 1446yield return new object[] { new Rectangle(0, 0, -1, -2), 1 }; 1447yield return new object[] { new Rectangle(0, 0, 0, 0), 1 }; 1448yield return new object[] { new Rectangle(0, 0, 1, 2), 1 }; 1449yield return new object[] { new Rectangle(0, 0, 5, 6), 1 }; 1450yield return new object[] { new Rectangle(0, 0, 6, 5), 1 }; 1451yield return new object[] { new Rectangle(0, 0, 6, 6), 1 }; 1452yield return new object[] { new Rectangle(1, 2, 3, 4), 1 }; 1453yield return new object[] { new Rectangle(2, 0, 3, 4), 1 }; 1479Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1489Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1505yield return new object[] { new Rectangle(1, 0, 23, 23), 1, 1 }; 1506yield return new object[] { new Rectangle(0, 2, 23, 23), 1, 1 }; 1507yield return new object[] { new Rectangle(1, 2, 23, 23), 1, 1 }; 1508yield return new object[] { new Rectangle(0, 0, -1, -2), 0, 1 }; 1509yield return new object[] { new Rectangle(0, 0, 0, 0), 0, 1 }; 1510yield return new object[] { new Rectangle(0, 0, 1, 2), 0, 1 }; 1511yield return new object[] { new Rectangle(0, 0, 5, 6), 0, 1 }; 1512yield return new object[] { new Rectangle(0, 0, 6, 5), 0, 1 }; 1513yield return new object[] { new Rectangle(0, 0, 6, 6), 0, 0 }; 1514yield return new object[] { new Rectangle(1, 2, 3, 4), 1, 1 };
System\Windows\Forms\ToolStripTests.cs (50)
39Assert.Equal(new Rectangle(0, 0, 100, 25), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 100, 25), control.ClientRectangle); 73Assert.Equal(new Rectangle(9, 0, 90, 25), control.DisplayRectangle); 78Assert.Equal(new Rectangle(7, 0, 92, 25), control.DisplayRectangle); 197Assert.Equal(new Rectangle(0, 0, 100, 25), control.Bounds); 205Assert.Equal(new Rectangle(0, 0, 100, 25), control.ClientRectangle); 227Assert.Equal(new Rectangle(9, 0, 90, 25), control.DisplayRectangle); 232Assert.Equal(new Rectangle(7, 0, 92, 25), control.DisplayRectangle); 2266yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Visible, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2267yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Visible, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2268yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Visible, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2269yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Hidden, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2270yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Hidden, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2271yield return new object[] { ToolStripLayoutStyle.Flow, ToolStripGripStyle.Hidden, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2273yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Yes, new Rectangle(0, 0, width, 25) }; 2274yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.No, new Rectangle(x, 0, width, 25) }; 2275yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Inherit, new Rectangle(x, 0, width, 25) }; 2276yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2277yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2278yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2280yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Yes, new Rectangle(0, 0, width, 25) }; 2281yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.No, new Rectangle(x, 0, width, 25) }; 2282yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Inherit, new Rectangle(x, 0, width, 25) }; 2283yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2284yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2285yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2287yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Visible, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2288yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Visible, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2289yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Visible, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2290yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Hidden, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2291yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Hidden, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2292yield return new object[] { ToolStripLayoutStyle.Table, ToolStripGripStyle.Hidden, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 2294yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Yes, new Rectangle(0, x, 99, height) }; 2295yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.No, new Rectangle(0, x, 99, height) }; 2296yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Visible, RightToLeft.Inherit, new Rectangle(0, x, 99, height) }; 2297yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Yes, new Rectangle(0, 0, 99, 25) }; 2298yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.No, new Rectangle(0, 0, 99, 25) }; 2299yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, ToolStripGripStyle.Hidden, RightToLeft.Inherit, new Rectangle(0, 0, 99, 25) }; 5873using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 5912Bounds = new Rectangle(1, 2, 30, 40) 5916Bounds = new Rectangle(1, 2, 30, 40) 5960Bounds = new Rectangle(1, 2, 30, 40) 5964Bounds = new Rectangle(1, 2, 30, 40) 6020using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 6024Bounds = new Rectangle(0, 0, 30, 25), 6071using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 6158using PaintEventArgs eventArgs = new(graphics, new Rectangle(1, 2, 3, 4)); 6162Bounds = new Rectangle(1, 2, 30, 40) 6166Bounds = new Rectangle(0, 0, 30, 25), 6187Assert.Equal(new Rectangle(0, 0, 30, 25), e.ClipRectangle);
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
33Rectangle bitBltBounds = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\TrackBarRendererTests.cs (11)
44TestDrawTrack(TrackBarRenderer.DrawHorizontalTrack, new Rectangle(0, 0, 100, 10)); 45TestDrawTrack(TrackBarRenderer.DrawVerticalTrack, new Rectangle(0, 0, 10, 100)); 62new Rectangle(0, 0, 0, 10), 63new Rectangle(0, 0, 100, 0), 64new Rectangle(0, 0, -100, 10), 65new Rectangle(0, 0, 100, -10) 81Rectangle bounds = new(0, 0, 10, 10); 112Rectangle horizontalBounds = new(0, 0, 100, 10); 113Rectangle verticalBounds = new(0, 0, 10, 100); 139Rectangle Bounds = new(0, 0, 100, 10); 154Rectangle bounds = new(0, 0, 10, 10);
System\Windows\Forms\TreeNodeTests.cs (15)
492yield return new object[] { new RECT(1, 2, 3, 4), new Rectangle(1, 2, 2, 2) }; 494yield return new object[] { new RECT(0, 1, 3, 4), new Rectangle(0, 1, 3, 3) }; 495yield return new object[] { new RECT(1, 0, 3, 4), new Rectangle(1, 0, 2, 4) }; 496yield return new object[] { new RECT(1, 2, 0, 4), new Rectangle(1, 2, -1, 2) }; 497yield return new object[] { new RECT(1, 2, 3, 0), new Rectangle(1, 2, 2, -2) }; 498yield return new object[] { new RECT(0, 0, 3, 4), new Rectangle(0, 0, 3, 4) }; 500yield return new object[] { new RECT(-1, 0, 3, 4), new Rectangle(-1, 0, 4, 4) }; 501yield return new object[] { new RECT(1, -2, 3, 4), new Rectangle(1, -2, 2, 6) }; 502yield return new object[] { new RECT(1, 2, -3, 4), new Rectangle(1, 2, -4, 2) }; 503yield return new object[] { new RECT(1, 2, 3, -4), new Rectangle(1, 2, 2, -6) }; 504yield return new object[] { new RECT(-3, -4, -1, -2), new Rectangle(-3, -4, 2, 2) }; 506yield return new object[] { new RECT(1, 118, 3, 4), new Rectangle(1, 118, 2, -114) }; 507yield return new object[] { new RECT(1, 117, 3, 4), new Rectangle(1, 117, 2, -113) }; 508yield return new object[] { new RECT(94, 2, 3, 4), new Rectangle(94, 2, -91, 2) }; 509yield return new object[] { new RECT(93, 2, 3, 4), new Rectangle(93, 2, -90, 2) };
System\Windows\Forms\TreeViewTests.cs (4)
31Assert.Equal(new Rectangle(0, 0, 121, 97), control.Bounds); 41Assert.Equal(new Rectangle(0, 0, 117, 93), control.ClientRectangle); 57Assert.Equal(new Rectangle(0, 0, 117, 93), control.DisplayRectangle); 5670yield return new object[] { new DrawTreeNodeEventArgs(graphics, new TreeNode(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked) };
System\Windows\Forms\UpDownBaseTests.cs (16)
36Assert.Equal(new Rectangle(0, 0, 120, control.PreferredHeight), control.Bounds); 44Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.ClientRectangle); 45Assert.Equal(new Rectangle(0, 0, 120, Control.DefaultFont.Height + 7), control.DisplayRectangle); 51Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.ClientRectangle); 52Assert.Equal(new Rectangle(0, 0, 116, Control.DefaultFont.Height + 3), control.DisplayRectangle); 1609Bounds = new Rectangle(1, 2, 30, 40) 2756Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2757Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2762Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2763Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle); 2773Assert.Equal(new Rectangle(x, y, width, preferredHeight), control.Bounds); 2788Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.ClientRectangle); 2789Assert.Equal(new Rectangle(0, 0, width, Control.DefaultFont.Height + 7), control.DisplayRectangle); 2794Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.ClientRectangle); 2795Assert.Equal(new Rectangle(0, 0, width - 4, Control.DefaultFont.Height + 3), control.DisplayRectangle); 2805Assert.Equal(new Rectangle(x, y, width, preferredHeight), control.Bounds);
System\Windows\Forms\UserControlTests.cs (3)
41Assert.Equal(new Rectangle(0, 0, 150, 150), control.Bounds); 48Assert.Equal(new Rectangle(0, 0, 150, 150), control.ClientRectangle); 66Assert.Equal(new Rectangle(0, 0, 150, 150), control.DisplayRectangle);
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (128)
119yield return new object[] { new Rectangle(1, 2, 3, 4) }; 120yield return new object[] { new Rectangle(0, 0, 3, 4) }; 121yield return new object[] { new Rectangle(0, 0, 0, 4) }; 122yield return new object[] { new Rectangle(0, 0, -1, 4) }; 123yield return new object[] { new Rectangle(0, 0, 3, 0) }; 124yield return new object[] { new Rectangle(0, 0, 3, -1) }; 125yield return new object[] { new Rectangle(0, 0, 0, 0) }; 126yield return new object[] { new Rectangle(0, 0, -1, -1) }; 127yield return new object[] { new Rectangle(-1, -2, 3, 4) }; 144yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4) }; 145yield return new object[] { new Rectangle(0, 0, 3, 4), new Rectangle(1, 2, 3, 4) }; 146yield return new object[] { new Rectangle(0, 0, 0, 4), new Rectangle(1, 2, 3, 4) }; 147yield return new object[] { new Rectangle(0, 0, -1, 4), new Rectangle(1, 2, 3, 4) }; 148yield return new object[] { new Rectangle(0, 0, 3, 0), new Rectangle(1, 2, 3, 4) }; 149yield return new object[] { new Rectangle(0, 0, 3, -1), new Rectangle(1, 2, 3, 4) }; 150yield return new object[] { new Rectangle(0, 0, 0, 0), new Rectangle(1, 2, 3, 4) }; 151yield return new object[] { new Rectangle(0, 0, -1, -1), new Rectangle(1, 2, 3, 4) }; 152yield return new object[] { new Rectangle(-1, -2, 3, 4), new Rectangle(1, 2, 3, 4) }; 153yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4) }; 154yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, 3, 4) }; 155yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, 0, 4) }; 156yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, -1, 4) }; 157yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, 3, 0) }; 158yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, 3, -1) }; 159yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, 0, 0) }; 160yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(0, 0, -1, -1) }; 161yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(-1, -2, 3, 4) }; 180Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawBackground(null, new Rectangle(1, 2, 3, 4))); 181Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawBackground(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4))); 186yield return new object[] { new Rectangle(1, 2, 3, 4), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 187yield return new object[] { new Rectangle(1, 2, 3, 4), Edges.Top, EdgeStyle.Bump, EdgeEffects.Mono }; 188yield return new object[] { new Rectangle(1, 2, 3, 4), Edges.Left | Edges.Top | Edges.Right | Edges.Bottom | Edges.Diagonal, EdgeStyle.Sunken, EdgeEffects.FillInterior | EdgeEffects.Flat | EdgeEffects.Soft | EdgeEffects.Mono }; 189yield return new object[] { new Rectangle(0, 0, 3, 4), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 190yield return new object[] { new Rectangle(0, 0, 0, 4), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 191yield return new object[] { new Rectangle(0, 0, -1, 4), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 192yield return new object[] { new Rectangle(0, 0, 3, 0), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 193yield return new object[] { new Rectangle(0, 0, 3, -1), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 194yield return new object[] { new Rectangle(0, 0, 0, 0), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 195yield return new object[] { new Rectangle(0, 0, -1, -1), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 196yield return new object[] { new Rectangle(-1, -2, 3, 4), Edges.Left, EdgeStyle.Raised, EdgeEffects.None }; 215Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawEdge(null, new Rectangle(1, 2, 3, 4), Edges.Top, EdgeStyle.Bump, EdgeEffects.FillInterior)); 225Assert.Throws<InvalidEnumArgumentException>("edges", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), edges, EdgeStyle.Bump, EdgeEffects.FillInterior)); 235Assert.Throws<InvalidEnumArgumentException>("style", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, style, EdgeEffects.FillInterior)); 245Assert.Throws<InvalidEnumArgumentException>("effects", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, EdgeStyle.Bump, effects)); 250yield return new object[] { new Rectangle(1, 2, 3, 4) }; 251yield return new object[] { new Rectangle(0, 0, 3, 4) }; 252yield return new object[] { new Rectangle(0, 0, 0, 4) }; 253yield return new object[] { new Rectangle(0, 0, -1, 4) }; 254yield return new object[] { new Rectangle(0, 0, 3, 0) }; 255yield return new object[] { new Rectangle(0, 0, 3, -1) }; 256yield return new object[] { new Rectangle(0, 0, 0, 0) }; 257yield return new object[] { new Rectangle(0, 0, -1, -1) }; 258yield return new object[] { new Rectangle(-1, -2, 3, 4) }; 295Assert.Throws<ArgumentNullException>("g", () => renderer.DrawImage(null, new Rectangle(1, 2, 3, 4), image)); 296Assert.Throws<ArgumentNullException>("g", () => renderer.DrawImage(null, new Rectangle(1, 2, 3, 4), imageList, 0)); 306Assert.Throws<ArgumentNullException>("image", () => renderer.DrawImage(graphics, new Rectangle(1, 2, 3, 4), null)); 316Assert.Throws<ArgumentNullException>("imageList", () => renderer.DrawImage(graphics, new Rectangle(1, 2, 3, 4), null, 0)); 330Assert.Throws<ArgumentOutOfRangeException>("imageIndex", () => renderer.DrawImage(graphics, new Rectangle(1, 2, 3, 4), imageList, imageIndex)); 335yield return new object[] { new Rectangle(1, 2, 3, 4) }; 336yield return new object[] { new Rectangle(0, 0, 3, 4) }; 337yield return new object[] { new Rectangle(0, 0, 0, 4) }; 338yield return new object[] { new Rectangle(0, 0, -1, 4) }; 339yield return new object[] { new Rectangle(0, 0, 3, 0) }; 340yield return new object[] { new Rectangle(0, 0, 3, -1) }; 341yield return new object[] { new Rectangle(0, 0, 0, 0) }; 342yield return new object[] { new Rectangle(0, 0, -1, -1) }; 343yield return new object[] { new Rectangle(-1, -2, 3, 4) }; 362yield return new object[] { new Rectangle(1, 2, 3, 4) }; 363yield return new object[] { new Rectangle(0, 0, 3, 4) }; 364yield return new object[] { new Rectangle(0, 0, 0, 4) }; 365yield return new object[] { new Rectangle(0, 0, -1, 4) }; 366yield return new object[] { new Rectangle(0, 0, 3, 0) }; 367yield return new object[] { new Rectangle(0, 0, 3, -1) }; 368yield return new object[] { new Rectangle(0, 0, 0, 0) }; 369yield return new object[] { new Rectangle(0, 0, -1, -1) }; 370yield return new object[] { new Rectangle(-1, -2, 3, 4) }; 393Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawParentBackground(null, new Rectangle(1, 2, 3, 4), childControl)); 400yield return new object[] { new Rectangle(1, 2, 3, 4), textToDraw }; 401yield return new object[] { new Rectangle(0, 0, 3, 4), textToDraw }; 402yield return new object[] { new Rectangle(0, 0, 0, 4), textToDraw }; 403yield return new object[] { new Rectangle(0, 0, -1, 4), textToDraw }; 404yield return new object[] { new Rectangle(0, 0, 3, 0), textToDraw }; 405yield return new object[] { new Rectangle(0, 0, 3, -1), textToDraw }; 406yield return new object[] { new Rectangle(0, 0, 0, 0), textToDraw }; 407yield return new object[] { new Rectangle(0, 0, -1, -1), textToDraw }; 408yield return new object[] { new Rectangle(-1, -2, 3, 4), textToDraw }; 430yield return new object[] { new Rectangle(1, 2, 3, 4), textToDraw, drawDisabled }; 431yield return new object[] { new Rectangle(0, 0, 3, 4), textToDraw, drawDisabled }; 432yield return new object[] { new Rectangle(0, 0, 0, 4), textToDraw, drawDisabled }; 433yield return new object[] { new Rectangle(0, 0, -1, 4), textToDraw, drawDisabled }; 434yield return new object[] { new Rectangle(0, 0, 3, 0), textToDraw, drawDisabled }; 435yield return new object[] { new Rectangle(0, 0, 3, -1), textToDraw, drawDisabled }; 436yield return new object[] { new Rectangle(0, 0, 0, 0), textToDraw, drawDisabled }; 437yield return new object[] { new Rectangle(0, 0, -1, -1), textToDraw, drawDisabled }; 438yield return new object[] { new Rectangle(-1, -2, 3, 4), textToDraw, drawDisabled }; 461yield return new object[] { new Rectangle(1, 2, 3, 4), textToDraw, drawDisabled, TextFormatFlags.Default }; 462yield return new object[] { new Rectangle(0, 0, 3, 4), textToDraw, drawDisabled, TextFormatFlags.VerticalCenter }; 463yield return new object[] { new Rectangle(0, 0, 0, 4), textToDraw, drawDisabled, TextFormatFlags.Default }; 464yield return new object[] { new Rectangle(0, 0, -1, 4), textToDraw, drawDisabled, TextFormatFlags.Default }; 465yield return new object[] { new Rectangle(0, 0, 3, 0), textToDraw, drawDisabled, TextFormatFlags.Default }; 466yield return new object[] { new Rectangle(0, 0, 3, -1), textToDraw, drawDisabled, TextFormatFlags.Default }; 467yield return new object[] { new Rectangle(0, 0, 0, 0), textToDraw, drawDisabled, TextFormatFlags.Default }; 468yield return new object[] { new Rectangle(0, 0, -1, -1), textToDraw, drawDisabled, TextFormatFlags.Default }; 469yield return new object[] { new Rectangle(-1, -2, 3, 4), textToDraw, drawDisabled, TextFormatFlags.Default }; 491Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text")); 492Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", true)); 493Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", false)); 494Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", true, TextFormatFlags.Default)); 495Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", false, TextFormatFlags.Default));
System\Windows\Forms\WebBrowserTests.cs (3)
31Assert.Equal(new Rectangle(0, 0, 250, 250), control.Bounds); 39Assert.Equal(new Rectangle(0, 0, 250, 250), control.ClientRectangle); 54Assert.Equal(new Rectangle(0, 0, 250, 250), control.DisplayRectangle);
Text\FontMetrics.cs (20)
156{ "Arial", 9.0f, new Rectangle(1, 1, 1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 1, 1, 1) }, 157{ "Arial", 12.0f, new Rectangle(1, 1, 1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 1, 1, 1) }, 158{ "Microsoft Sans Serif", 16.0f, new Rectangle(1, 1, 1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 1, 1, 1) }, 159{ "Times New Roman", 11.0f, new Rectangle(1, 1, 1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 1, 1, 1) }, 160{ "MS Gothic", 10.0f, new Rectangle(1, 1, 1, 1), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 1, 1, 1) }, 161{ "Arial", 9.0f, new Rectangle(1, 1, 100, 100), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 86, 100, 100) }, 162{ "Arial", 12.0f, new Rectangle(1, 1, 100, 100), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 83, 100, 100) }, 163{ "Microsoft Sans Serif", 16.0f, new Rectangle(1, 1, 100, 100), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 75, 100, 100) }, 164{ "Times New Roman", 11.0f, new Rectangle(1, 1, 100, 100), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 84, 100, 100) }, 165{ "MS Gothic", 10.0f, new Rectangle(1, 1, 100, 100), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Rectangle(1, 87, 100, 100) },
TextBoxBaseTests.cs (18)
6537Assert.Equal(new Rectangle(0, 0, width - 4, s_preferredHeight - 4), control.ClientRectangle); 6538Assert.Equal(new Rectangle(0, 0, width - 4, s_preferredHeight - 4), control.DisplayRectangle); 6546Assert.Equal(new Rectangle(x, y, width, s_preferredHeight), control.Bounds); 6558Assert.Equal(new Rectangle(0, 0, width - 4, s_preferredHeight - 4), control.ClientRectangle); 6559Assert.Equal(new Rectangle(0, 0, width - 4, s_preferredHeight - 4), control.DisplayRectangle); 6567Assert.Equal(new Rectangle(x, y, width, s_preferredHeight), control.Bounds); 6671Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.ClientRectangle); 6672Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.DisplayRectangle); 6680Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 6692Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.ClientRectangle); 6693Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.DisplayRectangle); 6701Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 6787Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.ClientRectangle); 6788Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.DisplayRectangle); 6796Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 6808Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.ClientRectangle); 6809Assert.Equal(new Rectangle(0, 0, width - 4, height - 4), control.DisplayRectangle); 6817Assert.Equal(new Rectangle(x, y, width, height), control.Bounds);
TextBoxTests.cs (3)
38Assert.Equal(new Rectangle(0, 0, 100, control.PreferredHeight), control.Bounds); 47Assert.Equal(new Rectangle(0, 0, 96, control.PreferredHeight - 4), control.ClientRectangle); 63Assert.Equal(new Rectangle(0, 0, 96, control.PreferredHeight - 4), control.DisplayRectangle);
TrackBarTests.cs (10)
32Assert.Equal(new Rectangle(0, 0, 104, s_dimension), control.Bounds); 40Assert.Equal(new Rectangle(0, 0, 104, s_dimension), control.ClientRectangle); 56Assert.Equal(new Rectangle(0, 0, 104, s_dimension), control.DisplayRectangle); 2997Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 2998Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 3006Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 3018Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 3019Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 3027Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 3245Rectangle rectangle = new(rectX, rectY, rectWidth, rectHeight);
WebBrowserBaseTests.cs (25)
74control.Bounds = new Rectangle(x, y, width, height); 76Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 77Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 85Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 93control.Bounds = new Rectangle(x, y, width, height); 95Assert.Equal(new Rectangle(0, 0, width, height), control.ClientRectangle); 96Assert.Equal(new Rectangle(0, 0, width, height), control.DisplayRectangle); 104Assert.Equal(new Rectangle(x, y, width, height), control.Bounds); 190control.Bounds = new Rectangle(x, y, width, height); 192Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 193Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 201Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 212control.Bounds = new Rectangle(x, y, width, height); 214Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.ClientRectangle); 215Assert.Equal(new Rectangle(0, 0, expectedWidth, expectedHeight), control.DisplayRectangle); 223Assert.Equal(new Rectangle(x, y, expectedWidth, expectedHeight), control.Bounds); 656yield return new object[] { new Rectangle(0, 0, 1, 1) }; 657yield return new object[] { new Rectangle(0, 0, 10, 10) }; 658yield return new object[] { new Rectangle(2, 3, 10, 15) }; 659yield return new object[] { new Rectangle(2, 3, 15, 10) }; 660yield return new object[] { new Rectangle(0, 0, 100, 150) }; 706Assert.Throws<ArgumentNullException>("bitmap", () => control.DrawToBitmap(null, new Rectangle(1, 2, 3, 4))); 724Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(x, y, width, height))); 738Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 752Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4)));
System.Windows.Forms.UI.IntegrationTests (2)
Infra\ScreenRecordService.cs (2)
238var bounds = new Rectangle(0, 0, width, height); 324var cropArea = new Rectangle(firstChangedColumn, firstChangedLine, lastChangedColumn - firstChangedColumn + 1, lastChangedLine - firstChangedLine + 1);
WinFormsControlsTest (5)
CustomComCtl32Button.cs (5)
104path.AddArc(new Rectangle(x, y, radius, radius), 180, 90); 107path.AddArc(new Rectangle(width, y, radius, radius), 270, 90); 110path.AddArc(new Rectangle(width, height, radius, radius), 0, 90); 113path.AddArc(new Rectangle(x, height, radius, radius), 90, 90); 116path.AddArc(new Rectangle(x, y, radius, radius), 180, 90);