3612 instantiations of 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 (499)
DrawingTest.cs (1)
14BitmapData data = bitmap.LockBits(new Rectangle(default, bitmap.Size), ImageLockMode.ReadWrite, bitmap.PixelFormat);
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 (69)
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); 2876Rectangle arcrect = new(baserect.Location, new Size(d, d)); 2917Rectangle baserect = new(0, 0, 19, 19); 2918Rectangle arcrect = new(baserect.Location, new Size(d, d));
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 (40)
252VerifyGraphics(graphics, new Rectangle(Point.Empty, image.Size)); 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\Effects\EffectsTests.cs (1)
13graphics.FillRectangle(Brushes.White, new(default, bitmap.Size));
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 (366)
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 (10)
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( 8740PrintToMetaFileRecursive(hDC, lParam, new Rectangle(Point.Empty, Size)); 8757Rectangle clientBounds = new(clientOffset, ClientSize);
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\CheckBoxRenderer.cs (4)
58Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state)); 79Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 123Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state, hwnd)); 192Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state));
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
277return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (4)
60Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 80glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 130glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 219glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd));
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (8)
35_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1)); 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 (26)
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, 18821Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18831Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 18838Invalidate(new Rectangle(new Point(0, -pt.Y), 18845Invalidate(new Rectangle(new Point(0, ColumnHeadersHeight), 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 (6)
833Rectangle rect = new Rectangle 1011cellBounds = new Rectangle(new Point(0, 0), GetSize(rowIndex)); 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\DataGridView\DataGridViewUtilities.cs (1)
346return new Rectangle(GetTextLocation(cellBounds, sizeConstraint, flags, cellStyle), sizeConstraint);
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 (3)
902return new Rectangle(xLoc, yLoc, pointImageSize.Width, pointImageSize.Height); 1357ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter); 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.IKeyboardToolTip.cs (3)
103_ => new Rectangle(point, new Size(itemBounds.Width, itemBounds.Height)), 112return new Rectangle( 131return new Rectangle(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
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\ToolStrip.cs (3)
3872Rectangle comparisonRect = new(point, s_onePixel); 4069item.SetBounds(new Rectangle(location, item.Size)); 4510cursorLocation = WindowsFormsUtils.ConstrainToScreenBounds(new Rectangle(cursorLocation, s_onePixel)).Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (4)
995Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1006dropDownBounds = new Rectangle(parentClientPoint, suggestedBounds.Size); 1023Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize()); 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\ToolStripDropDownItem.cs (3)
141Rectangle ownerItemBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 379Rectangle dropDownBounds = new(Point.Empty, DropDown.GetSuggestedSize()); 384Rectangle itemScreenBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (10)
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); 421_textRectangle = new Rectangle(nextPoint, maxTextSize); 426_arrowRectangle = new Rectangle(nextPoint, maxArrowSize); 456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y; 798UpScrollButton.SetBounds(new Rectangle(upLocation, upSize)); 804DownScrollButton.SetBounds(new Rectangle(downLocation, downSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (15)
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)); 135Rectangle bounds = new(Point.Empty, e.Item.Size); 187Rectangle bounds = new(Point.Empty, menuItem.Size); 208DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 258Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 287Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 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)); 350Rectangle bounds = new(Point.Empty, e.Item.Size); 410Rectangle bounds = new(Point.Empty, e.Item.Size); 442Rectangle bounds = new(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2371ParentInternal?.Invalidate(new Rectangle(rectangleLocation, r.Size), true); 3255=> SetBounds(new Rectangle(x, y, width, height));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
304return new Rectangle(Owner.ParentInternal.PointToScreen(bounds.Location), bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
99Rectangle bounds = new(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (5)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 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 (43)
168overflowArrowRect = new Rectangle(0, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 172overflowArrowRect = new Rectangle(item.Width - _overflowButtonWidth, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 230Rectangle bounds = new(Point.Empty, item.Size); 248RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 266Rectangle bounds = new(Point.Empty, item.Size); 322ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width, item.Height), item.BorderStyle, (Border3DSide)item.BorderSides); 347Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 417Rectangle bounds = new(Point.Empty, toolStrip.Size); 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); 546Rectangle bounds = new(Point.Empty, item.Size); 769e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 846Rectangle bounds = new(Point.Empty, toolStrip.Size); 860Rectangle topLeftParentHorizontalPixels = new(topLeft, s_onePix); 861Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1)); 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); 1108Rectangle bounds = new(Point.Empty, item.Size); 1134g.FillRectangle(brush, new Rectangle(Point.Empty, control.Size)); 1141Rectangle gradientBounds = new(Point.Empty, parent.Size); 1150g.FillRectangle(b, new Rectangle(Point.Empty, control.Size)); 1155Rectangle gradientBounds = new(Point.Empty, control.Size); 1174Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1183Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1195Rectangle bounds = new(Point.Empty, toolStripDropDown.Size); 1217Rectangle overflowBoundsFill = new(Point.Empty, e.Item.Size); 1321Rectangle fillRect = new(overflowBoundsFill.X - 1, 0, 1, 1); 1338Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1354Rectangle topLeftShadowRect = new(topLeft, s_onePix); 1358Rectangle topLeftShadowRect2 = new(topLeft, s_onePix); 1362Rectangle topRightShadowRect = new(topRight, s_onePix); 1392g.FillRectangle(brush, new Rectangle(gradientCopyPixel, s_onePix)); 1396Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1567Rectangle bounds = new(Point.Empty, item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
797e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 882TextRenderer.DrawText(textGraphics, text, textFont, new Rectangle(Point.Empty, textSize), textColor, textFormat); 1040new Rectangle(0, 0, size.Width, size.Height),
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (2)
109Rectangle itemBounds = new(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size); 125return new Rectangle(itemBounds.X + 1, 0, itemBounds.Width - 2, 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (4)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight)); 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 (10)
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)); 495Rectangle itemBounds = new(itemLocation, itemSize); 517item.SetBounds(new Rectangle(itemLocation, itemSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (11)
279Rectangle bounds = new(Point.Empty, e.GripBounds.Size); 388vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 394DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 421Rectangle bounds = new(Point.Empty, item.Size); 444Rectangle fillRect = new(Point.Empty, item.Size); 490RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 499ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width - 1, item.Height - 1), item.BorderStyle, (Border3DSide)item.BorderSides); 530Rectangle bounds = new(Point.Empty, splitButton.Size); 656vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 668RenderSmall3DBorderInternal(g, new Rectangle(Point.Empty, item.Size), state, (item.RightToLeft == RightToLeft.Yes)); 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 (2)
2830bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height)); 3151Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (6)
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); 837Rectangle clientArea = new(Point.Empty, ClientSize); 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 (8)
99Rectangle newBounds = new(location, newSize); 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 (4)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints); 76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 86Rectangle rowBounds = new(displayRect.X, 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
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\Panel.cs (1)
234ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
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 (13)
268new Rectangle(0, 0, width, height), 476Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 490Rectangle partOfImageToDraw = new( 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\Rendering\TextRenderer.cs (1)
287=> DrawTextInternal(dc, text, font, new Rectangle(pt, MaxSize), foreColor, backColor, flags);
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 (124)
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 (5)
279ActionPanel.Invalidate(new Rectangle(EditRegionLocation, EditRegionSize), false); 294Rectangle rect = new(1, 1, width - 2, height - 2); 297swatchGraphics.DrawRectangle(SystemPens.ControlDark, new Rectangle(0, 0, width - 1, height - 1)); 344Rectangle editorBounds = new(Point.Empty, EditRegionSize); 368Rectangle editorBounds = new(Point.Empty, EditRegionSize);
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\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
290Rectangle editRect = new(EditRegionRelativeLocation, EditRegionSize);
System\ComponentModel\Design\DesignerActionUI.cs (2)
616if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point)) 656Rectangle rectGlyph = new(glyphLocationScreenCoord, glyph.Bounds.Size);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
363Rectangle rect = new()
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\BehaviorService.cs (1)
302return new Rectangle(loc, c.Size);
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 (6)
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); 689Rectangle currentBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1087Rectangle dragBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 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\ToolStripPanelSelectionBehavior.cs (1)
119Rectangle translatedBounds = new(loc, parent.Size);
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 (3)
1338Rectangle rect = new Rectangle 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 (3)
2118Rectangle controlScreenBounds = new(parent.PointToScreen(Control.Location), Control.Size); 2119Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize); 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\DesignBindingPicker.cs (1)
1863Rectangle rect = new(ClientRectangle.Location, ClientRectangle.Size);
System\Windows\Forms\Design\DesignerFrame.cs (1)
466Rectangle invalidateRect = new(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size);
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\DocumentDesigner.cs (1)
513Rectangle translatedBounds = new(loc, ((Control)Component).Size);
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 (9)
1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 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 (5)
970Rectangle bounds = new(startingPoint, Table.DisplayRectangle.Size); 1076Rectangle bounds = new(loc, Table.DisplayRectangle.Size); 1079Rectangle checkBounds = new(controlLoc, Control.ClientSize); // Can't use Control.Size since that will include any scrollbar 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\ToolStripDesigner.cs (1)
1369Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
991parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1014ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (13)
1307Rectangle translatedBounds = new(loc, _miniToolStrip.Size); 1871Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1873Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1886Rectangle bounds = new(Point.Empty, item.Size); 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); 1982Rectangle bounds = new(Point.Empty, splitButton.Size); 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 (2570)
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 (4)
77bounds: new Rectangle(41, 5, 20, 12), 114bounds: new Rectangle(3, 0, 20, 12), 148bounds: new Rectangle(3, 0, 20, 12), 152? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
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 (549)
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); 9783Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9784Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9786Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 9793Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9794Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9796Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 9817Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9818Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9826Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9833Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9834Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9842Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9865Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9866Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9874Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 9884Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 9885Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 9893Assert.Equal(new Rectangle(Point.Empty, expectedSize), 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 (247)
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); 3338Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3339Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3341Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 3348Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3349Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3351Assert.Equal(new Rectangle(Point.Empty, value), control.Bounds); 3382Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3383Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3391Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3398Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3399Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3407Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3445Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3446Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3454Assert.Equal(new Rectangle(Point.Empty, expectedSize), control.Bounds); 3464Assert.Equal(new Rectangle(Point.Empty, value), control.ClientRectangle); 3465Assert.Equal(new Rectangle(Point.Empty, value), control.DisplayRectangle); 3473Assert.Equal(new Rectangle(Point.Empty, expectedSize), 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 (13)
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) }; 398Assert.Throws<ArgumentNullException>("graphics", () => cursor.Draw(null, new Rectangle(Point.Empty, cursor.Size))); 408Assert.Throws<ArgumentException>(() => cursor.Draw(graphics, new Rectangle(Point.Empty, cursor.Size))); 435Assert.Throws<ArgumentNullException>("graphics", () => cursor.DrawStretched(null, new Rectangle(Point.Empty, cursor.Size))); 445Assert.Throws<ArgumentException>(() => cursor.DrawStretched(graphics, new Rectangle(Point.Empty, cursor.Size)));
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 (13)
2527Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2528Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2530Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2536Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2537Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2539Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2560Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2561Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2563Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 2572Assert.Equal(new Rectangle(Point.Empty, size), control.ClientRectangle); 2573Assert.Equal(new Rectangle(Point.Empty, size), control.DisplayRectangle); 2575Assert.Equal(new Rectangle(Point.Empty, size), control.Bounds); 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 (3)
71bounds: new Rectangle(41, 5, 20, 12), 137bounds: new Rectangle(3, 0, 20, 12), 141? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
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 (46)
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); 2419Assert.Equal(new Rectangle(expectedDisplayRectangleLocation, child.ExpectedSize.Size), child.Bounds); 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) }; 2552public Rectangle ExpectedSize => new(new Point(0, 0), DefaultSize);
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 (6)
44? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 74? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 78bounds: new Rectangle(6, 3, 16, 12), 101Rectangle textBounds = new(10, 20, 30, 40); 110? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 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\ToolStripGripRenderEventArgsTests.cs (1)
50Assert.Equal(new Rectangle(Point.Empty, toolStrip.Size), e.AffectedBounds);
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 (58)
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); 6705Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6706Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 6757Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6758Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 7020Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7027Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7069Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7079Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds);
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 (4)
DragDropTests.cs (1)
720_dragBoxFromMouseDown = new Rectangle(
Infra\ScreenRecordService.cs (2)
238var bounds = new Rectangle(0, 0, width, height); 324var cropArea = new Rectangle(firstChangedColumn, firstChangedLine, lastChangedColumn - firstChangedColumn + 1, lastChangedLine - firstChangedLine + 1);
Infra\ScreenshotService.cs (1)
75Rectangle bounds = new(Cursor.Position - (Size)cursor.HotSpot, cursor.Size);
WinFormsControlsTest (7)
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);
ListViewTest.cs (1)
57Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
MultipleControls.cs (1)
22Bounds = new Rectangle(new Point(0, 0), new Size(400, 200)),
4017 references to Rectangle
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
56typeof(Rectangle),
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
193Rectangle.Empty,
netstandard (1)
netstandard.cs (1)
751[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
PresentationCore.Tests (1)
BinaryFormat\BinaryFormattedTypes.cs (1)
57typeof(Rectangle),
PresentationUI (8)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (2)
994Rectangle clipBounds, Rectangle cellBounds, int rowIndex,
MS\Internal\Documents\SignatureSummaryDialog.cs (6)
609Rectangle bounds, 656Rectangle iconRect = new Rectangle( 666Rectangle statusRect = new Rectangle( 674Rectangle intentRect = new Rectangle( 701Rectangle signByRect = new Rectangle( 709Rectangle localeRect = new Rectangle(
System.ComponentModel.TypeConverter (3)
System\Drawing\RectangleConverter.cs (3)
63if (value is Rectangle rect) 84ConstructorInfo? ctor = typeof(Rectangle).GetConstructor(new Type[] { 123PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(Rectangle), attributes);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
177typeof(Rectangle),
System.Drawing (1)
System.Drawing.cs (1)
138[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
System.Drawing.Common (98)
Special\NotSupported.cs (98)
27public System.Drawing.Bitmap Clone(System.Drawing.Rectangle rect, System.Drawing.Imaging.PixelFormat format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 38public System.Drawing.Imaging.BitmapData LockBits(System.Drawing.Rectangle rect, System.Drawing.Imaging.ImageLockMode flags, System.Drawing.Imaging.PixelFormat format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 39public System.Drawing.Imaging.BitmapData LockBits(System.Drawing.Rectangle rect, System.Drawing.Imaging.ImageLockMode flags, System.Drawing.Imaging.PixelFormat format, System.Drawing.Imaging.BitmapData bitmapData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 228public System.Drawing.BufferedGraphics Allocate(System.Drawing.Graphics targetGraphics, System.Drawing.Rectangle targetRectangle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 229public System.Drawing.BufferedGraphics Allocate(System.IntPtr targetDC, System.Drawing.Rectangle targetRectangle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 454public System.Drawing.Drawing2D.GraphicsContainer BeginContainer(System.Drawing.Rectangle dstrect, System.Drawing.Rectangle srcrect, System.Drawing.GraphicsUnit unit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 462public void DrawArc(System.Drawing.Pen pen, System.Drawing.Rectangle rect, float startAngle, float sweepAngle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 482public void DrawEllipse(System.Drawing.Pen pen, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 486public void DrawIcon(System.Drawing.Icon icon, System.Drawing.Rectangle targetRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 488public void DrawIconUnstretched(System.Drawing.Icon icon, System.Drawing.Rectangle targetRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 497public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 498public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 499public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 500public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback, int callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 501public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 502public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 503public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 504public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 505public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 506public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 507public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 508public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 509public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 510public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 514public void DrawImage(System.Drawing.Image image, int x, int y, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 520public void DrawImageUnscaled(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 523public void DrawImageUnscaledAndClipped(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 531public void DrawPie(System.Drawing.Pen pen, System.Drawing.Rectangle rect, float startAngle, float sweepAngle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 537public void DrawRectangle(System.Drawing.Pen pen, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 541public void DrawRectangles(System.Drawing.Pen pen, System.Drawing.Rectangle[] rects) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 552public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 553public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 554public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 570public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 571public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 572public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 573public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 574public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 575public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 576public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 577public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 578public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 585public void ExcludeClip(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 593public void FillEllipse(System.Drawing.Brush brush, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 598public void FillPie(System.Drawing.Brush brush, System.Drawing.Rectangle rect, float startAngle, float sweepAngle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 605public void FillRectangle(System.Drawing.Brush brush, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 610public void FillRectangles(System.Drawing.Brush brush, System.Drawing.Rectangle[] rects) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 631public void IntersectClip(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 636public bool IsVisible(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 669public void SetClip(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 670public void SetClip(System.Drawing.Rectangle rect, System.Drawing.Drawing2D.CombineMode combineMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1030public Region(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1034public void Complement(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1040public void Exclude(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1050public void Intersect(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1059public bool IsVisible(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1060public bool IsVisible(System.Drawing.Rectangle rect, System.Drawing.Graphics? g) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1077public void Union(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1081public void Xor(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1334public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode, System.Drawing.Rectangle dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1336public TextureBrush(System.Drawing.Image image, System.Drawing.Rectangle dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1337public TextureBrush(System.Drawing.Image image, System.Drawing.Rectangle dstRect, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1511public void AddArc(System.Drawing.Rectangle rect, float startAngle, float sweepAngle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1531public void AddEllipse(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1542public void AddPie(System.Drawing.Rectangle rect, float startAngle, float sweepAngle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1547public void AddRectangle(System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1550public void AddRectangles(System.Drawing.Rectangle[] rects) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1553public void AddString(string s, System.Drawing.FontFamily family, int style, float emSize, System.Drawing.Rectangle layoutRect, System.Drawing.StringFormat? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1708public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.Color color1, System.Drawing.Color color2, System.Drawing.Drawing2D.LinearGradientMode linearGradientMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1709public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.Color color1, System.Drawing.Color color2, float angle) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1710public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.Color color1, System.Drawing.Color color2, float angle, bool isAngleScaleable) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1771public Matrix(System.Drawing.Rectangle rect, System.Drawing.Point[] plgpts) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2540public Metafile(System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2541public Metafile(System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2542public Metafile(System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2543public Metafile(System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? desc) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2552public Metafile(System.IO.Stream stream, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2553public Metafile(System.IO.Stream stream, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2554public Metafile(System.IO.Stream stream, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2555public Metafile(System.IO.Stream stream, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2564public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2565public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2566public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2567public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2568public Metafile(string fileName, System.IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, string? description) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2596public System.Drawing.Rectangle Bounds { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 2747public System.Drawing.Rectangle Bounds { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 3126public static System.Drawing.Rectangle Convert(System.Drawing.Rectangle value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 3140public PrintPageEventArgs(System.Drawing.Graphics? graphics, System.Drawing.Rectangle marginBounds, System.Drawing.Rectangle pageBounds, System.Drawing.Printing.PageSettings pageSettings) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 3144public System.Drawing.Rectangle MarginBounds { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 3145public System.Drawing.Rectangle PageBounds { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
System.Drawing.Common.Tests (132)
Helpers.cs (3)
87internal static Rectangle GetWindowDCRect(HDC hdc) => GetHWndRect(PInvokeCore.WindowFromDC(hdc)); 89internal static Rectangle GetHWndRect(HWND hwnd) 100private static Rectangle GetMonitorRectForWindow(HWND hwnd)
mono\System.Drawing\BitmapTests.cs (5)
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); 319Rectangle rect = new(0, 0, 50, 50);
mono\System.Drawing\GraphicsTests.cs (24)
850Rectangle[] rects = [ 887Rectangle[] rects = [ 1143Assert.Throws<ArgumentNullException>(() => g.FillRectangles(null, new Rectangle[1])); 1151Assert.Throws<ArgumentNullException>(() => g.FillRectangles(Brushes.Red, (Rectangle[])null)); 1159Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<Rectangle>())); 1193Rectangle rect = new(5, 5, 10, 10); 1214Rectangle rect = new(5, 5, 10, 10); 1378Rectangle rect = new(5, 5, 10, 10); 2086Rectangle rect = Rectangle.Empty; 2103Rectangle rect = Rectangle.Empty; 2591Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, default(Rectangle), default, GraphicsUnit.Display)); 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); 2875Rectangle baserect = new(0, 0, 19, 19); 2876Rectangle arcrect = new(baserect.Location, new Size(d, d)); 2917Rectangle baserect = new(0, 0, 19, 19); 2918Rectangle arcrect = new(baserect.Location, new Size(d, d));
mono\System.Imaging\MetafileTest.cs (1)
221Metafile mf = new(hdc, default(Rectangle));
System\Drawing\BitmapTests.cs (4)
367public void Clone_Rectangle_ReturnsExpected(Bitmap bitmap, Rectangle rectangle, PixelFormat targetFormat) 403public void Clone_RectangleF_ReturnsExpected(Bitmap bitmap, Rectangle rectangle, PixelFormat format) 1062public void LockBits_Invoke_Success(Bitmap bitmap, Rectangle rectangle, ImageLockMode lockMode, PixelFormat pixelFormat, int expectedStride, int expectedReserved) 1095AssertExtensions.Throws<ArgumentNullException>("bitmapData", () => bitmap.LockBits(Rectangle.Empty, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, null));
System\Drawing\BufferedGraphicsContextTests.cs (9)
23using BufferedGraphics bufferedGraphics = context.Allocate(graphics, Rectangle.Empty); 62using (BufferedGraphics bufferedGraphics = context.Allocate(hdc, Rectangle.Empty)) 130using BufferedGraphics graphics = context.Allocate(null, Rectangle.Empty); 150Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1); 152AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, Rectangle.Empty)); 165Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1); 167Assert.Throws<InvalidOperationException>(() => context.Allocate(graphics, Rectangle.Empty)); 231using (context.Allocate(graphics, Rectangle.Empty)) 243using (context.Allocate(graphics, Rectangle.Empty))
System\Drawing\BufferedGraphicsTests.cs (1)
119using BufferedGraphics graphics = context.Allocate(null, Rectangle.Empty);
System\Drawing\Drawing2D\GraphicsPathTests.cs (7)
758Rectangle[] rectInt = [new(1, 1, 2, 2), new(3, 3, 4, 4)]; 777Rectangle[] rectInt = [ 807AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((Rectangle[])null)); 1140Rectangle rectangle = new(10, 10, 100, 100); 1316gp.Warp([new(0, 0)], default(Rectangle), null); 1723Rectangle rectangle, float penWidth, RectangleF expectedBounds) 1939Rectangle[] rects = [new(1, 2, 3, 4), new(5, 6, 7, 8)];
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (6)
83public void Ctor_Rectangle_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2, LinearGradientMode linearGradientMode) 100public void Ctor_RectangleF_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2, LinearGradientMode linearGradientMode) 126public void Ctor_Rectangle_Color_Color_Angle(Rectangle rectangle, Color color1, Color color2, float angle) 143public void Ctor_RectangleF_Color_Color_Angle(Rectangle rectangle, Color color1, Color color2, float angle) 169public void Ctor_Rectangle_Color_Color_Angle_IsAngleScalable(Rectangle rectangle, Color color1, Color color2, float angle, bool isAngleScalable) 186public void Ctor_RectangleF_Color_Color_Angle_IsAngleScalable(Rectangle rectangle, Color color1, Color color2, float angle, bool isAngleScalable)
System\Drawing\Drawing2D\MatrixTests.cs (2)
105public void Ctor_Rectangle_Points(Rectangle rect, Point[] plgpnts, float[] expectedElements, bool isIdentity, bool isInvertible) 117public void Ctor_RectangleF_Points(Rectangle rect, Point[] plgpnts, float[] expectedElements, bool isIdentity, bool isInvertible)
System\Drawing\GraphicsTests.cs (13)
85Rectangle expected = Helpers.GetWindowDCRect(hdc); 94Rectangle expected = Helpers.GetWindowDCRect(hdc); 103Rectangle expected = Helpers.GetWindowDCRect(hdc); 218Rectangle expected = Helpers.GetHWndRect((HWND)hwnd); 227Rectangle expected = Helpers.GetHWndRect((HWND)hwnd); 1562Rectangle drawnRect = new(destinationX, destinationY, width, height); 2098AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new Rectangle[2])); 2110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2120AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (Rectangle[])null)); 2130AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>())); 2143Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangles(pen, new Rectangle[2])); 2160AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2834Rectangle rect = new(10, 10, 50, 50);
System\Drawing\IconConverterTests.cs (6)
41Assert.False(_icoConv.CanConvertFrom(null, typeof(Rectangle)), "Rectangle"); 54Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(Rectangle)), "TD Rectangle"); 77Assert.False(_icoConv.CanConvertTo(null, typeof(Rectangle)), "Rectangle"); 95Assert.False(_icoConvFrmTD.CanConvertTo(null, typeof(Rectangle)), "TD Rectangle"); 144Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Rectangle))); 161Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(Rectangle)));
System\Drawing\ImageConverterTests.cs (6)
67Assert.False(_imgConv.CanConvertFrom(null, typeof(Rectangle)), "Rectangle"); 80Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(Rectangle)), "TD Rectangle"); 99Assert.False(_imgConv.CanConvertTo(null, typeof(Rectangle)), "Rectangle"); 113Assert.False(_imgConvFrmTD.CanConvertTo(null, typeof(Rectangle)), "TD Rectangle"); 197Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle))); 206Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle)));
System\Drawing\Imaging\ImageAttributesTests.cs (1)
32private readonly Rectangle _rectangle = new(0, 0, 64, 64);
System\Drawing\Imaging\MetafileTests.cs (1)
34private readonly Rectangle _rectangle = new(0, 0, 64, 64);
System\Drawing\Printing\PreviewPrintControllerTests.cs (10)
22PrintPageEventArgs printEventArgs = new(null, Rectangle.Empty, Rectangle.Empty, new PageSettings()); 36PrintPageEventArgs e = new(null, Rectangle.Empty, Rectangle.Empty, null); 55PrintPageEventArgs printEventArgs = new(null, Rectangle.Empty, Rectangle.Empty, null); 64PrintPageEventArgs e = new(null, Rectangle.Empty, Rectangle.Empty, null); 73controller.OnEndPage(document, new PrintPageEventArgs(null, Rectangle.Empty, Rectangle.Empty, null));
System\Drawing\Printing\PrintControllerTests.cs (6)
22PrintPageEventArgs printEventArgs = new(null, Rectangle.Empty, Rectangle.Empty, null); 37Assert.Null(controller.OnStartPage(document, new PrintPageEventArgs(null, Rectangle.Empty, Rectangle.Empty, null))); 46controller.OnEndPage(document, new PrintPageEventArgs(null, Rectangle.Empty, Rectangle.Empty, null));
System\Drawing\Printing\PrinterUnitConvertTests.cs (1)
99var converted = PrinterUnitConvert.Convert(new Rectangle(100, 1000, 100, 1000), fromUnit, toUnit);
System\Drawing\RegionTests.cs (12)
56Rectangle rectangle = new(x, y, width, height); 199path2.AddRectangle(Rectangle.Empty); 475Rectangle rect1 = new(20, 30, 60, 80); 476Rectangle rect2 = new(50, 40, 60, 80); 520AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(Rectangle))); 903AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(Rectangle))); 1047Rectangle smaller = new(5, 5, -10, -10); 1260AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(Rectangle))); 1308yield return new object[] { new Region(), Rectangle.Empty, false }; 1325public void IsVisible_Rectangle_ReturnsExpected(Region region, Rectangle rectangle, bool expected) 1799AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(Rectangle))); 2157AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(Rectangle)));
System\Drawing\TextureBrushTests.cs (14)
87public void Ctor_Image_Rectangle(Image image, Rectangle rectangle) 108public void Ctor_Image_RectangleF(Image image, Rectangle rectangle) 141public void Ctor_Image_WrapMode_Rectangle(Image image, WrapMode wrapMode, Rectangle rectangle) 162public void Ctor_Image_WrapMode_RectangleF(Image image, WrapMode wrapMode, Rectangle rectangle) 196public void Ctor_Image_Rectangle_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 218public void Ctor_Image_RectangleF_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 244AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty)); 246AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty, null)); 248AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, Rectangle.Empty)); 260AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty)); 262AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty, null)); 264AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty)); 275Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, Rectangle.Empty)); 289Rectangle rectangle = new(x, y, width, height);
System.Drawing.Primitives (59)
System\Drawing\Rectangle.cs (51)
15public struct Rectangle : IEquatable<Rectangle> 17public static readonly Rectangle Empty; 25/// Initializes a new instance of the <see cref='System.Drawing.Rectangle'/> class with the specified location 48/// Creates a new <see cref='System.Drawing.Rectangle'/> with the specified location and size. 50public static Rectangle FromLTRB(int left, int top, int right, int bottom) => 55/// <see cref='System.Drawing.Rectangle'/>. 69/// Gets or sets the size of this <see cref='System.Drawing.Rectangle'/>. 84/// <see cref='System.Drawing.Rectangle'/>. 94/// <see cref='System.Drawing.Rectangle'/>. 103/// Gets or sets the width of the rectangular region defined by this <see cref='System.Drawing.Rectangle'/>. 112/// Gets or sets the width of the rectangular region defined by this <see cref='System.Drawing.Rectangle'/>. 122/// <see cref='System.Drawing.Rectangle'/> . 129/// <see cref='System.Drawing.Rectangle'/>. 136/// <see cref='System.Drawing.Rectangle'/>. 143/// <see cref='System.Drawing.Rectangle'/>. 149/// Tests whether this <see cref='System.Drawing.Rectangle'/> has a <see cref='System.Drawing.Rectangle.Width'/> 150/// or a <see cref='System.Drawing.Rectangle.Height'/> of 0. 156/// Tests whether <paramref name="obj"/> is a <see cref='System.Drawing.Rectangle'/> with the same location 159public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is Rectangle && Equals((Rectangle)obj); 161public readonly bool Equals(Rectangle other) => this == other; 164/// Tests whether two <see cref='System.Drawing.Rectangle'/> objects have equal location and size. 166public static bool operator ==(Rectangle left, Rectangle right) => 170/// Tests whether two <see cref='System.Drawing.Rectangle'/> objects differ in location or size. 172public static bool operator !=(Rectangle left, Rectangle right) => !(left == right); 177public static Rectangle Ceiling(RectangleF value) 192public static Rectangle Truncate(RectangleF value) 207public static Rectangle Round(RectangleF value) 221/// <see cref='System.Drawing.Rectangle'/> . 227/// <see cref='System.Drawing.Rectangle'/> . 233/// rectangular region represented by this <see cref='System.Drawing.Rectangle'/> . 235public readonly bool Contains(Rectangle rect) => 242/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 257/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 262/// Creates a <see cref='System.Drawing.Rectangle'/> that is inflated by the specified amount. 264public static Rectangle Inflate(Rectangle rect, int x, int y) 266Rectangle r = rect; 274public void Intersect(Rectangle rect) 276Rectangle result = Intersect(rect, this); 288public static Rectangle Intersect(Rectangle a, Rectangle b) 306public readonly bool IntersectsWith(Rectangle rect) => 313public static Rectangle Union(Rectangle a, Rectangle b) 341/// Converts the attributes of this <see cref='System.Drawing.Rectangle'/> to a human readable string.
System\Drawing\RectangleF.cs (8)
206/// <see cref='System.Drawing.Rectangle'/> . 212/// <see cref='System.Drawing.Rectangle'/> . 218/// the rectangular region represented by this <see cref='System.Drawing.Rectangle'/> . 229/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 240/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 245/// Creates a <see cref='System.Drawing.Rectangle'/> that is inflated by the specified amount. 320/// Converts the specified <see cref='System.Drawing.Rectangle'/> to a 323public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.X, r.Y, r.Width, r.Height);
System.Private.Windows.Core (9)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (4)
151/// Writes a <see cref="Rectangle"/> in binary format. 153public static void WriteRectangle(Stream stream, Rectangle value) 158new ClassInfo(1, typeof(Rectangle).FullName!, s_rectangleMemberNames), 744case Rectangle rectangle:
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (2)
155/// Tries to get this object as a <see cref="Rectangle"/>. 166|| !classInfo.TypeNameMatches(typeof(Rectangle))
Windows\Win32\Foundation\RECT.cs (1)
16public override readonly string ToString() => ((Rectangle)this).ToString();
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (1)
27public Rectangle PaintRectangle => _paintStruct.rcPaint;
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
28public RegionScope(Rectangle rectangle) =>
System.Private.Windows.GdiPlus (5)
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (1)
15Rectangle rect,
Windows\Win32\Graphics\GdiPlus\Rect.cs (4)
11public static implicit operator Rectangle(Rect rect) => Unsafe.As<Rect, Rectangle>(ref rect); 12public static implicit operator Rect(Rectangle rectangle) => Unsafe.As<Rectangle, Rect>(ref rectangle);
System.Windows.Forms (2022)
System\Drawing\Design\PaintValueEventArgs.cs (4)
20/// <param name="bounds">The <see cref="Rectangle"/> that indicates the area in which the drawing should be done.</param> 21public PaintValueEventArgs(ITypeDescriptorContext? context, object? value, Graphics graphics, Rectangle bounds) 30/// <see cref="Rectangle"/> outlining the area in which the painting should be done. 32public Rectangle Bounds { get; }
System\Drawing\Design\UITypeEditor.cs (2)
127/// <param name="rectangle">A <see cref="Rectangle" /> within whose boundaries to paint the value. </param> 128public void PaintValue(object? value, Graphics canvas, Rectangle rectangle)
System\Windows\Forms\Accessibility\AccessibleObject.cs (4)
144public virtual Rectangle Bounds => SystemIAccessible.TryGetLocation(CHILDID_SELF); 719internal virtual Rectangle BoundingRectangle => Bounds; 1698Rectangle bounds = Bounds; 1711Rectangle bounds = child.Bounds;
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (2)
23public static Rectangle TryGetLocation(this AgileComPointer<IAccessible>? agile, int child) 26public static Rectangle TryGetLocation(this AgileComPointer<IAccessible>? agile, VARIANT child)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (6)
37public override Rectangle BoundingRectangle => GetFormattingRectangle(); 179if (IsDegenerate(_owningControl.TryGetTarget(out Control? target) ? target.ClientRectangle : Rectangle.Empty)) 184Rectangle rectangle = GetFormattingRectangle(); 200static bool IsDegenerate(Rectangle rect) 305public override Rectangle RectangleToScreen(Rectangle rect)
System\Windows\Forms\ActiveX\AxHost.cs (6)
1010public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds) 1155protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => bounds; 1157private unsafe void SetObjectRects(Rectangle bounds) 1199Rectangle oldBounds = Bounds; 1411Rectangle b = Bounds;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (6)
126private Rectangle? _lastClipRect; 1701Rectangle bounds = _control.Bounds; 1759Rectangle posRect = *lprcPosRect; 1801Rectangle clipRect = *lprcClipRect; 1804Rectangle intersect = !clipRect.IsEmpty ? Rectangle.Intersect(posRect, clipRect) : posRect;
System\Windows\Forms\ContextMenuStrip.cs (2)
97Rectangle bounds = CalculateDropDownLocation(new Point(x, y), ToolStripDropDownDirection.AboveLeft); 98Rectangle screenBounds = Screen.FromRectangle(bounds).Bounds;
System\Windows\Forms\Control.cs (42)
1008public Rectangle Bounds 1164public Rectangle ClientRectangle => new Rectangle(0, 0, _clientWidth, _clientHeight); 1649public virtual Rectangle DisplayRectangle 4476Rectangle originalBounds; 4494Rectangle parentClient = _parent.ClientRectangle; 4901public void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds) 5188internal virtual Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 5196Rectangle newBounds = new(suggestedX, suggestedY, 0, 0) 5276protected virtual Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 5506private protected virtual IList<Rectangle> GetNeighboringToolsRectangles() 5838OnInvalidated(new InvalidateEventArgs(Rectangle.Ceiling(region.GetBounds(graphics)))); 5889public void Invalidate(Rectangle rc) 5900public unsafe void Invalidate(Rectangle rc, bool invalidateChildren) 6517protected virtual void NotifyInvalidate(Rectangle invalidatedArea) 7918Rectangle cliprect = e.InvalidRect; 7921cliprect = Rectangle.Intersect(ClientRectangle, cliprect); 8074internal void PaintBackground(PaintEventArgs e, Rectangle rectangle) => 8077internal void PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset = default) 8128private static void PaintBackColor(PaintEventArgs e, Rectangle rectangle, Color backColor) 8158Rectangle clientRectangle = ClientRectangle; 8159Rectangle rectangle = clientRectangle; 8187internal unsafe void PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region? transparentRegion = null) 8227Rectangle shift = new(-Left, -Top, parent.Width, parent.Height); 8230Rectangle newClipRect = new( 8743private protected virtual void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 8757Rectangle clientBounds = new(clientOffset, ClientSize); 9292public Rectangle RectangleToClient(Rectangle r) 9302public Rectangle RectangleToScreen(Rectangle r) 9713Rectangle rawScaledBounds = GetScaledBounds(Bounds, factor, specified); 10071Rectangle adjustedBounds = ApplyBoundsConstraints(x, y, width, height); 11730Rectangle clip; 11771Rectangle band = ClientRectangle; 12614void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 12718Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetToolNativeScreenRectangle(); 12720IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() => GetNeighboringToolsRectangles(); 12747private IList<Rectangle> GetOwnNeighboringToolsRectangles() 12752return Array.Empty<Rectangle>(); 12755List<Rectangle> neighboringControlsRectangles = new(4); 12785internal virtual Rectangle GetToolNativeScreenRectangle()
System\Windows\Forms\Control.PrintPaintEventArgs.cs (1)
14internal PrintPaintEventArgs(Message m, HDC dc, Rectangle clipRect)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (3)
604internal virtual Rectangle OverChangeRectangle 635internal virtual Rectangle DownChangeRectangle => ClientRectangle; 871Rectangle r = ClientRectangle;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (20)
97internal static void DrawDitheredFill(Graphics g, Color color1, Color color2, Rectangle bounds) 103protected void Draw3DBorder(IDeviceContext deviceContext, Rectangle bounds, ColorData colors, bool raised) 129private void Draw3DBorderHighContrastRaised(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 187private static void Draw3DBorderNormal(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 232private void Draw3DBorderRaised(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 294protected internal static void Draw3DLiteBorder(IDeviceContext deviceContext, Rectangle r, ColorData colors, bool up) 324Rectangle bounds, 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); 356internal static void DrawFlatFocus(IDeviceContext deviceContext, Rectangle r, Color color) 366private void DrawFocus(Graphics g, Rectangle r) 374internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout) 380Rectangle bounds = new( 423internal static void DrawDefaultBorder(IDeviceContext deviceContext, Rectangle r, Color color, bool isDefault) 453Rectangle r = layout.TextBounds; 514internal void PaintButtonBackground(PaintEventArgs e, Rectangle bounds, Brush? background) 533Rectangle maxFocus = layout.Focus; 556Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutData.cs (8)
12public Rectangle Client; 13public Rectangle Face; 14public Rectangle CheckArea; 15public Rectangle CheckBounds; 16public Rectangle TextBounds; 17public Rectangle Field; 18public Rectangle Focus; 19public Rectangle ImageBounds;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (12)
22public Rectangle Client; 261layout.Face = Rectangle.Inflate(layout.Client, -fullBorderSize, -fullBorderSize); 280Rectangle textAdjusted = new( 287? Rectangle.Union(textAdjusted, layout.ImageBounds) 363Rectangle field = Rectangle.Inflate(layout.Face, -PaddingSize, -PaddingSize); 483Rectangle maxBounds = Rectangle.Inflate(layout.Field, -TextImageInset, -TextImageInset); 510Rectangle maxCombinedBounds = maxBounds; 515Rectangle combinedBounds = LayoutUtils.Align(combinedSize, maxCombinedBounds, ContentAlignment.MiddleCenter); 614layout.TextBounds = Rectangle.Intersect(layout.TextBounds, layout.Field); 629layout.ImageBounds = Rectangle.Intersect(layout.ImageBounds, layout.Field);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (6)
14private void PaintBackground(PaintEventArgs e, Rectangle r, Color backColor) 16Rectangle rect = r; 38Rectangle r = Control.ClientRectangle; 131Rectangle r = Control.ClientRectangle; 224Rectangle r = Control.ClientRectangle; 299Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (4)
18Rectangle r = Control.ClientRectangle; 64Rectangle r = Control.ClientRectangle; 122Rectangle r = Control.ClientRectangle; 151Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (3)
46private void PaintThemedButtonBackground(PaintEventArgs e, Rectangle bounds, bool up) 137Rectangle bounds = Control.ClientRectangle; 187Rectangle r = Control.ClientRectangle;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (12)
36Rectangle bounds = layout.CheckBounds; 86Rectangle bounds, 119Rectangle bounds, 171Rectangle fullSize = layout.CheckBounds; 201internal static Rectangle DrawPopupBorder(Graphics g, Rectangle r, ColorData colors) 207internal static Rectangle DrawPopupBorder(PaintEventArgs e, Rectangle r, ColorData colors) 213internal static Rectangle DrawPopupBorder(HDC hdc, Rectangle r, ColorData colors) 294private static Bitmap GetCheckBoxImage(Color checkColor, Rectangle fullSize, ref Color cacheCheckColor, ref Bitmap? cacheCheckImage) 336layout.Focus = Control.AutoSize ? Rectangle.Inflate(layout.CheckBounds, -2, -2) : layout.Field;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
132Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (6)
27Rectangle bounds, 58protected void DrawCheckBackgroundFlat(PaintEventArgs e, Rectangle bounds, Color borderColor, Color checkBackground) 97private static void DrawAndFillEllipse(HDC hdc, HPEN borderPen, HBRUSH fieldBrush, Rectangle bounds) 152Rectangle vCross = new( 160Rectangle hCross = new( 196Rectangle check = layout.CheckBounds;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (36)
53public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 56internal static void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl) 65/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 66public static void DrawButton(Graphics g, Rectangle bounds, PushButtonState state) => 69internal static void DrawButton(IDeviceContext deviceContext, Rectangle bounds, PushButtonState state) 88Rectangle bounds, 93Rectangle contentBounds; 111contentBounds = Rectangle.Inflate(bounds, -3, -3); 124/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 125public static void DrawButton(Graphics g, Rectangle bounds, bool focused, PushButtonState state) => 128/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 129public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, bool focused, PushButtonState state) 141/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 142public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, TextFormatFlags flags, bool focused, PushButtonState state) 144Rectangle contentBounds; 158contentBounds = Rectangle.Inflate(bounds, -3, -3); 170/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 172public static void DrawButton(Graphics g, Rectangle bounds, Image image, Rectangle imageBounds, bool focused, PushButtonState state) 174Rectangle contentBounds; 188contentBounds = Rectangle.Inflate(bounds, -3, -3); 197/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 200Rectangle bounds, 204Rectangle imageBounds, 222Rectangle bounds, 227Rectangle imageBounds, 234Rectangle bounds, 239Rectangle imageBounds, 243Rectangle contentBounds; 269contentBounds = Rectangle.Inflate(bounds, -3, -3);
System\Windows\Forms\Controls\Buttons\CheckBox.cs (2)
292internal override Rectangle OverChangeRectangle 313internal override Rectangle DownChangeRectangle
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (21)
38/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 39public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 58Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state)); 79Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 87Rectangle textBounds, 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 105Rectangle textBounds, 115Rectangle textBounds, 123Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state, hwnd)); 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 159Rectangle textBounds, 163Rectangle imageBounds, 183Rectangle textBounds, 188Rectangle imageBounds, 192Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state));
System\Windows\Forms\Controls\Buttons\RadioButton.cs (2)
266internal override Rectangle OverChangeRectangle 286internal override Rectangle DownChangeRectangle =>
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (23)
39/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 40public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 60Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 70Rectangle glyphBounds; 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 91Rectangle textBounds, 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 106Rectangle textBounds, 119Rectangle textBounds, 127Rectangle glyphBounds; 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 159Rectangle textBounds, 163Rectangle imageBounds, 183Rectangle textBounds, 188Rectangle imageBounds, 206Rectangle textBounds, 211Rectangle imageBounds, 216Rectangle glyphBounds;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildDropDownButtonUiaProvider.cs (1)
44public override unsafe Rectangle Bounds => SystemIAccessible.TryGetLocation(GetChildId());
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
32internal override Rectangle BoundingRectangle
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildTextUiaProvider.cs (1)
34public override Rectangle Bounds
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (3)
33public override Rectangle Bounds 49return Rectangle.Empty; 178Rectangle listBounds = _owningComboBox.ChildListAccessibleObject.Bounds;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (6)
40public override Rectangle BoundingRectangle 43: Rectangle.Empty; 245Rectangle rectangle = GetFormattingRectangle(); 261static bool IsDegenerate(Rectangle rect) 378public override Rectangle RectangleToScreen(Rectangle rect) => _owningComboBox.RectangleToScreen(rect);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
1653Rectangle clientRect = rect; 1801Rectangle rectangle = rect; 1926internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 3700Rectangle clientRect = rect;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (7)
13private Rectangle _outerBorder; 14private Rectangle _innerBorder; 15private Rectangle _innerInnerBorder; 16internal Rectangle _dropDownRect; 17private Rectangle _whiteFillRect; 18private Rectangle _clientRect; 161protected virtual void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (12)
26private static void DrawBackground(Graphics g, Rectangle bounds, ComboBoxState state) 37Rectangle fillRect = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 48public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 58public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, ComboBoxState state) 66public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, ComboBoxState state) 74public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, TextFormatFlags flags, ComboBoxState state) 78Rectangle textBounds = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 86public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, ComboBoxState state) 98public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 111internal static void DrawDropDownButtonForHandle(HDC hdc, Rectangle bounds, ComboBoxState state, HWND hwnd)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (10)
296private Rectangle _normalClientRectangle; 350private Rectangle _resizeClipRectangle; 450TopLeftHeader = Rectangle.Empty, 451ColumnHeaders = Rectangle.Empty, 452RowHeaders = Rectangle.Empty, 2118public override Rectangle DisplayRectangle 2122Rectangle rectDisplay = ClientRectangle; 2698Rectangle rectTmp = _layout.Data; 2702rectTmp = Rectangle.Union(rectTmp, _layout.ColumnHeaders); 3809Invalidate(Rectangle.Union(_layout.Data, _layout.ColumnHeaders));
System\Windows\Forms\Controls\DataGridView\DataGridView.DataGridViewEditingPanelAccessibleObject.cs (1)
23internal override Rectangle BoundingRectangle
System\Windows\Forms\Controls\DataGridView\DataGridView.LayoutData.cs (14)
15public Rectangle ClientRectangle = Rectangle.Empty; 18public Rectangle Inside = Rectangle.Empty; 21public Rectangle RowHeaders = Rectangle.Empty; 24public Rectangle ColumnHeaders = Rectangle.Empty; 27public Rectangle TopLeftHeader = Rectangle.Empty; 30public Rectangle Data = Rectangle.Empty; 33public Rectangle ResizeBoxRect = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (130)
2432Rectangle clip = Rectangle.Union(_layout.ColumnHeaders, _layout.Data); 2435clip = Rectangle.Union(_layout.TopLeftHeader, clip); 2456Rectangle cursorClip = _layout.ColumnHeaders; 2536private Rectangle GetResizeClipRectangle(int columnIndex) 2538Rectangle clip = Rectangle.Union(_layout.ColumnHeaders, _layout.Data); 2740Rectangle clip = Rectangle.Union(_layout.RowHeaders, _layout.Data); 2743clip = Rectangle.Union(_layout.TopLeftHeader, clip); 2775Rectangle clip = Rectangle.Union(_layout.RowHeaders, _layout.Data); 2969private Rectangle CalcColRelocationFeedbackRect(int mouseX) 2971Rectangle r, inside = _layout.ColumnHeaders; 2974inside = Rectangle.Union(_layout.TopLeftHeader, inside); 3001private Rectangle CalcColResizeFeedbackRect(int mouseX) 3003Rectangle inside = _layout.Data; 3004Rectangle r = new( 3022private Rectangle CalcRowResizeFeedbackRect(int mouseY) 3024Rectangle inside = _layout.Data; 3025Rectangle r = new( 3380private void CaptureMouse(Rectangle cursorClip) 4365Rectangle oldResizeRect = _layout.ResizeBoxRect; 4372Rectangle inside = newLayout.Inside; 4385Rectangle insideLeft = inside; 4390Rectangle colHeaders = insideLeft; 4399newLayout.ColumnHeaders = Rectangle.Empty; 4404Rectangle rowHeaders = insideLeft; 4421Rectangle topLeft; 4422Rectangle colHeaders = newLayout.ColumnHeaders; 4441newLayout.TopLeftHeader = Rectangle.Empty; 4446newLayout.RowHeaders = Rectangle.Empty; 4447newLayout.TopLeftHeader = Rectangle.Empty; 5428private RECT[]? CreateScrollableRegion(Rectangle scroll) 5488ref Rectangle rectScrollingArea, 5634Rectangle r = CalcColRelocationFeedbackRect(mouseX); 5638Rectangle rectInsertionBar = new(0, _layout.ColumnHeaders.Top, InsertionBarWidth, _layout.ColumnHeaders.Height); 5691Rectangle r = CalcColResizeFeedbackRect(mouseX); 5701Rectangle r = CalcRowResizeFeedbackRect(mouseY); 5705private void DrawShadowRect(Rectangle r) 5726private void DrawSplitBar(Rectangle r) 6074Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 6427Rectangle rectScreen = Screen.FromControl(this).WorkingArea; 6820internal Rectangle GetCellAdjustedDisplayRectangle(int columnIndex, int rowIndex, bool cutOverflow) 6822Rectangle rect = GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow); 7046public Rectangle GetCellDisplayRectangle(int columnIndex, int rowIndex, bool cutOverflow) 7048Rectangle rowRect; 7049Rectangle columnRect; 8196public Rectangle GetColumnDisplayRectangle(int columnIndex, bool cutOverflow) 8204private Rectangle GetColumnDisplayRectanglePrivate(int columnIndex, bool cutOverflow) 8210return Rectangle.Empty; 8213Rectangle data = _layout.Data; 8307Rectangle columnRect = RightToLeftInternal 8320return Rectangle.Empty; 8327Rectangle data = _layout.Data; 8567Rectangle rectScrollingArea = _layout.Data; 8584rectScrollingArea = Rectangle.Union(rectScrollingArea, _layout.RowHeaders); 8676rectScrollingArea = Rectangle.Union(rectScrollingArea, _layout.ColumnHeaders); 9026public Rectangle GetRowDisplayRectangle(int rowIndex, bool cutOverflow) 9034private Rectangle GetRowDisplayRectanglePrivate(int rowIndex, bool cutOverflow) 9040return Rectangle.Empty; 9043Rectangle data = _layout.Data; 9094Rectangle rowRect = new(data.X, cy, data.Width, displayHeight); 9108return Rectangle.Empty; 9113Rectangle data = _layout.Data; 9797Rectangle cellDisplayRect = GetCellAdjustedDisplayRectangle(columnIndex, rowIndex, true); 9822Rectangle columnDisplayRect = GetColumnDisplayRectanglePrivate(columnIndex, true); 9866Rectangle rowDisplayRect = GetRowDisplayRectanglePrivate(rowIndex, true); 9899Rectangle rowDisplayRect, data; 10434Rectangle lastSplitBarRect = CalcRowResizeFeedbackRect(_lastRowSplitBar); 10495Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 10502Rectangle lastSplitBarRect = CalcColResizeFeedbackRect(_lastColSplitBar); 13453Invalidate(Rectangle.Union(_layout.ColumnHeaders, _layout.Data)); 13916Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 14493Rectangle rightArea = _layout.Data; 14496rightArea = Rectangle.Union(rightArea, _layout.ColumnHeaders); 16687Rectangle clipRect = e.ClipRectangle; 16688Rectangle gridRect = GetGridRectangle(); 16692clipRect = Rectangle.Union(clipRect, CalcRowResizeFeedbackRect(_currentRowSplitBar)); 16696clipRect = Rectangle.Union(clipRect, CalcColResizeFeedbackRect(_currentColSplitBar)); 16744private Rectangle GetGridRectangle() 16746Rectangle gridRect = _layout.Data; 16749gridRect = Rectangle.Union(gridRect, _layout.RowHeaders); 16763gridRect = Rectangle.Union(gridRect, _layout.ColumnHeaders); 16778private Rectangle GetGridFocusRectangle() 16780Rectangle focusRect = GetGridRectangle(); 16792Rectangle focusRect = GetGridFocusRectangle(); 16828private void InvalidateRectangleEdges(Rectangle rect) 16831Rectangle edge = rect; 17444Rectangle right; 17445Rectangle bottom; 17446Rectangle oldClientRectangle = _layout.ClientRectangle; 17447Rectangle oldGridFocusRectangle = GetGridFocusRectangle(); 17464Rectangle newClientRectangle = _normalClientRectangle; 17465Rectangle newGridFocusRectangle = DisplayRectangle; 18193Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.RowHeaders)); 18826Rectangle rect = Screen.GetBounds(pt); 19210protected virtual void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds) 19213Rectangle rcBelowRows = gridBounds; 19239Rectangle rcNextRows = gridBounds; 19281private void PaintBorder(Graphics g, Rectangle clipRect, Rectangle bounds) 19293Rectangle edge = new(0, 0, bounds.Width, borderWidth); 19342private void PaintColumnHeaders(Graphics g, Rectangle clipBounds, bool singleBorderAdded) 19346Rectangle bandBounds, cellBounds; 19411Rectangle scrollingBounds = bandBounds; 19425Rectangle rowRect = bandBounds; 19496Rectangle gridBounds, 19497Rectangle clipRect, 19501Rectangle rc = gridBounds; 19516Rectangle columnHeadersClip = _layout.ColumnHeaders; 19560Rectangle boundingRect, 19561Rectangle clipRect, 19566Rectangle rowBounds; 19688Rectangle cellBounds = _layout.TopLeftHeader; 19816Rectangle editingZone = _layout.Data; 19832Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19834Rectangle cellClip = cellBounds; 25604Cursor.Clip = Rectangle.Empty; 25875Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 26340Rectangle rowsRect = _layout.Data; 26343rowsRect = Rectangle.Union(rowsRect, _layout.RowHeaders); 28960Rectangle rectUpper = GetCellAdjustedDisplayRectangle(-1, rowIndexStart, true); 28961Rectangle rectLower = GetCellAdjustedDisplayRectangle(-1, rowIndexEnd, true); 28971Invalidate(Rectangle.Union(rectUpper, rectLower)); 29010Rectangle bottomArea = _layout.Data; 29013bottomArea = Rectangle.Union(bottomArea, _layout.RowHeaders); 29085Rectangle bottomArea = _layout.Data; 29088bottomArea = Rectangle.Union(bottomArea, _layout.RowHeaders);
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (4)
26public override Rectangle Bounds 37Rectangle rect = Rectangle.Union(_ownerDataGridView._layout.ColumnHeaders, _ownerDataGridView._layout.TopLeftHeader); 41return Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (29)
27private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 149protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 155return Rectangle.Empty; 162out Rectangle cellBounds); 164Rectangle contentBounds = PaintPrivate( 181Rectangle contentBoundsDebug = PaintPrivate( 217protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 227return Rectangle.Empty; 234out Rectangle cellBounds); 236Rectangle errorIconBounds = PaintPrivate( 253Rectangle errorIconBoundsDebug = PaintPrivate( 293Rectangle borderWidthsRect = StdBorderWidths; 309Rectangle rectThemeMargins = GetThemeMargins(graphics); 411private static Rectangle GetThemeMargins(Graphics g) 415Rectangle rectCell = new(0, 0, DATAGRIDVIEWBUTTONCELL_themeMargin, DATAGRIDVIEWBUTTONCELL_themeMargin); 416Rectangle rectContent = DataGridViewButtonCellRenderer.DataGridViewButtonRenderer.GetBackgroundContentRectangle(g, rectCell); 601Rectangle clipBounds, 602Rectangle cellBounds, 638private Rectangle PaintPrivate( 640Rectangle clipBounds, 641Rectangle cellBounds, 665Rectangle resultBounds; 678Rectangle valBounds = cellBounds; 679Rectangle borderWidths = BorderWidths(advancedBorderStyle); 687return Rectangle.Empty; 711Rectangle errorBounds = valBounds; 870resultBounds = Rectangle.Empty; 876resultBounds = Rectangle.Empty; 890ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellRenderer.cs (2)
25public static void DrawButton(Graphics g, Rectangle bounds, int buttonState) 28DataGridViewButtonRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (45)
53private readonly List<Rectangle> _nonEmptyNeighbors; 105public Rectangle ContentBounds => GetContentBounds(RowIndex); 195public Rectangle ErrorIconBounds => GetErrorIconBounds(RowIndex); 291Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 302IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 593private protected Rectangle StdBorderWidths 611return Rectangle.Empty; 829protected virtual Rectangle BorderWidths(DataGridViewAdvancedBorderStyle advancedBorderStyle) 833Rectangle rect = new Rectangle 956out Rectangle cellBounds) 1014internal Rectangle ComputeErrorIconBounds(Rectangle cellValueBounds) 1019Rectangle bmpRect = new(DataGridView!.RightToLeftInternal ? 1029return Rectangle.Empty; 1463public Rectangle GetContentBounds(int rowIndex) 1467return Rectangle.Empty; 1476protected virtual Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 1530internal Rectangle GetErrorIconBounds(int rowIndex) 1537protected virtual Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 2755Rectangle contentBounds = GetContentBounds(screen, dataGridViewCellStyle, rowIndex); 3068Rectangle clipBounds, 3069Rectangle cellBounds, 3083Rectangle clipBounds, 3084Rectangle cellBounds, 3120Rectangle clipBounds, 3121Rectangle bounds, 3525Rectangle clipBounds, 3526Rectangle cellValueBounds, 3544private static void PaintErrorIcon(Graphics graphics, Rectangle iconBounds) 3560Rectangle cellBounds, 3561Rectangle cellValueBounds, 3568Rectangle iconBounds = GetErrorIconBounds(graphics, cellStyle, rowIndex); 3590Rectangle bounds, 3595Rectangle rectPadding; 3630Rectangle clipBounds, 3631Rectangle cellBounds, 3746Rectangle cellBounds, 3747Rectangle cellClip, 3754Rectangle editingControlBounds = PositionEditingPanel( 3779public virtual Rectangle PositionEditingPanel( 3780Rectangle cellBounds, 3781Rectangle cellClip, 3803Rectangle borderAndPaddingWidths = BorderWidths(dgvabsEffective);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (7)
30public override Rectangle Bounds => GetAccessibleObjectBounds(GetAccessibleObjectParent()); 155Rectangle cellBounds; 311internal Rectangle GetAccessibleObjectBounds(AccessibleObject? parentAccObject) 323return Rectangle.Empty; 326Rectangle rowRect = parentAccObject.Bounds; 327Rectangle cellRect = rowRect; 328Rectangle columnRect = _owner.DataGridView.RectangleToScreen(
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (9)
16Rectangle clipBounds, 17Rectangle cellBounds, 58public Rectangle CellBounds { get; private set; } 60public Rectangle ClipBounds { get; private set; } 78public void Paint(Rectangle clipBounds, DataGridViewPaintParts paintParts) 107public void PaintBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 142public void PaintContent(Rectangle clipBounds) 173Rectangle clipBounds, 174Rectangle cellBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (26)
444protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 450return Rectangle.Empty; 457out Rectangle cellBounds); 459Rectangle checkBoxBounds = PaintPrivate( 476Rectangle checkBoxBoundsDebug = PaintPrivate( 506protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 516return Rectangle.Empty; 525return Rectangle.Empty; 532out Rectangle cellBounds); 534Rectangle errorIconBounds = PaintPrivate( 649Rectangle borderWidthsRect = StdBorderWidths; 734Rectangle borderWidths = BorderWidths(dgvabsEffective); 994Rectangle clipBounds, 995Rectangle cellBounds, 1031private Rectangle PaintPrivate( 1033Rectangle clipBounds, 1034Rectangle cellBounds, 1055Rectangle resultBounds; 1062Rectangle valBounds = cellBounds; 1063Rectangle borderWidths = BorderWidths(advancedBorderStyle); 1146Rectangle errorBounds = valBounds; 1278Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1336Rectangle fullSize = new(checkBoxX - 1, checkBoxY - 1, checkBoxSize.Width + 3, checkBoxSize.Height + 3); 1384Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.Height - 1); 1543resultBounds = Rectangle.Empty; 1549resultBounds = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellRenderer.cs (2)
25public static void DrawCheckBox(Graphics g, Rectangle bounds, int state) 28CheckBoxRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (18)
211protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 219return Rectangle.Empty; 234out Rectangle cellBounds); 236Rectangle contentBounds = PaintPrivate( 249Rectangle contentBoundsDebug = PaintPrivate( 497Rectangle borderWidthsRect = BorderWidths(dgvabsEffective); 690Rectangle rectThemeMargins = GetThemeMargins(graphics); 713Rectangle clipBounds, 714Rectangle cellBounds, 743private Rectangle PaintPrivate( 745Rectangle clipBounds, 746Rectangle cellBounds, 756Rectangle contentBounds = Rectangle.Empty; 763Rectangle valBounds = cellBounds; 764Rectangle borderWidths = BorderWidths(advancedBorderStyle); 769Rectangle backgroundBounds = valBounds; 849Rectangle rectThemeMargins = GetThemeMargins(g);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (2)
30public override Rectangle Bounds => Owner is null 32: (Owner.DataGridView?.IsHandleCreated == true) ? GetAccessibleObjectBounds(Parent) : Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (4)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 27Rectangle rectClip = Rectangle.Truncate(g.ClipBounds); 32Rectangle cornerClip = new(bounds.Left, bounds.Bottom - 2, 2, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (35)
531Rectangle borderAndPaddingWidths = BorderWidths(dgvabsEffective); 728protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 734return Rectangle.Empty; 748out Rectangle cellBounds); 750Rectangle contentBounds = PaintPrivate( 768Rectangle contentBoundsDebug = PaintPrivate( 834protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 844return Rectangle.Empty; 854ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 856Rectangle errorIconBounds = PaintPrivate( 866out Rectangle dropDownButtonRect, // not used 874Rectangle errorIconBoundsDebug = PaintPrivate( 1176Rectangle borderWidthsRect = StdBorderWidths; 1331Rectangle rectBottomSection = DataGridView.GetCellDisplayRectangle(ColumnIndex, rowIndex, true); 1763Rectangle cellBounds = DataGridView.GetCellDisplayRectangle(OwningColumn.Index, rowIndex, cutOverflow: false); 1774Rectangle dropDownButtonRect; 1814Rectangle clipBounds, 1815Rectangle cellBounds, 1855private Rectangle PaintPrivate( 1857Rectangle clipBounds, 1858Rectangle cellBounds, 1865out Rectangle dropDownButtonRect, 1883Rectangle resultBounds = Rectangle.Empty; 1884dropDownButtonRect = Rectangle.Empty; 1912Rectangle borderWidths = BorderWidths(advancedBorderStyle); 1913Rectangle valBounds = cellBounds; 2008Rectangle dropRect; 2208Rectangle errorBounds = valBounds; 2209Rectangle textBounds = Rectangle.Inflate(valBounds, -2, -2); 2257Rectangle focusBounds = textBounds; 2270Rectangle focusBounds = textBounds; 2356return Rectangle.Empty; 2369resultBounds = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (5)
30public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 35public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 41public static void DrawBorder(Graphics g, Rectangle bounds) 55public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state, bool rightToLeft) 69public static void DrawReadOnlyButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (10)
19private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 74return DataGridView.LayoutInfo.TopLeftHeader != Rectangle.Empty; 294if (DataGridView.LayoutInfo.TopLeftHeader != Rectangle.Empty) 381internal static Rectangle GetThemeMargins(Graphics g) 385Rectangle rectCell = new(0, 0, ThemeMargin, ThemeMargin); 386Rectangle rectContent = DataGridViewHeaderCellRenderer.VisualStyleRenderer.GetBackgroundContentRectangle(g, rectCell); 516Rectangle clipBounds, 517Rectangle cellBounds, 536Rectangle bounds = cellBounds; 537Rectangle borderWidths = BorderWidths(advancedBorderStyle);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (32)
225protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 231return Rectangle.Empty; 247out Rectangle cellBounds); 249Rectangle imgBounds = PaintPrivate( 265Rectangle imgBoundsDebug = PaintPrivate( 287protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 297return Rectangle.Empty; 313out Rectangle cellBounds); 315Rectangle errBounds = PaintPrivate( 331Rectangle errBoundsDebug = PaintPrivate(graphics, 409Rectangle borderWidthsRect = StdBorderWidths; 568private Rectangle ImageBounds( 569Rectangle bounds, 578Rectangle imageBounds = Rectangle.Empty; 679Rectangle clipBounds, 680Rectangle cellBounds, 716private Rectangle PaintPrivate( 718Rectangle clipBounds, 719Rectangle cellBounds, 743Rectangle resultBounds = Rectangle.Empty; 744Rectangle valBounds = cellBounds; 745Rectangle borderWidths = BorderWidths(advancedBorderStyle); 755? Rectangle.Empty 761return Rectangle.Empty; 765Rectangle imageBounds = valBounds; 794return Rectangle.Empty; 842Rectangle imageBounds2 = ImageBounds( 867g.SetClip(Rectangle.Intersect( 868Rectangle.Intersect(imageBounds2, imageBounds), 869Rectangle.Truncate(g.VisibleClipBounds)));
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (21)
420protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 426return Rectangle.Empty; 442out Rectangle cellBounds); 444Rectangle linkBounds = PaintPrivate( 460Rectangle linkBoundsDebug = PaintPrivate( 490protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 500return Rectangle.Empty; 516out Rectangle cellBounds); 518Rectangle errorIconBounds = PaintPrivate( 550Rectangle borderWidthsRect = StdBorderWidths; 837Rectangle clipBounds, 838Rectangle cellBounds, 874private Rectangle PaintPrivate( 876Rectangle clipBounds, 877Rectangle cellBounds, 902Rectangle resultBounds = Rectangle.Empty; 904Rectangle borderWidths = BorderWidths(advancedBorderStyle); 905Rectangle valBounds = cellBounds; 938Rectangle errorBounds = valBounds; 984Rectangle focusBounds = DataGridViewUtilities.GetTextBounds(
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (13)
1172Rectangle clipBounds, 1173Rectangle bounds, 1407Rectangle clipBounds, 1408Rectangle rowBounds, 1442Rectangle updatedClipBounds = dgvrprepe.ClipBounds; 1482Rectangle clipBounds, 1483Rectangle rowBounds, 1503Rectangle cellBounds = rowBounds; 1574Rectangle dataBounds = rowBounds; 1591Rectangle rowRect = rowBounds; 1675Rectangle clipBounds, 1676Rectangle rowBounds, 1698Rectangle cellBounds = rowBounds;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (5)
40public override Rectangle Bounds 51return Rectangle.Empty; 54Rectangle rowRect = _owningDataGridViewRow.DataGridView.RectangleToScreen(_owningDataGridViewRow.DataGridView.GetRowDisplayRectangle(_owningDataGridViewRow.Index, cutOverflow: false)); 62Rectangle dataGridViewRect = ParentPrivate!.Bounds; 198Rectangle rowBounds = _owningDataGridViewRow.DataGridView.GetRowDisplayRectangle(_owningDataGridViewRow.Index, cutOverflow: true);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (25)
183protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 189return Rectangle.Empty; 204out Rectangle cellBounds); 206Rectangle contentBounds = PaintPrivate( 222Rectangle contentBoundsDebug = PaintPrivate( 242protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 251return Rectangle.Empty; 258out Rectangle cellBounds); 269Rectangle errorBounds = PaintPrivate( 529Rectangle borderWidthsRect = BorderWidths(dgvabsEffective); 538Rectangle rectThemeMargins = GetThemeMargins(graphics); 575Rectangle clipBounds, 576Rectangle cellBounds, 612private Rectangle PaintPrivate( 614Rectangle clipBounds, 615Rectangle cellBounds, 638Rectangle resultBounds = Rectangle.Empty; 645Rectangle valBounds = cellBounds; 646Rectangle borderWidths = BorderWidths(advancedBorderStyle); 651Rectangle backgroundBounds = valBounds; 711Rectangle rectThemeMargins = GetThemeMargins(graphics); 762Rectangle errorBounds = valBounds; 1020Rectangle bounds, 1029Rectangle bmpRect = new(width, height, s_iconsWidth, s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (4)
18public override Rectangle Bounds 29return Rectangle.Empty; 33Rectangle rowRect = ParentPrivate.Bounds; 34Rectangle cellRect = rowRect;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellRenderer.cs (2)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 28VisualStyleRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (10)
15Rectangle clipBounds, 16Rectangle rowBounds, 46public Rectangle ClipBounds { get; set; } 48public Rectangle RowBounds { get; private set; } 62public void DrawFocus(Rectangle bounds, bool cellsPaintSelectionBackground) 79public void PaintCells(Rectangle clipBounds, DataGridViewPaintParts paintParts) 97public void PaintCellsBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 121public void PaintCellsContent(Rectangle clipBounds) 170Rectangle clipBounds, 171Rectangle rowBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (10)
17Rectangle clipBounds, 18Rectangle rowBounds, 49public Rectangle ClipBounds { get; set; } 51public Rectangle RowBounds { get; private set; } 79public void DrawFocus(Rectangle bounds, bool cellsPaintSelectionBackground) 96public void PaintCells(Rectangle clipBounds, DataGridViewPaintParts paintParts) 114public void PaintCellsBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 138public void PaintCellsContent(Rectangle clipBounds) 187Rectangle clipBounds, 188Rectangle rowBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (26)
137private Rectangle GetAdjustedEditingControlBounds(Rectangle editingControlBounds, DataGridViewCellStyle cellStyle) 256protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 262return Rectangle.Empty; 278out Rectangle cellBounds); 280Rectangle textBounds = PaintPrivate( 296Rectangle textBoundsDebug = PaintPrivate( 326protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 336return Rectangle.Empty; 343out Rectangle cellBounds); 345Rectangle errorBounds = PaintPrivate(graphics, 369Rectangle errorBoundsDebug = PaintPrivate(graphics, 402Rectangle borderWidthsRect = StdBorderWidths; 600Rectangle clipBounds, 601Rectangle cellBounds, 637private Rectangle PaintPrivate( 639Rectangle clipBounds, 640Rectangle cellBounds, 662Rectangle resultBounds = Rectangle.Empty; 669Rectangle borderWidths = BorderWidths(advancedBorderStyle); 670Rectangle valBounds = cellBounds; 715Rectangle errorBounds = valBounds; 781Rectangle cellBounds, 782Rectangle cellClip, 789Rectangle editingControlBounds = PositionEditingPanel(
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (23)
26protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 34return Rectangle.Empty; 45ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 47Rectangle contentBounds = PaintPrivate( 63Rectangle contentBoundsDebug = PaintPrivate( 83protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 89return Rectangle.Empty; 94ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 96Rectangle errorBounds = PaintPrivate( 114Rectangle errorBoundsDebug = PaintPrivate( 145Rectangle borderWidthsRect = BorderWidths(DataGridView.AdjustedTopLeftHeaderBorderStyle); 167Rectangle clipBounds, 168Rectangle cellBounds, 204private Rectangle PaintPrivate( 206Rectangle clipBounds, 207Rectangle cellBounds, 230Rectangle resultBounds = Rectangle.Empty; 232Rectangle valBounds = cellBounds; 233Rectangle borderWidths = BorderWidths(advancedBorderStyle); 296Rectangle errorBounds = valBounds; 358Rectangle clipBounds, 359Rectangle bounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.cs (3)
18public override Rectangle Bounds 29return Rectangle.Empty; 32Rectangle cellRect = Owner.DataGridView.GetCellDisplayRectangle(-1, -1, cutOverflow: false);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellRenderer.cs (2)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 28VisualStyleRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (5)
304internal static Rectangle GetTextBounds( 305Rectangle cellBounds, 313internal static Rectangle GetTextBounds( 314Rectangle cellBounds, 350Rectangle cellBounds,
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1014internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (2)
142public override Rectangle DisplayRectangle 463Rectangle textRectangle = ClientRectangle;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (18)
50public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 62public static void DrawGroupBox(Graphics g, Rectangle bounds, GroupBoxState state) 77public static void DrawGroupBox(Graphics g, Rectangle bounds, string? groupBoxText, Font? font, GroupBoxState state) 85Rectangle bounds, 97Rectangle bounds, 106Rectangle bounds, 127Rectangle bounds, 137Rectangle bounds, 157private static void DrawThemedGroupBoxNoText(Graphics g, Rectangle bounds, GroupBoxState state) 168Rectangle bounds, 178Rectangle textBounds = bounds; 205Rectangle boxBounds = bounds; 213Rectangle clipLeft = boxBounds; 214Rectangle clipMiddle = boxBounds; 215Rectangle clipRight = boxBounds; 246private static void DrawUnthemedGroupBoxNoText(Graphics g, Rectangle bounds) 274Rectangle bounds, 281Rectangle textBounds = bounds;
System\Windows\Forms\Controls\Labels\Label.cs (10)
873protected Rectangle CalcImageRenderBounds(Image image, Rectangle r, ContentAlignment align) 966private void DrawImage(PaintEventArgs e, Image image, Rectangle r, ContentAlignment align) 982protected void DrawImage(Graphics g, Image image, Rectangle r, ContentAlignment align) 985private void DrawImageInternal(Graphics g, Image image, Rectangle r, ContentAlignment align) 987Rectangle loc = CalcImageRenderBounds(image, r, align); 1254Rectangle face = LayoutUtils.DeflateRect(ClientRectangle, Padding); 1271Rectangle clientRect = ClientRectangle; 1351private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 1435Rectangle rectInScreen = RectangleToScreen(new Rectangle(0, 0, Width, Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (14)
145private Rectangle ClientRectWithPadding => LayoutUtils.DeflateRect(ClientRectangle, Padding); 372internal static Rectangle CalcTextRenderBounds(Rectangle textRect, Rectangle clientRect, ContentAlignment align) 556Rectangle clientRectWithPadding = ClientRectWithPadding; 580Rectangle visualRectangle = new( 986Rectangle clientRect = ClientRectWithPadding; 1080focusRectangle = CalcTextRenderBounds(Rectangle.Round(focusRectangle), ClientRectWithPadding, RtlTranslateContent(TextAlign)); 1135Rectangle clientRectWidthPadding = ClientRectWithPadding; 1156Rectangle imageBounds = CalcImageRenderBounds(image, ClientRectangle, RtlTranslateAlignment(ImageAlign)); 1300Rectangle clientAreaMinusPadding = ClientRectWithPadding; 1326ControlPaint.DrawFocusRectangle(g, Rectangle.Ceiling(focusRectangle), ForeColor, BackColor); 1332ControlPaint.DrawFocusRectangle(g, Rectangle.Ceiling(rect), ForeColor, BackColor); 1364Rectangle clientRectWithPadding = ClientRectWithPadding;
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (5)
27public override Rectangle Bounds 33return Rectangle.Empty; 46return Rectangle.Empty; 50Rectangle rect; 51rect = Rectangle.Ceiling(region.GetBounds(graphics));
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (6)
496Rectangle bounds = e.Bounds; 540Rectangle box = new( 569Rectangle textBounds = new( 626Rectangle stringBounds = new( 718Rectangle bounds = e.Bounds; 719Rectangle emptyRectangle = new(
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
31internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out ListBox? owner) ? 32owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (6)
1442public Rectangle GetItemRectangle(int index) 1448return Rectangle.Empty; 1459protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 2327Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1); 2354Rectangle bounds = dis->rcItem;
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (4)
53public override Rectangle Bounds 59return Rectangle.Empty; 62Rectangle bounds = _owningListBox.GetItemRectangle(CurrentIndex); 70Rectangle visibleArea = _owningListBox.RectangleToScreen(_owningListBox.ClientRectangle);
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (5)
20Rectangle bounds, 46public Rectangle Bounds { get; } 101Rectangle r = Bounds; 143Rectangle newBounds = Rectangle.Inflate(Bounds, -padding, 0);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (5)
19Rectangle bounds, 43public Rectangle Bounds { get; } 94private Rectangle UpdateBounds(Rectangle originalBounds, bool drawText) 96Rectangle resultBounds = originalBounds;
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (6)
18Rectangle bounds, 54public Rectangle Bounds { get; } 104public void DrawFocusRectangle(Rectangle bounds) 113ControlPaint.DrawFocusRectangle(Graphics, Rectangle.Inflate(bounds, -1, -1), Item.ForeColor, Item.BackColor); 141Rectangle newBounds = Rectangle.Inflate(Bounds, -padding, 0);
System\Windows\Forms\Controls\ListView\ListView.cs (23)
2627Rectangle itemBounds = GetItemRectOrEmpty(itemIndex); 2713Rectangle subItemBounds = GetSubItemRect(itemIndex, nmcd->iSubItem); 3232Rectangle itemBounds = lvi.Bounds; 3238Rectangle iconBounds = GetItemRect(lvi.Index, ItemBoundsPortion.Icon); 3567public Rectangle GetItemRect(int index) => GetItemRect(index, 0); 3572public Rectangle GetItemRect(int index, ItemBoundsPortion portion) 3582return Rectangle.Empty; 3595: (Rectangle)itemrect; 3602private Rectangle GetItemRectOrEmpty(int index) 3606return Rectangle.Empty; 3611return Rectangle.Empty; 3620? Rectangle.Empty 3621: (Rectangle)itemrect; 3627internal Rectangle GetSubItemRect(int itemIndex, int subItemIndex) 3632internal Rectangle GetSubItemRect(int itemIndex, int subItemIndex, ItemBoundsPortion portion) 3636return Rectangle.Empty; 3658return Rectangle.Empty; 3672: (Rectangle)itemrect; 4999Rectangle rectInvalid = Items[startIndex].Bounds; 5002rectInvalid = Rectangle.Union(rectInvalid, Items[index].Bounds); 5007rectInvalid = Rectangle.Union(rectInvalid, Items[startIndex - 1].Bounds); 5018rectInvalid = Rectangle.Union(rectInvalid, Items[endIndex + 1].Bounds); 6899Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (2)
22internal override Rectangle BoundingRectangle 32return Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (4)
39public override Rectangle Bounds 45return Rectangle.Empty; 51return Rectangle.Empty; 68Rectangle listViewBounds = _owningListView.AccessibilityObject.Bounds;
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (1)
52public Rectangle Bounds
System\Windows\Forms\Controls\ListView\ListViewItem.cs (3)
306public Rectangle Bounds 955Rectangle r = Bounds; 966public Rectangle GetBounds(ItemBoundsPortion portion)
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (12)
20Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetNativeRectangle(Index); 22IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 24List<Rectangle> neighboringRectangles = []; 82private Rectangle GetNativeRectangle(int index) 86return Rectangle.Empty; 92return Rectangle.Empty; 95Rectangle itemBounds = _listView.GetItemRect(index, ItemBoundsPortion.Label); 96Rectangle listviewBounds = _listView.AccessibilityObject.Bounds; 107private static Rectangle GetDetailsListRectangle(Point point, ListViewItem item, Rectangle itemBounds) 118private Rectangle GetTileRectangle(Point point, ListViewItem item, Rectangle itemBounds)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (4)
39public override Rectangle Bounds 41? Rectangle.Empty 200internal virtual Rectangle GetSubItemBounds(int index) => Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (2)
177internal override Rectangle GetSubItemBounds(int accessibleChildIndex) 180: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (3)
21public override Rectangle Bounds 25Rectangle imageRectangle = GetImageRectangle(); 54internal Rectangle GetImageRectangle() => _owningItem.ListView!.GetItemRect(_owningItem.Index, ItemBoundsPortion.Icon);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (2)
17public override Rectangle Bounds 19? Rectangle.Empty
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (2)
124internal override Rectangle GetSubItemBounds(int subItemIndex) 127: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (2)
98internal override Rectangle GetSubItemBounds(int accessibleChildIndex) 101: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (2)
95public Rectangle Bounds 105return Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (4)
32public override Rectangle Bounds 39return Rectangle.Empty; 42Rectangle bounds = ParentInternal.GetSubItemBounds(index); 60return Rectangle.Empty;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarAccessibleObject.cs (1)
53public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarBodyAccessibleObject.cs (1)
45public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarCellAccessibleObject.cs (1)
52public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarHeaderAccessibleObject.cs (1)
43public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarNextButtonAccessibleObject.cs (1)
28public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarPreviousButtonAccessibleObject.cs (1)
28public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (1)
48public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarTodayLinkAccessibleObject.cs (1)
29public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1653Rectangle oldBounds = Bounds;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (4)
340private Rectangle ImageRectangle => ImageRectangleFromSizeMode(_sizeMode); 342private Rectangle ImageRectangleFromSizeMode(PictureBoxSizeMode mode) 344Rectangle result = LayoutUtils.DeflateRect(ClientRectangle, Padding); 1133Rectangle drawingRect = _imageInstallationType == ImageInstallationType.ErrorOrInitial
System\Windows\Forms\Controls\ProgressBar\ProgressBarRenderer.cs (4)
27public static void DrawHorizontalBar(Graphics g, Rectangle bounds) 37public static void DrawVerticalBar(Graphics g, Rectangle bounds) 47public static void DrawHorizontalChunks(Graphics g, Rectangle bounds) 57public static void DrawVerticalChunks(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (6)
1885Rectangle rectangle = _gridView.Bounds; 1957Rectangle rectTarget = target.Bounds; 1966private static void DrawXorBar(Control targetControl, Rectangle rcFrame) 1968Rectangle rc = targetControl.RectangleToScreen(rcFrame); 2620Rectangle toolStripBounds = new(0, 1, toolStripWidth, toolStripHeight); 2824Rectangle rectDoc = _targetMove!.Bounds;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
40Rectangle r = ClientRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (5)
106Rectangle rect, 107Rectangle clipRect, 121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1); 143Rectangle rect, 144Rectangle clipRect,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
57public override Rectangle DisplayRectangle
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
84Rectangle dropDownButtonRect = new(0, 0, Width, Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (4)
16private void DDB_Draw3DBorder(PaintEventArgs e, Rectangle r, bool raised) 47Rectangle inside = r; 76Rectangle rect = Control.ClientRectangle; 87internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (25)
46private Rectangle _outlineRect = Rectangle.Empty; 649public Rectangle OutlineRectangle 675_outlineRect = Rectangle.Empty; 1512Rectangle rect, 1513Rectangle clipRect, 1577Rectangle textRect = new(stringX, rect.Y + 1, maxSpace, rect.Height - 1); 1579if (!Rectangle.Intersect(textRect, clipRect).IsEmpty) 1630private void PaintOutlineGlyph(Graphics g, Rectangle r) 1641_outlineRect = Rectangle.Empty; 1656_outlineRect = Rectangle.Empty; 1664void PaintOutlineWithExplorerTreeStyle(Graphics g, Rectangle r, HWND hwnd) 1667Rectangle outline = Rectangle.Intersect(r, OutlineRectangle); 1707Rectangle rectangle, 1729void PaintOutlineWithClassicStyle(Graphics g, Rectangle r) 1732Rectangle outline = Rectangle.Intersect(r, OutlineRectangle); 1790Rectangle rect, 1791Rectangle clipRect, 1845Rectangle rectPaint = new( 1851if (!Rectangle.Intersect(rectPaint, clipRect).IsEmpty) 1888if (Rectangle.Intersect(rect, clipRect).IsEmpty) 1905Rectangle textRectangle = new( 2002Rectangle outlineRect = OutlineRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (4)
28public override Rectangle Bounds 31: Rectangle.Empty; 129Rectangle entryBounds = BoundingRectangle; 130Rectangle propertyGridViewBounds = PropertyGridView.GetToolNativeScreenRectangle();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (3)
31private Rectangle _lastClientRectangle = Rectangle.Empty; 119Rectangle currentClientRectangle = ClientRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (4)
21private Rectangle[]? _uiItemRects; 502Rectangle rect, 503Rectangle clipRect, 525_uiItemRects = new Rectangle[_propertyValueUIItems.Length];
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (44)
82private Rectangle _lastClientRect = Rectangle.Empty; 455Rectangle rect = GetRectangle(_selectedRow, RowLabel); 591internal Rectangle AccessibilityGetGridEntryBounds(GridEntry gridEntry) 596return Rectangle.Empty; 599Rectangle rect = GetRectangle(row, RowValue | RowLabel); 605Rectangle parent = gridEntry.OwnerGrid.GridViewAccessibleObject.Bounds; 611return Rectangle.Empty; 675private static void AdjustOrigin(Graphics g, Point newOrigin, ref Rectangle r) 876private void CommonEditorUse(Control control, Rectangle targetRectangle) 880Rectangle rectCur = control.Bounds; 883Rectangle clientRect = ClientRectangle; 889targetRectangle = Rectangle.Intersect(clientRect, targetRectangle); 903targetRectangle = Rectangle.Empty; 1090Rectangle rect, 1093Rectangle clipRect) 1103clipRect = Rectangle.Intersect(rect, clipRect); 1148private void DrawValue(Graphics g, int row, Rectangle clipRect) 1156Rectangle rect = GetRectangle(row, RowValue); 1158clipRect = Rectangle.Intersect(clipRect, rect); 1363Rectangle r = GetRectangle(row, rowValue ? RowValue : RowLabel); 1417Rectangle rect = GetRectangle(_selectedRow, RowValue); 1420Rectangle rectScreen = Screen.FromControl(EditTextBox).WorkingArea; 1879public Rectangle GetRectangle(int row, int flRow) 1881Rectangle rect = new(0, 0, 0, 0); 1967Rectangle rect = ClientRectangle; 1972Rectangle boundsScroll = ScrollBar.Bounds; 2000Rectangle rect; 2115Rectangle r = ClientRectangle; 2295Rectangle drawBounds = e.Bounds; 2359Rectangle clearRect = new(1, 1, Size.Width - 2, Size.Height - 2); 2981Rectangle r = GetRectangle(pos.Y, RowLabel); 3055Rectangle itemRect = GetRectangle(point.Y, point.X); 3261Rectangle clipRect = e.ClipRectangle; 3327Rectangle rect = GetRectangle(i, RowLabel); 3350Rectangle clearRect = new(1, yPosition, Size.Width - 2, Size.Height - yPosition - 1); 3576Rectangle newRect = ClientRectangle; 3577int yDelta = _lastClientRect == Rectangle.Empty ? 0 : newRect.Height - _lastClientRect.Height; 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); 3777internal static void PositionTooltip(Control parent, GridToolTip toolTip, Rectangle itemRect) 4306Rectangle rect = GetRectangle(row, RowValue); 4325Rectangle rectTarget = new( 5266Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (7)
27private Rectangle _dragBaseRect = Rectangle.Empty; // the original bounds of our control. 364Rectangle bottomGrip = new(0, Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize); 365Rectangle topGrip = new(0, 0, s_resizeGripSize, s_resizeGripSize); 430Rectangle newBounds = Bounds; 499_dragBaseRect = Rectangle.Empty; 510Rectangle lRect = new(0, _resizeUp ? 0 : Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (2)
26var bounds = ClientBounds; 45Rectangle bounds = ClientBounds;
System\Windows\Forms\Controls\RichTextBox\ContentsResizedEventArgs.cs (2)
17public ContentsResizedEventArgs(Rectangle newRectangle) 25public Rectangle NewRectangle { get; }
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1612public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\Controls\Splitter\Splitter.cs (7)
399Rectangle bounds = spd._target.Bounds; 556private Rectangle CalcSplitLine(Control splitTarget, int splitSize, int minWeight) 558Rectangle r = Bounds; 559Rectangle bounds = splitTarget.Bounds; 610Rectangle r = target.Bounds; 697Rectangle r = CalcSplitLine(_splitTarget, splitSize, 3); 826Rectangle r = CalcSplitLine(_splitTarget, GetSplitSize(_splitTarget, e.X, e.Y), 0);
System\Windows\Forms\Controls\TabControl\TabControl.cs (15)
36private Rectangle _cachedDisplayRect; 354public override Rectangle DisplayRectangle 385Rectangle r = rect; 942_cachedDisplayRect = Rectangle.Empty; 1103public Rectangle GetTabRect(int index) 1150_cachedDisplayRect = Rectangle.Empty; 1245_cachedDisplayRect = Rectangle.Empty; 1413_cachedDisplayRect = Rectangle.Empty; 1446_cachedDisplayRect = Rectangle.Empty; 1529_cachedDisplayRect = Rectangle.Empty; 1598_cachedDisplayRect = Rectangle.Empty; 1613Rectangle rect = DisplayRectangle; 1891_cachedDisplayRect = Rectangle.Empty; 1903_cachedDisplayRect = Rectangle.Empty; 2006_cachedDisplayRect = Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (2)
18public override Rectangle Bounds 24return Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabPage.cs (9)
158private protected override IList<Rectangle> GetNeighboringToolsRectangles() 160List<Rectangle> neighbors = []; 513internal Rectangle GetPageRectangle() => base.GetToolNativeScreenRectangle(); 515internal override Rectangle GetToolNativeScreenRectangle() 523Rectangle rect = tabControl.GetTabRect(tabControl.SelectedIndex); 527return Rectangle.Empty; 611Rectangle inflateRect = LayoutUtils.InflateRect(DisplayRectangle, Padding); 616Rectangle rectWithBorder = new( 732Rectangle r = parent.DisplayRectangle;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (3)
23public override Rectangle Bounds 29return Rectangle.Empty; 36return Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (2)
16internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out TabPage? owner) ? 17owner.GetPageRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (21)
27public static void DrawTabItem(Graphics g, Rectangle bounds, TabItemState state) 37public static void DrawTabItem(Graphics g, Rectangle bounds, bool focused, TabItemState state) 44Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 54public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TabItemState state) 62public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, bool focused, TabItemState state) 72public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, bool focused, TabItemState state) 78Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 91public static void DrawTabItem(Graphics g, Rectangle bounds, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 98Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 111public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 121public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 128Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 142public static void DrawTabPage(Graphics g, Rectangle bounds) 145internal static void DrawTabPage(IDeviceContext deviceContext, Rectangle bounds)
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 (2)
826Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1); 869Rectangle rectangle = ClientRectangle;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (2)
25internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out TextBoxBase? owner) ? 26owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (8)
143public override Rectangle RectangleToScreen(Rectangle rect) => Owner is not null ? Owner.RectangleToScreen(rect) : Rectangle.Empty; 203public override Rectangle BoundingRectangle 206: Rectangle.Empty; 247Rectangle rect = Owner.ClientRectangle; 363Rectangle rectangle = GetFormattingRectangle(); 395static bool IsDegenerate(Rectangle rect)
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (10)
25private static void DrawBackground(Graphics g, Rectangle bounds, TextBoxState state) 33Rectangle fillRect = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 42public static void DrawTextBox(Graphics g, Rectangle bounds, TextBoxState state) 51public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextBoxState state) 59public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextBoxState state) 67public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextFormatFlags flags, TextBoxState state) 70Rectangle textBounds = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (6)
203public Rectangle SizeGripBounds 224return Rectangle.Empty; 373Rectangle displayRect = DisplayRectangle; 378Rectangle lastItemBounds = Rectangle.Empty; 564Rectangle sizeGripBounds = SizeGripBounds;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (26)
41private Rectangle _lastInsertionMarkRect = Rectangle.Empty; 200Rectangle bounds = CommonProperties.GetSpecifiedBounds(this); 726public override Rectangle DisplayRectangle 730Rectangle rect = base.DisplayRectangle; 851public Rectangle GripRectangle 855return (GripStyle == ToolStripGripStyle.Visible) ? Grip.Bounds : Rectangle.Empty; 1783Rectangle regionRect = (item is null) ? Rectangle.Empty : item.Bounds; 1828else if (regionRect != Rectangle.Empty) 1849if (_lastInsertionMarkRect != Rectangle.Empty) 1855Rectangle invalidate = _lastInsertionMarkRect; 1856_lastInsertionMarkRect = Rectangle.Empty; 2650private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 3452Rectangle viewableArea = DisplayRectangle; 3504Rectangle clippingRect = e.ClipRectangle; 3505Rectangle bounds = item.Bounds; 3777if (_lastInsertionMarkRect != Rectangle.Empty) 3839internal void PaintInsertionMark(Rectangle insertionRect) 3872Rectangle comparisonRect = new(point, s_onePixel); 3873Rectangle bounds; 4169Rectangle gripRectangle = Rectangle.Empty; 4170Rectangle displayRect = DisplayRectangle; 4330Rectangle clientBounds = ClientRectangle; 4655void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (2)
16Rectangle arrowRectangle, 27public Rectangle ArrowRectangle { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
68protected override void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (5)
42Rectangle bounds = Bounds; 357Rectangle specifiedBounds = Rectangle.Empty; 372Rectangle bounds = _control.Bounds; 651Rectangle bounds = LayoutUtils.Align(size, Bounds, ControlAlign);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (10)
403public new Rectangle GripRectangle 986internal Rectangle GetDropDownBounds(Rectangle suggestedBounds) 988Rectangle dropDownBounds; 995Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1012internal Rectangle CalculateDropDownLocation(Point start, ToolStripDropDownDirection dropDownDirection) 1023Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize()); 1201Rectangle bounds = Bounds; 1525Rectangle bounds = new(x, y, width, height); 1709Rectangle bounds = Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
198Rectangle dropDownArrowRect = (InternalLayout is ToolStripDropDownButtonInternalLayout layout) ? layout.DropDownArrowRect : Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
16private Rectangle _dropDownArrowRect = Rectangle.Empty; 89public Rectangle DropDownArrowRect
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (14)
116internal virtual Rectangle DropDownButtonArea => Bounds; 140Rectangle bounds = GetDropDownBounds(dropDownDirection); 141Rectangle ownerItemBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 142Rectangle intersectionBetweenChildAndParent = Rectangle.Intersect(bounds, ownerItemBounds); 151int newIntersectionWidth = Rectangle.Intersect(GetDropDownBounds(newDropDownDirection), ownerItemBounds).Width; 300private Rectangle DropDownDirectionToDropDownBounds(ToolStripDropDownDirection dropDownDirection, Rectangle dropDownBounds) 377private Rectangle GetDropDownBounds(ToolStripDropDownDirection dropDownDirection) 379Rectangle dropDownBounds = new(Point.Empty, DropDown.GetSuggestedSize()); 384Rectangle itemScreenBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 386if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Height > 1) 391if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1) 397if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (23)
15private Rectangle _checkRectangle = Rectangle.Empty; 16private Rectangle _imageRectangle = Rectangle.Empty; 17private Rectangle _arrowRectangle = Rectangle.Empty; 18private Rectangle _textRectangle = Rectangle.Empty; 19private Rectangle _imageMarginBounds = Rectangle.Empty; 66internal Rectangle ArrowRectangle => _arrowRectangle; 68internal Rectangle CheckRectangle => _checkRectangle; 89public override Rectangle DisplayRectangle 93Rectangle rect = base.DisplayRectangle; 112internal Rectangle ImageRectangle => _imageRectangle; 132internal Rectangle ImageMargin 197internal Rectangle TextRectangle 382_imageRectangle = Rectangle.Empty; 466Rectangle displayRect = DisplayRectangle; 651Rectangle displayRectangle = DisplayRectangle; 663Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 690Rectangle adjustedLastItemBounds = Items[0].Bounds; 811Rectangle displayRectangle = DisplayRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripGripRenderEventArgs.cs (1)
21public Rectangle GripBounds => ToolStrip.GripRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (13)
57Rectangle bounds = e.GripBounds; 67Rectangle[] shadowRects = new Rectangle[numRectangles]; 135Rectangle bounds = new(Point.Empty, e.Item.Size); 140Rectangle dropDownRect = item.DropDownButtonBounds; 187Rectangle bounds = new(Point.Empty, menuItem.Size); 258Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 287Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 350Rectangle bounds = new(Point.Empty, e.Item.Size); 410Rectangle bounds = new(Point.Empty, e.Item.Size); 442Rectangle bounds = new(Point.Empty, e.Item.Size); 464Rectangle bounds = item.ClientBounds; 508Rectangle imageRect = e.ImageRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (19)
29private Rectangle _bounds = Rectangle.Empty; 546public virtual Rectangle Bounds => _bounds; 551internal Rectangle ClientBounds 555Rectangle client = _bounds; 562public Rectangle ContentRectangle 566Rectangle content = LayoutUtils.InflateRect(InternalLayout.ContentRectangle, Padding); 952Rectangle currentBounds = Bounds; 968Rectangle IArrangedElement.DisplayRectangle => Bounds; 982void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 1807Rectangle currentBounds = Bounds; 2009Rectangle currentBounds = Bounds; 2365public void Invalidate(Rectangle r) 3229protected internal virtual void SetBounds(Rectangle bounds) 3231Rectangle oldBounds = _bounds; 3493internal static bool GetIsOffscreenPropertyValue(ToolStripItemPlacement? toolStripItemPlacement, Rectangle bounds) 3543Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 3545IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 3547List<Rectangle> neighbors = new(3);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (3)
296public override Rectangle Bounds 300Rectangle bounds = Owner.Bounds; 307return Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (6)
32public virtual Rectangle ImageRectangle 37Rectangle imageRect = layoutData.ImageBounds; 56public virtual Rectangle TextRectangle 61Rectangle textRect = layoutData.TextBounds; 67public virtual Rectangle ContentRectangle => LayoutData.Field; 99Rectangle bounds = new(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemImageRenderEventArgs.cs (3)
11public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Rectangle imageRectangle) 25Rectangle imageRectangle) 40public Rectangle ImageRectangle { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (3)
23Rectangle textRectangle, 46Rectangle textRectangle, 91public Rectangle TextRectangle { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
378Rectangle textRect = InternalLayout.TextRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
979Rectangle checkRectangle = menuItemInternalLayout.CheckRectangle; 1065protected internal override void SetBounds(Rectangle rect)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (9)
63public Rectangle ArrowRectangle 73Rectangle arrowRect = menu.ArrowRectangle; 79return Rectangle.Empty; 83public Rectangle CheckRectangle 91Rectangle checkRectangle = menu.CheckRectangle; 103return Rectangle.Empty; 107public override Rectangle ImageRectangle 117Rectangle imageRect = menu.ImageRectangle; 139public override Rectangle TextRectangle
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
75void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
89protected internal override void SetBounds(Rectangle bounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
153internal Rectangle DragBounds 718Rectangle dragRect; 1019Rectangle bounds = LayoutUtils.InflateRect(row.Bounds, row.Margin); 1088Rectangle intersection = c1.Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.cs (1)
17public FeedbackRectangle(Rectangle bounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
18public FeedbackDropDown(Rectangle bounds) : base()
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (6)
25private Rectangle _cachedBounds = Rectangle.Empty; 60public Rectangle CachedBounds 292protected override void SetBoundsCore(Rectangle bounds, BoundsSpecified specified) 309Rectangle displayRectangle = ToolStripPanelRow.DisplayRectangle; 366if (ToolStripPanelRow.Bounds == Rectangle.Empty)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (18)
17private Rectangle _bounds = Rectangle.Empty; 61public Rectangle Bounds 161public Rectangle DisplayRectangle 309protected void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds) 442Rectangle cachedBounds = c.CachedBounds; 461Rectangle cachedBounds = currentCell.CachedBounds; 494Rectangle cachedBounds = c.CachedBounds; 539Rectangle cachedBounds = c.CachedBounds; 558Rectangle cachedBounds = currentCell.CachedBounds; 591Rectangle cachedBounds = c.CachedBounds; 600private void SetBounds(Rectangle bounds) 604Rectangle oldBounds = _bounds; 644Rectangle IArrangedElement.DisplayRectangle 648Rectangle displayRectangle = Bounds; 687void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 701internal Rectangle DragBounds => RowManager.DragBounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (9)
22public override Rectangle DisplayRectangle 26Rectangle displayRect = ((IArrangedElement)Row).DisplayRectangle; 30Rectangle raftingDisplayRectangle = ToolStripPanel.DisplayRectangle; 47public override Rectangle DragBounds 51Rectangle dragBounds = Row.Bounds; 56Rectangle previousRowBounds = ToolStripPanel.RowsInternal[index - 1].Bounds; 65Rectangle nextRowBounds = ToolStripPanel.RowsInternal[index + 1].Bounds; 556protected internal override void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowManager.cs (6)
37public virtual Rectangle DragBounds 39get { return Rectangle.Empty; } 42public virtual Rectangle DisplayRectangle 44get { return Rectangle.Empty; } 192protected internal virtual void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (9)
23public override Rectangle DisplayRectangle 27Rectangle displayRect = ((IArrangedElement)Row).DisplayRectangle; 31Rectangle raftingDisplayRectangle = ToolStripPanel.DisplayRectangle; 48public override Rectangle DragBounds 52Rectangle dragBounds = Row.Bounds; 57Rectangle previousRowBounds = ToolStripPanel.RowsInternal[index - 1].Bounds; 66Rectangle nextRowBounds = ToolStripPanel.RowsInternal[index + 1].Bounds; 346protected internal override void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (57)
165Rectangle overflowArrowRect; 230Rectangle bounds = new(Point.Empty, item.Size); 266Rectangle bounds = new(Point.Empty, item.Size); 269Rectangle fillRect = item.Selected ? item.ContentRectangle : bounds; 282Rectangle buttonBounds = item.ButtonBounds; 296Rectangle dropDownRect = item.DropDownButtonBounds; 347Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 355Rectangle fillRect = item is not null && item.Selected ? item.ContentRectangle : bounds; 417Rectangle bounds = new(Point.Empty, toolStrip.Size); 454Rectangle edging; 483Rectangle bounds = e.GripBounds; 498Rectangle[] shadowRects = new Rectangle[numRectangles]; 546Rectangle bounds = new(Point.Empty, item.Size); 592Rectangle fillRect = bounds; 649Rectangle fillRect = bounds; 697Rectangle bounds = e.AffectedBounds; 743Rectangle imageRect = e.ImageRectangle; 758if (imageRect != Rectangle.Empty && image is not null) 846Rectangle bounds = new(Point.Empty, toolStrip.Size); 860Rectangle topLeftParentHorizontalPixels = new(topLeft, s_onePix); 861Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1)); 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); 869Rectangle topRightHorizontalPixels, topRightVerticalPixels; 953private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal) 960Rectangle endGradient = bounds; 961Rectangle beginGradient = bounds; 1045Rectangle bounds = ScaleHelper.IsScalingRequired 1079private void RenderPressedGradient(Graphics g, Rectangle bounds) 1108Rectangle bounds = new(Point.Empty, item.Size); 1110Rectangle fillRect = item.Selected ? item.ContentRectangle : bounds; 1141Rectangle gradientBounds = new(Point.Empty, parent.Size); 1155Rectangle gradientBounds = new(Point.Empty, control.Size); 1174Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1183Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1195Rectangle bounds = new(Point.Empty, toolStripDropDown.Size); 1217Rectangle overflowBoundsFill = new(Point.Empty, e.Item.Size); 1218Rectangle bounds = overflowBoundsFill; 1321Rectangle fillRect = new(overflowBoundsFill.X - 1, 0, 1, 1); 1338Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1340Rectangle displayRect = toolStrip.DisplayRectangle; 1354Rectangle topLeftShadowRect = new(topLeft, s_onePix); 1358Rectangle topLeftShadowRect2 = new(topLeft, s_onePix); 1362Rectangle topRightShadowRect = new(topRight, s_onePix); 1366Rectangle topRightShadowRect2 = topRightShadowRect; 1370Rectangle[] paintRects = [topLeftShadowRect, topLeftShadowRect2, topRightShadowRect, topRightShadowRect2]; 1377paintRects[i] = Rectangle.Empty; 1396Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1404private void RenderSelectedButtonFill(Graphics g, Rectangle bounds) 1428private void RenderCheckedButtonFill(Graphics g, Rectangle bounds) 1452private void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 1540private void RenderPressedButtonFill(Graphics g, Rectangle bounds) 1567Rectangle bounds = new(Point.Empty, item.Size); 1570Rectangle fillRect = (item.Selected) ? item.ContentRectangle : bounds; 1646private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (13)
56private static readonly Rectangle[] s_baseSizeGripRectangles = [ 616Rectangle dropDownRect = e.ArrowRectangle; 778Rectangle imageRect = e.ImageRectangle; 781if (imageRect != Rectangle.Empty && image is not null) 821Rectangle imageRect = e.ImageRectangle; 824if (imageRect != Rectangle.Empty && image is not null) 869Rectangle textRect = e.TextRectangle; 973Rectangle sizeGripBounds = statusStrip.SizeGripBounds; 977Rectangle[] whiteRectangles = new Rectangle[s_baseSizeGripRectangles.Length]; 978Rectangle[] greyRectangles = new Rectangle[s_baseSizeGripRectangles.Length]; 982Rectangle baseRect = s_baseSizeGripRectangles[i];
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (10)
26Rectangle affectedBounds, 43public Rectangle AffectedBounds { get; } 92public Rectangle ConnectedArea 103return Rectangle.Empty; 109Rectangle itemBounds = new(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size); 111Rectangle overlap = ToolStrip.ClientRectangle; 119return Rectangle.Empty; 130return Rectangle.Empty; 133return Rectangle.Empty; 139return Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
306protected internal override void SetBounds(Rectangle rect)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (11)
17private Rectangle _dropDownButtonBounds = Rectangle.Empty; 21private Rectangle _splitterBounds = Rectangle.Empty; 83public Rectangle ButtonBounds 172internal override Rectangle DropDownButtonArea => DropDownButtonBounds; 178public Rectangle DropDownButtonBounds => _dropDownButtonBounds; 290public Rectangle SplitterBounds 301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight)); 545private void SetDropDownButtonBounds(Rectangle rect) => _dropDownButtonBounds = rect;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (4)
38public override Rectangle ImageRectangle 42Rectangle imageRect = base.ImageRectangle; 49public override Rectangle TextRectangle 53Rectangle textRect = base.TextRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (5)
139Rectangle insertionRect = Rectangle.Empty; 161Rectangle insertionRect = _owner.DisplayRectangle; 174Rectangle bounds = _owner.DisplayedItems[i].Bounds; 204private RelativeLocation ComparePositions(Rectangle orig, Point check)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (24)
12private Rectangle _displayRectangle = Rectangle.Empty; 177_displayRectangle = Rectangle.Empty; 211Rectangle clientRectangle = toolStrip.ClientRectangle; 217Rectangle alignedLeftItems = Rectangle.Empty; 218Rectangle alignedRightItems = Rectangle.Empty; 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)); 339Rectangle bounds = LayoutUtils.VAlign(item.Size, _displayRectangle, AnchorStyles.None); 357Rectangle clientRectangle = toolStrip.ClientRectangle; 362Rectangle alignedLeftItems = Rectangle.Empty; 363Rectangle alignedRightItems = Rectangle.Empty; 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)); 472Rectangle bounds = LayoutUtils.HAlign(item.Size, _displayRectangle, AnchorStyles.None); 495Rectangle itemBounds = new(itemLocation, itemSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (18)
74private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 187Rectangle bounds = e.AffectedBounds; 238Rectangle bounds = toolStrip.ClientRectangle; 279Rectangle bounds = new(Point.Empty, e.GripBounds.Size); 421Rectangle bounds = new(Point.Empty, item.Size); 444Rectangle fillRect = new(Point.Empty, item.Size); 530Rectangle bounds = new(Point.Empty, splitButton.Size); 547Rectangle splitButtonBounds = splitButton.ButtonBounds; 564Rectangle fillRect = splitButton.ContentRectangle; 584var clientBounds = item.ClientBounds; 594Rectangle splitButtonButtonRect = splitButton.ButtonBounds; 599Rectangle fillRect = splitButton.Selected ? splitButton.ContentRectangle : bounds; 615Rectangle dropDownRect = splitButton.DropDownButtonBounds; 661var bounds = item.ClientBounds; 671Rectangle fillRect = item.ContentRectangle; 689private static void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 744private static void RenderSmall3DBorderInternal(Graphics g, Rectangle bounds, ToolBarState state, bool rightToLeft) 793Rectangle fillRect = item.ContentRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
92Rectangle bounds = CommonProperties.GetSpecifiedBounds(TextBox);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
51private Rectangle AbsoluteClientRectangle => AbsoluteClientRECT; 254Rectangle clientRect = AbsoluteClientRectangle;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
393Rectangle r = Bounds;
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (2)
22public override Rectangle Bounds 28return Rectangle.Empty;
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (3)
20public override Rectangle Bounds 26return Rectangle.Empty; 31return ParentInternal?.SystemIAccessible.TryGetLocation(GetChildId()) ?? Rectangle.Empty;
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (10)
28public static void DrawHorizontalTrack(Graphics g, Rectangle bounds) 38public static void DrawVerticalTrack(Graphics g, Rectangle bounds) 48public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 58public static void DrawVerticalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 68public static void DrawLeftPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 78public static void DrawRightPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 88public static void DrawTopPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 98public static void DrawBottomPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 108public static void DrawHorizontalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 138public static void DrawVerticalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle)
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (2)
19Rectangle bounds, 41public Rectangle Bounds { get; }
System\Windows\Forms\Controls\TreeView\TreeNode.cs (6)
227public Rectangle Bounds 234return Rectangle.Empty; 244return Rectangle.Empty; 255internal Rectangle RowBounds 267return Rectangle.Empty; 273return Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (6)
18Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => RectangleToScreen(Bounds); 20IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 24List<Rectangle> neighboringRectangles = []; 59private Rectangle RectangleToScreen(Rectangle bounds) 61return TreeView?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (2)
23public override Rectangle Bounds 29return Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
2746Rectangle bounds = node.RowBounds; 2827Rectangle bounds = node.Bounds; 2929Rectangle bounds = tn.Bounds; 3151Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (2)
17internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out ListBox? owner) ? 18owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (15)
453internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 518Rectangle editBounds = _upDownEdit.Bounds; 525Rectangle bounds = ClientRectangle; 526Rectangle clipBounds = e.ClipRectangle; 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); 547Rectangle backRect = editBounds; 559Rectangle backRect = editBounds; 834Rectangle upDownEditBounds = Rectangle.Empty; 835Rectangle upDownButtonsBounds = Rectangle.Empty; 837Rectangle clientArea = new(Point.Empty, ClientSize);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (3)
145Rectangle rect = ClientRectangle; 184Rectangle rectUp = ClientRectangle, rectDown = ClientRectangle; 323Rectangle clientRect = ClientRectangle;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (4)
27public override Rectangle Bounds 33return Rectangle.Empty; 37Rectangle bounds = owner.Bounds; 46return owner.ParentInternal?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (3)
91public Rectangle ClientRectangle 295public Rectangle OffsetRectangle 394public Rectangle ScrollRectangle
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
159public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\Design\ComponentEditorForm.cs (3)
235Rectangle pageHostBounds = new(2 * BUTTON_PAD + selectorWidth, 2 * BUTTON_PAD + STRIP_HEIGHT, 243Rectangle pageBounds = new(0, 0, pageHostBounds.Width, pageHostBounds.Height); 252Rectangle bounds = pageHostBounds;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
97Rectangle screen = Screen.GetWorkingArea(Control.MousePosition);
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (2)
33public override Rectangle Bounds 36: Rectangle.Empty;
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (1)
206internal Rectangle GetIconBounds(Size size)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (6)
25private Rectangle _windowBounds; 195Rectangle bounds = item.GetIconBounds(_provider.Region.Size); 308_windowBounds = Rectangle.Empty; 312Rectangle iconBounds = item.GetIconBounds(size); 313_windowBounds = _windowBounds.IsEmpty ? iconBounds : Rectangle.Union(_windowBounds, iconBounds); 321Rectangle iconBounds = item.GetIconBounds(size);
System\Windows\Forms\Form.AccessibleObject.cs (4)
21public override Rectangle Bounds => this.IsOwnerHandleCreated(out Control? owner) 23: Rectangle.Empty; 25internal override Rectangle BoundingRectangle 27? Rectangle.Empty
System\Windows\Forms\Form.cs (23)
151private Rectangle _restoredWindowBounds = new(-1, -1, -1, -1); 158private Rectangle _restoreBounds = new(-1, -1, -1, -1); 681Rectangle preClientUpdateRestoredWindowBounds = _restoredWindowBounds; 895public Rectangle DesktopBounds 899Rectangle screen = SystemInformation.WorkingArea; 900Rectangle bounds = Bounds; 922Rectangle screen = SystemInformation.WorkingArea; 1160protected Rectangle MaximizedBounds 1162get => Properties.GetValueOrDefault<Rectangle>(s_propMaximizedBounds); 1316Rectangle bounds = Bounds; 1667public Rectangle RestoreBounds 3047Rectangle bounds = Bounds; 3650Rectangle clientRect = mdiclient is null ? Rectangle.Empty : mdiclient.ClientRectangle; 3672Rectangle screenRect = desktop.WorkingArea; 3857Rectangle screenRect = desktop.WorkingArea; 3913Rectangle screenRect = desktop.WorkingArea; 5131protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 5323Rectangle workingArea = SystemInformation.WorkingArea; 5332Rectangle workingArea = SystemInformation.WorkingArea; 6762Rectangle maximizedBounds = MaximizedBounds; 6775private unsafe void WmGetMinMaxInfoHelper(ref Message m, Size minTrack, Size maxTrack, Rectangle maximizedBounds)
System\Windows\Forms\Input\Cursor.cs (8)
115/// Gets or sets a <see cref="Rectangle"/> that represents the current clipping 118public static unsafe Rectangle Clip 248private void DrawImageCore(Graphics graphics, Rectangle imageRect, Rectangle targetRect, bool stretch) 350public void Draw(Graphics g, Rectangle targetRect) 352DrawImageCore(g, Rectangle.Empty, targetRect, stretch: false); 358public void DrawStretched(Graphics g, Rectangle targetRect) 360DrawImageCore(g, Rectangle.Empty, targetRect, stretch: true);
System\Windows\Forms\Internal\WinFormsUtils.cs (7)
63internal static Rectangle ConstrainToScreenWorkingAreaBounds(Rectangle bounds) 71internal static Rectangle ConstrainToScreenBounds(Rectangle bounds) 76internal static Rectangle ConstrainToBounds(Rectangle constrainingBounds, Rectangle bounds)
System\Windows\Forms\Layout\ArrangedElement.cs (10)
13private Rectangle _bounds = Rectangle.Empty; 27public Rectangle Bounds 55public virtual Rectangle DisplayRectangle 59Rectangle displayRectangle = Bounds; 166protected virtual void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds) 171public void SetBounds(Rectangle bounds, BoundsSpecified specified) 178protected virtual void SetBoundsCore(Rectangle bounds, BoundsSpecified specified) 182Rectangle oldBounds = _bounds;
System\Windows\Forms\Layout\CommonProperties.cs (6)
151internal static Rectangle GetSpecifiedBounds(IArrangedElement element) => 152element.Properties.TryGetValue(s_specifiedBoundsProperty, out Rectangle rectangle) 206Rectangle bounds = element.Bounds; 230Rectangle bounds = element.Bounds; 286Rectangle originalBounds = GetSpecifiedBounds(element); 336Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
690internal override Rectangle GetToolNativeScreenRectangle() 1374internal void ScaleContainerForDpi(int deviceDpiNew, int deviceDpiOld, Rectangle suggestedRectangle)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (12)
45private Rectangle _splitterRect; 762public Rectangle SplitterRectangle 766Rectangle r = _splitterRect; 988Rectangle r = CalcSplitLine(_splitterDistance, 0); 1101Rectangle r = CalcSplitLine(GetSplitterDistance(e.X, e.Y), 0); 1373private Rectangle CalcSplitLine(int splitSize, int minWeight) 1375Rectangle r = default; 1461private void DrawFocus(Graphics g, Rectangle r) 1473Rectangle r = CalcSplitLine(splitSize, 3); 2280internal override Rectangle GetToolNativeScreenRectangle() 2283Rectangle containerRectangle = base.GetToolNativeScreenRectangle(); 2284Rectangle splitterRectangle = SplitterRectangle;
System\Windows\Forms\Layout\DefaultLayout.AnchorInfo.cs (1)
25public Rectangle DisplayRectangle;
System\Windows\Forms\Layout\DefaultLayout.cs (42)
32Rectangle bounds = GetCachedBounds(element); 48Rectangle newBounds = bounds; 78private static Rectangle GetGrowthBounds(IArrangedElement element, Size newSize) 81Rectangle oldBounds = GetCachedBounds(element); 99Rectangle newBounds = new(location, newSize); 150private static Rectangle GetAnchorDestination(IArrangedElement element, Rectangle displayRect, bool measureOnly) 158private static Rectangle ComputeAnchoredBoundsV2(IArrangedElement element, Rectangle displayRectangle) 160Rectangle bounds = GetCachedBounds(element); 237private static Rectangle ComputeAnchoredBounds(IArrangedElement element, Rectangle displayRect, bool measureOnly) 295Rectangle cachedBounds = GetCachedBounds(element); 352Rectangle displayRectangle = container.DisplayRectangle; 380Rectangle remainingBounds = measureOnly ? Rectangle.Empty : container.DisplayRectangle; 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); 484private static void TryCalculatePreferredSizeDockedControl(IArrangedElement element, Rectangle newElementBounds, bool measureOnly, ref Size preferredSize, ref Rectangle remainingBounds) 733Rectangle cachedBounds = GetCachedBounds(element); 742Rectangle elementBounds = element.Bounds; 748Rectangle parentDisplayRect = element.Container.DisplayRectangle; 877Rectangle displayRectangle = control.Parent!.DisplayRectangle; 878Rectangle elementBounds = GetCachedBounds(control); 988Rectangle displayRect = element.Container!.DisplayRectangle; 1003private static Rectangle GetCachedBounds(IArrangedElement element) 1012return (Rectangle)bounds; 1028Rectangle displayRectangle = container.DisplayRectangle; 1059Rectangle bounds = (Rectangle)entry.Value!; 1072private static void SetCachedBounds(IArrangedElement element, Rectangle bounds) 1124Rectangle elementSpace = LayoutUtils.InflateRect(GetCachedBounds(element), margin); 1147Rectangle bounds = GetCachedBounds(element); 1152Rectangle anchorDest = GetAnchorDestination(element, Rectangle.Empty, measureOnly: true); 1163Rectangle anchorDest = GetAnchorDestination(element, Rectangle.Empty, measureOnly: true); 1167Rectangle bounds = GetCachedBounds(element);
System\Windows\Forms\Layout\FlowLayout.BottomUpProxy.cs (1)
27public override Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (6)
32private Rectangle _displayRect; 45public virtual Rectangle Bounds 93public Rectangle DisplayRect 134protected Rectangle RTLTranslateNoMarginSwap(Rectangle bounds) 136Rectangle newBounds = bounds;
System\Windows\Forms\Layout\FlowLayout.cs (8)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints); 53private static Size TryCalculatePreferredSize(IArrangedElement container, Rectangle displayRect, bool measureOnly) 76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 86Rectangle rowBounds = new(displayRect.X, 117Rectangle rowBounds) 141Rectangle displayRectangle, 161Rectangle rowBounds, 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs (1)
52public virtual Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.RightToLeftProxy.cs (1)
16public override Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.VerticalElementProxy.cs (1)
44public override Rectangle Bounds
System\Windows\Forms\Layout\IArrangedElement.cs (3)
14Rectangle Bounds { get; } 21void SetBounds(Rectangle bounds, BoundsSpecified specified); 35Rectangle DisplayRectangle { get; }
System\Windows\Forms\Layout\LayoutUtils.cs (43)
16public static readonly Rectangle s_maxRectangle = new(0, 0, int.MaxValue, int.MaxValue); 219public static bool IsIntersectHorizontally(Rectangle rect1, Rectangle rect2) 241public static bool IsIntersectVertically(Rectangle rect1, Rectangle rect2) 275public static Rectangle AlignAndStretch(Size fitThis, Rectangle withinThis, AnchorStyles anchorStyles) 280public static Rectangle Align(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 285public static Rectangle Align(Size alignThis, Rectangle withinThis, ContentAlignment align) 290public static Rectangle HAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 306private static Rectangle HAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 322public static Rectangle VAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 338public static Rectangle VAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 372public static Rectangle InflateRect(Rectangle rect, Padding padding) 381public static Rectangle DeflateRect(Rectangle rect, Padding padding) 440public static Rectangle FlipRectangle(Rectangle rect) 448public static Rectangle FlipRectangleIf(bool condition, Rectangle rect) 488public static bool IsZeroWidthOrHeight(Rectangle rectangle) 503public static void SplitRegion(Rectangle bounds, Size specifiedContent, AnchorStyles region1Align, out Rectangle region1, out Rectangle region2) 533Debug.Assert(Rectangle.Union(region1, region2) == bounds, 538public static void ExpandRegionsToFillBounds(Rectangle bounds, AnchorStyles region1Align, ref Rectangle region1, ref Rectangle region2) 567Debug.Assert(Rectangle.Union(region1, region2) == bounds, "region1 and region2 do not add up to bounds."); 589private static Rectangle SubstituteSpecifiedBounds(Rectangle originalBounds, Rectangle substitutionBounds, AnchorStyles specified) 595return Rectangle.FromLTRB(left, top, right, bottom); 601public static Rectangle RTLTranslate(Rectangle bounds, Rectangle withinBounds)
System\Windows\Forms\Layout\TableLayout.cs (6)
1250Rectangle cellBounds = new((int)(startX + cellBorderWidth / 2.0f), (int)(top + cellBorderWidth / 2.0f), width - cellBorderWidth, height - cellBorderWidth); 1268Rectangle elementBounds = LayoutUtils.AlignAndStretch(GetElementSize(element, cellBounds.Size), cellBounds, anchorStyles); 1474Rectangle elementBounds1 = layoutInfo1.Element.Bounds; 1475Rectangle cellsOccupied1 = new(layoutInfo1.ColumnStart, layoutInfo1.RowStart, layoutInfo1.ColumnSpan, layoutInfo1.RowSpan); 1479Rectangle elementBounds2 = layoutInfo2.Element.Bounds; 1480Rectangle cellsOccupied2 = new(layoutInfo2.ColumnStart, layoutInfo2.RowStart, layoutInfo2.ColumnSpan, layoutInfo2.RowSpan);
System\Windows\Forms\MDI\MDIClient.cs (4)
194Rectangle bounds = Bounds; 230Rectangle oldBounds = Bounds; 232Rectangle newBounds = Bounds; 289Rectangle bounds = Bounds;
System\Windows\Forms\OLE\DataObject.Composition.Binder.cs (2)
102typeof(Drawing.Rectangle), 222|| typeof(T) == typeof(Drawing.Rectangle)
System\Windows\Forms\Panels\Panel.cs (1)
228private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Panels\Panel.PanelAccessibleObject.cs (2)
18internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out Panel? owner) ? 19owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutCellPaintEventArgs.cs (5)
16Rectangle clipRectangle, 17Rectangle cellBounds, 29Rectangle clipRectangle, 30Rectangle cellBounds, 40public Rectangle CellBounds { get; }
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (5)
352Rectangle displayRect = DisplayRectangle; 353Rectangle clipRect = e.ClipRectangle; 380Rectangle outsideCellBounds = new( 386Rectangle insideCellBounds = new( 432Rectangle tableBounds = new(
System\Windows\Forms\Printing\PrintPreviewControl.cs (14)
353Rectangle rect = InsideRectangle; 424private Rectangle InnerClientRectangle 428Rectangle rect = ClientRectangle; 437private Rectangle InsideRectangle 441Rectangle rect = InnerClientRectangle; 462private Rectangle FocusRectangle => new(0, 0, Width - 1, Height - 1); 464private Rectangle ResizeBoxRectangle => new(_vScrollBar.Left, _hScrollBar.Top, _vScrollBar.Width, _hScrollBar.Height); 593private void DrawMessage(Graphics g, Rectangle rect, bool isExceptionPrinting) 614private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages, Brush backBrush) 634Rectangle[] pageRenderArea = new Rectangle[_rows * _columns]; 685Rectangle box = pageRenderArea[i]; 717Rectangle focusRect = FocusRectangle; 792Rectangle availableRect = InnerClientRectangle;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System\Windows\Forms\PropertyStore.cs (2)
197else if (typeof(T) == typeof(Rectangle)) 199AddOrUpdate(key, Unsafe.As<T, Rectangle>(ref value));
System\Windows\Forms\Rendering\ControlPaint.cs (55)
70internal static Rectangle CalculateBackgroundImageRectangle(Rectangle bounds, Size imageSize, ImageLayout imageLayout) 72Rectangle result = bounds; 394internal static void PrintBorder(Graphics graphics, Rectangle bounds, BorderStyle style, Border3DStyle b3dStyle) 419Rectangle bounds, 420Rectangle clipRect, 445Rectangle imageRectangle = CalculateBackgroundImageRectangle(bounds, backgroundImage.Size, backgroundImageLayout); 474Rectangle imageRect = imageRectangle; 476Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 488Rectangle imageRect = imageRectangle; 490Rectangle partOfImageToDraw = new( 521public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 549Rectangle bounds, 568Rectangle bounds, 976public static void DrawBorder3D(Graphics graphics, Rectangle rectangle) 986public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style) 997public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides) 1055private static void DrawBorderComplex(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 1142Rectangle bounds, 1179public static void DrawButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1201Rectangle rectangle, 1227public static void DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1255public static void DrawComboButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1273public static void DrawContainerGrabHandle(Graphics graphics, Rectangle bounds) 1317private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1339Rectangle rectangle, 1348Rectangle offsetRectangle = new( 1397public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) 1404public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) 1407internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1410internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1413private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color color, bool highContrast, bool blackAndWhite = false) 1483public static void DrawGrabHandle(Graphics graphics, Rectangle rectangle, bool primary, bool enabled) 1495Rectangle fillRect = new( 1510public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1558Rectangle destination, 1580internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1600internal static void DrawImageDisabled(Graphics graphics, Image image, Rectangle imageBounds, bool unscaledImage) 1666internal static void EnforceHeaderCellDividerContrast(Graphics graphics, Rectangle bounds) 1683public static void DrawLockedFrame(Graphics graphics, Rectangle rectangle, bool primary) 1701public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph) 1710Rectangle rectangle, 1746public static void DrawMixedCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1763public static void DrawRadioButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1785public static void DrawReversibleFrame(Rectangle rectangle, Color backColor, FrameStyle style) 1845public static void DrawScrollButton(Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state) 1870Rectangle outsideRect, 1871Rectangle insideRect, 1887public static void DrawSizeGrip(Graphics graphics, Color backColor, Rectangle bounds) 1981Rectangle layoutRectangle, 1998Rectangle layoutRectangle, 2021public static void DrawVisualStyleBorder(Graphics graphics, Rectangle bounds) 2035public static void FillReversibleRectangle(Rectangle rectangle, Color backColor) 2322Rectangle bound) 2355internal static void PaintTableCellBorder(TableLayoutPanelCellBorderStyle borderStyle, Graphics g, Rectangle bound)
System\Windows\Forms\Rendering\DCMapping.cs (1)
29public unsafe DCMapping(HDC hdc, Rectangle bounds)
System\Windows\Forms\Rendering\DpiChangedEventArgs.cs (1)
29public Rectangle SuggestedRectangle { get; }
System\Windows\Forms\Rendering\DrawingEventArgs.cs (3)
32Rectangle clipRect, 48Rectangle clipRect, 69internal Rectangle ClipRectangle { get; }
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (6)
11/// including the item index, the <see cref="Rectangle"/> in which the drawing should be done, and the 31public DrawItemEventArgs(Graphics graphics, Font? font, Rectangle rect, int index, DrawItemState state) 42Rectangle rect, 59Rectangle rect, 68Rectangle rect, 95public Rectangle Bounds => _event.ClipRectangle;
System\Windows\Forms\Rendering\InvalidateEventArgs.cs (3)
17public InvalidateEventArgs(Rectangle invalidRect) 23/// Gets a value indicating the <see cref="Rectangle"/> that contains the 26public Rectangle InvalidRect { get; }
System\Windows\Forms\Rendering\PaintEventArgs.cs (5)
37public PaintEventArgs(Graphics graphics, Rectangle clipRect) : this( 47Rectangle clipRect) 57Rectangle clipRect, 69Rectangle clipRect, 80public Rectangle ClipRectangle => _event.ClipRectangle;
System\Windows\Forms\Rendering\TextExtensions.cs (4)
53Rectangle bounds, 151public static unsafe Rectangle AdjustForVerticalAlignment( 154Rectangle bounds, 180Rectangle adjustedBounds = bounds;
System\Windows\Forms\Rendering\TextRenderer.cs (18)
149public static void DrawText(IDeviceContext dc, string? text, Font? font, Rectangle bounds, Color foreColor) 158/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 165Rectangle bounds, 173Rectangle bounds, 185/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 193Rectangle bounds, 202Rectangle bounds, 214/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 225Rectangle bounds, 241Rectangle bounds, 254/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 266Rectangle bounds, 293Rectangle bounds, 316Rectangle bounds, 325Rectangle bounds, 349Rectangle bounds, 359Rectangle bounds, 392/// <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font?, Rectangle, Color, TextFormatFlags)"/>
System\Windows\Forms\Screen.cs (14)
19private readonly Rectangle _bounds; 24private Rectangle _workingArea = Rectangle.Empty; 139public Rectangle Bounds => _bounds; 181public unsafe Rectangle WorkingArea 257public static Screen FromRectangle(Rectangle rect) 283public static Rectangle GetWorkingArea(Point pt) => FromPoint(pt).WorkingArea; 288public static Rectangle GetWorkingArea(Rectangle rect) => FromRectangle(rect).WorkingArea; 293public static Rectangle GetWorkingArea(Control ctl) => FromControl(ctl).WorkingArea; 298public static Rectangle GetBounds(Point pt) => FromPoint(pt).Bounds; 303public static Rectangle GetBounds(Rectangle rect) => FromRectangle(rect).Bounds; 308public static Rectangle GetBounds(Control ctl) => FromControl(ctl).Bounds;
System\Windows\Forms\Scrolling\ScrollableControl.cs (27)
27private Rectangle _displayRect = Rectangle.Empty; 123Rectangle rect = GetDisplayRectInternal(); 190public override Rectangle DisplayRectangle 194Rectangle rect = ClientRectangle; 214Rectangle IArrangedElement.DisplayRectangle 218Rectangle displayRectangle = DisplayRectangle; 283Rectangle display = GetDisplayRectInternal(); 291Rectangle client = ClientRectangle; 306private bool ApplyScrollbarChanges(Rectangle display) 311Rectangle currentClient = ClientRectangle; 312Rectangle fullClient = currentClient; 313Rectangle minClient = fullClient; 460Rectangle bounds = current.Bounds; 500Rectangle clientToBe = fullClient; 551private Rectangle GetDisplayRectInternal() 616Rectangle client = ClientRectangle; 632Rectangle client = ClientRectangle; 735Rectangle display = GetDisplayRectInternal(); 749Rectangle client = ClientRectangle; 754Rectangle displayRectangle = _displayRect; 830Rectangle client = ClientRectangle; 854Rectangle client = ClientRectangle; 860Rectangle bounds = activeControl.Bounds; 1145Rectangle displayRect = _displayRect; 1265Rectangle client = ClientRectangle; 1360Rectangle client = ClientRectangle;
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
484protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarChildAccessibleObject.cs (2)
21public override Rectangle Bounds 27return Rectangle.Empty;
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (10)
27public static void DrawArrowButton(Graphics g, Rectangle bounds, ScrollBarArrowButtonState state) 37public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 47public static void DrawVerticalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 57public static void DrawHorizontalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 67public static void DrawVerticalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 77public static void DrawRightHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 87public static void DrawLeftHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 97public static void DrawUpperVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 107public static void DrawLowerVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 117public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
System\Windows\Forms\SystemInformation.cs (2)
181public static Rectangle WorkingArea 449public static Rectangle VirtualScreen
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
23Rectangle bounds, 57public Rectangle Bounds { get; }
System\Windows\Forms\ToolTip\IKeyboardToolTip.cs (2)
19Rectangle GetNativeScreenRectangle(); 25IList<Rectangle> GetNeighboringToolsRectangles();
System\Windows\Forms\ToolTip\ToolTip.cs (17)
1479Rectangle toolRectangle = tool.GetNativeScreenRectangle(); 1547private Point GetOptimalToolTipPosition(IKeyboardToolTip tool, Rectangle toolRectangle, int width, int height) 1553Rectangle[] possibleLocations = 1562IList<Rectangle> neighboringToolsRectangles = tool.GetNeighboringToolsRectangles(); 1570foreach (Rectangle neighboringToolRectangle in neighboringToolsRectangles) 1572Rectangle intersection = Rectangle.Intersect(possibleLocations[i], neighboringToolRectangle); 1581Rectangle screenBounds = SystemInformation.VirtualScreen; 1585Rectangle locationAreaWithinScreen = Rectangle.Intersect(screenBounds, possibleLocations[i]); 1595Rectangle topContainerBounds = ((IKeyboardToolTip?)TopLevelControl)?.GetNativeScreenRectangle() ?? Rectangle.Empty; 1600Rectangle locationWithinTopControlRectangle = Rectangle.Intersect(topContainerBounds, possibleLocations[i]); 1613Rectangle optimalLocation = possibleLocations[0]; 2318Rectangle bounds = paintScope.PaintRectangle; 2319if (bounds == Rectangle.Empty)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (33)
211public void DrawBackground(IDeviceContext dc, Rectangle bounds) 219internal unsafe void DrawBackground(HDC dc, Rectangle bounds, HWND hwnd = default) 240public void DrawBackground(IDeviceContext dc, Rectangle bounds, Rectangle clipRectangle) 248internal unsafe void DrawBackground(HDC dc, Rectangle bounds, Rectangle clipRectangle, HWND hwnd) 267public Rectangle DrawEdge(IDeviceContext dc, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 275internal unsafe Rectangle DrawEdge(HDC dc, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 299public void DrawImage(Graphics g, Rectangle bounds, Image image) 314public void DrawImage(Graphics g, Rectangle bounds, ImageList imageList, int imageIndex) 335public void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl) 355public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw) 363public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw, bool drawDisabled) 371public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw, bool drawDisabled, TextFormatFlags flags) 379internal void DrawText(HDC dc, Rectangle bounds, string? textToDraw, bool drawDisabled, TextFormatFlags flags) 405public Rectangle GetBackgroundContentRectangle(IDeviceContext dc, Rectangle bounds) 413internal Rectangle GetBackgroundContentRectangle(HDC dc, Rectangle bounds) 417return Rectangle.Empty; 427public Rectangle GetBackgroundExtent(IDeviceContext dc, Rectangle contentBounds) 433return Rectangle.Empty; 446public unsafe Region? GetBackgroundRegion(IDeviceContext dc, Rectangle bounds) 598public unsafe Size GetPartSize(IDeviceContext dc, Rectangle bounds, ThemeSizeType type) 658public unsafe Rectangle GetTextExtent(IDeviceContext dc, string textToDraw, TextFormatFlags flags) 681public unsafe Rectangle GetTextExtent(IDeviceContext dc, Rectangle bounds, string textToDraw, TextFormatFlags flags) 716public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, Point pt, HitTestOptions options) 738public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options) 750public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
System.Windows.Forms.Design (516)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
572Rectangle button = e.Bounds with { Width = w }; 587Rectangle res = e.Bounds with { X = e.Bounds.X + offset, Width = e.Bounds.Width - offset }; 598Rectangle baseVar = new(e.Bounds.X + offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3);
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
16private Rectangle _dropDownRectangle; 196Rectangle bounds = new(0, 0, Width, Height); 242private static void PaintArrow(IDeviceContext deviceContext, Rectangle dropDownRect)
System\ComponentModel\Design\DesignerActionPanel.cs (4)
232public static Point ComputePreferredDesktopLocation(Rectangle rectangleAnchor, Size sizePanel, out DockStyle edgeToDock) 234Rectangle rectScreen = Screen.FromPoint(rectangleAnchor.Location).WorkingArea; 474Rectangle rect = Bounds; 491Rectangle originalClip = e.ClipRectangle;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (5)
294Rectangle rect = new(1, 1, width - 2, height - 2); 344Rectangle editorBounds = new(Point.Empty, EditRegionSize); 347Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea; 368Rectangle editorBounds = new(Point.Empty, EditRegionSize); 371Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea;
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
290Rectangle editRect = new(EditRegionRelativeLocation, EditRegionSize);
System\ComponentModel\Design\DesignerActionUI.cs (2)
198Rectangle trayBounds = trayControl.Bounds; 656Rectangle rectGlyph = new(glyphLocationScreenCoord, glyph.Bounds.Size);
System\ComponentModel\Design\FlowLayoutPanelDesigner.cs (2)
15public Rectangle MarginBounds; 20public Rectangle ControlBounds;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
163Rectangle workingArea = Screen.GetWorkingArea(this); 239Rectangle workingArea = Screen.GetWorkingArea(this);
System\ComponentModel\Design\SelectionService.cs (1)
473_statusCommandUI.SetStatusInformation(Rectangle.Empty);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
27public override Rectangle Bounds 32Rectangle rect = default;
System\Drawing\Design\ColorEditor.ColorPalette.cs (10)
121private static void FillRectWithCellBounds(int across, int down, ref Rectangle rect) 207Rectangle r = default; 209Invalidate(Rectangle.Inflate(r, 5, 5)); 218Rectangle r = default; 220Invalidate(Rectangle.Inflate(r, 5, 5)); 363Rectangle rect = new() 385Rectangle.Inflate(rect, 3, 3), 396Rectangle.Inflate(rect, 5, 5), 403Rectangle.Inflate(rect, 2, 2), 414private static void PaintValue(Color color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (3)
87Rectangle rectItemSize = _tabControl.GetTabRect(0); 309Rectangle rectTabControl = _tabControl.TabPages[0].ClientRectangle; 310Rectangle rectItemSize = _tabControl.GetTabRect(1);
System\Drawing\Design\IconEditor.cs (1)
118Rectangle rectangle = e.Bounds;
System\Drawing\Design\ImageEditor.cs (1)
176Rectangle r = e.Bounds;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (3)
184Rectangle rc = ClientRectangle; 200Rectangle rc = ClientRectangle; 266Rectangle rc = ClientRectangle;
System\Windows\Forms\Design\Behavior\Adorner.cs (1)
76public void Invalidate(Rectangle rectangle)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (4)
96internal Rectangle DesignerFrameDisplayRectangle 97=> DesignerFrameValid ? DesignerFrame.DisplayRectangle : Rectangle.Empty; 144internal void InvalidateAdornerWindow(Rectangle rectangle) 301Rectangle paintRect = clip;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (4)
294public Rectangle ControlRectInAdornerWindow(Control c) 298return Rectangle.Empty; 371public void Invalidate(Rectangle rect) => _adornerWindow.InvalidateAdornerWindow(rect); 417internal void ProcessPaintMessage(Rectangle paintRect)
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (3)
15private readonly Rectangle _glyphBounds; 22internal ContainerSelectorGlyph(Rectangle containerBounds, int glyphSize, int glyphOffset, ContainerSelectorBehavior? behavior) 32public override Rectangle Bounds => _glyphBounds;
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (4)
16private Rectangle _bounds; // bounds of the related control 24Rectangle bounds, 35public ControlBodyGlyph(Rectangle bounds, Cursor? cursor, IComponent? relatedComponent, Behavior? behavior) 46public override Rectangle Bounds => _bounds;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (10)
20private Rectangle _alternativeBounds = Rectangle.Empty; // if !empty, this represents the bounds of the tray control this glyph is related to 21private Rectangle _bounds; // the bounds of our glyph 36: this(behavior, adorner, Rectangle.Empty, null) 40public DesignerActionGlyph(DesignerActionBehavior? behavior, Rectangle alternativeBounds, Control? alternativeParent) 48private DesignerActionGlyph(DesignerActionBehavior? behavior, Adorner? adorner, Rectangle alternativeBounds, Control? alternativeParent) 61public override Rectangle Bounds 154Rectangle newRect = DesignerUtils.GetBoundsForNoResizeSelectionType(_alternativeBounds, SelectionBorderGlyphType.Top); 213pe.Graphics.FillRectangle(DesignerUtils.HoverBrush, Rectangle.Inflate(_bounds, -1, -1)); 226internal void UpdateAlternativeBounds(Rectangle newBounds)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (22)
26private Rectangle _cachedDragRect; // used to store drag rect between erasing & waiting to render 59private readonly Dictionary<SnapLine, Rectangle> _snapLineToBounds = []; 198Rectangle controlRect = controlDesigner.Control.ClientRectangle; 200Rectangle controlBounds = controlDesigner.Control.Bounds; 270private int BuildDistanceArray(List<SnapLine> snapLines, List<SnapLine> targetSnapLines, int[] distances, Rectangle dragBounds) 340Rectangle invalidRect; 443private void IdentifyAndStoreValidLines(List<SnapLine> snapLines, int[] distances, Rectangle dragBounds, int smallestDistance) 472private bool AddChildCompSnaplines(IComponent comp, List<IComponent>? dragComponents, Rectangle clipBounds, Control? targetControl) 535Rectangle clipBounds = new(0, 0, rootControl.ClientRectangle.Width, rootControl.ClientRectangle.Height); 689Rectangle currentBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 817private void RenderSnapLines(Line[] lines, Rectangle dragRect) 924private void StoreSnapLine(SnapLine snapLine, Rectangle dragBounds) 926Rectangle bounds = _snapLineToBounds[snapLine]; 999private bool ValidateMarginOrPaddingLine(SnapLine snapLine, Rectangle dragBounds) 1001Rectangle bounds = _snapLineToBounds[snapLine]; 1035internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines) 1046internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines, ref bool didSnap, bool shouldSnapHorizontally) 1075internal Point OnMouseMove(Rectangle dragBounds) 1087Rectangle dragBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1096private Point OnMouseMove(Rectangle dragBounds, bool offsetSnapLines, ref bool didSnap, bool shouldSnapHorizontally) 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height); 1165internal void RenderSnapLinesInternal(Rectangle dragRect)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.Line.cs (1)
25public Rectangle OriginalBounds { get; set; }
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (17)
55private Rectangle _dragImageRect; // Rectangle of the dragImage -- in SOURCE AdornerWindow coordinates 56private Rectangle _clearDragImageRect; // Rectangle used to remember the last dragimage rect we cleared 115_dragImageRect = Rectangle.Empty; 116_clearDragImageRect = Rectangle.Empty; 201if (_dragImageRect != Rectangle.Empty) 203Rectangle rect = _dragImageRect; 695Rectangle controlRect = _behaviorServiceSource.ControlRectInAdornerWindow(dragControl); 744Rectangle newRect = new(newPosition.X, newPosition.Y, 786Rectangle previousImageRect = _dragImageRect; 796Rectangle newImageRect = _dragImageRect; 799Rectangle unionRectangle = Rectangle.Union(newImageRect, previousImageRect); 938_dragImageRect = Rectangle.Empty; 939_clearDragImageRect = Rectangle.Empty; 950Rectangle controlRect = _behaviorServiceSource.ControlRectInAdornerWindow(dragControl); 958_dragImageRect = Rectangle.Union(_dragImageRect, controlRect); 1033Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.X,
System\Windows\Forms\Design\Behavior\Glyph.cs (2)
38public virtual Rectangle Bounds => Rectangle.Empty;
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (1)
22internal GrabHandleGlyph(Rectangle controlBounds, GrabHandleGlyphType type, Behavior? behavior, bool primarySelection)
System\Windows\Forms\Design\Behavior\LockedBorderGlyph.cs (2)
18internal LockedBorderGlyph(Rectangle controlBounds, SelectionBorderGlyphType type) 27private void InitializeGlyph(Rectangle controlBounds, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\LockedHandleGlyph.cs (1)
21internal LockedHandleGlyph(Rectangle controlBounds, bool primarySelection) : base(null)
System\Windows\Forms\Design\Behavior\MiniLockedBorderGlyph.cs (2)
26internal MiniLockedBorderGlyph(Rectangle controlBounds, SelectionBorderGlyphType type, Behavior behavior) 35private void InitializeGlyph(Rectangle controlBounds, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (1)
21internal NoResizeHandleGlyph(Rectangle controlBounds, SelectionRules selRules, bool primarySelection, Behavior? behavior)
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (2)
16internal NoResizeSelectionBorderGlyph(Rectangle controlBounds, SelectionRules rules, SelectionBorderGlyphType type, Behavior? behavior) 25private void InitializeGlyph(Rectangle controlBounds, SelectionRules selRules, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (17)
22public Rectangle resizeBounds; 90private Rectangle AdjustToGrid(Rectangle controlBounds, SelectionRules rules) 92Rectangle rect = controlBounds; 381Rectangle borderRect = BehaviorService.ControlRectInAdornerWindow(control); 388newRegion.Exclude(Rectangle.Inflate(borderRect, -BorderSize, -BorderSize)); 618Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.X, _resizeComponents[0].resizeBounds.Y, 629Rectangle newBorderRect = Rectangle.Empty; 630Rectangle targetBorderRect = Rectangle.Empty; 636Rectangle bounds = control.Bounds; 637Rectangle oldBounds = bounds; 640Rectangle baseBounds = _resizeComponents[i].resizeBounds; 641Rectangle oldBorderRect = BehaviorService.ControlRectInAdornerWindow(control); 854newRegion.Exclude(Rectangle.Inflate(newBorderRect, -BorderSize, -BorderSize)); 863oldRegion.Exclude(Rectangle.Inflate(oldBorderRect, -BorderSize, -BorderSize));
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (2)
16internal SelectionBorderGlyph(Rectangle controlBounds, SelectionRules rules, SelectionBorderGlyphType type, Behavior? behavior) 25private void InitializeGlyph(Rectangle controlBounds, SelectionRules selRules, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\SelectionGlyphBase.cs (3)
14protected Rectangle bounds; // defines the bounds of the selection glyph 15protected Rectangle hitBounds; // defines the bounds used for hittest - it could be different than the bounds of the glyph itself 58public override Rectangle Bounds
System\Windows\Forms\Design\Behavior\SelectionManager.cs (17)
27private Rectangle[]? _previousSelectionBounds; 30private Rectangle[]? _currentSelectionBounds; 148ref Rectangle currentSelectionBounds = ref _currentSelectionBounds[_curCompIndex]; 149currentSelectionBounds = currentSelectionBounds == Rectangle.Empty 151: Rectangle.Union(currentSelectionBounds, bodyGlyph.Bounds); 163_currentSelectionBounds[_curCompIndex] = Rectangle.Union(_currentSelectionBounds[_curCompIndex], glyph.Bounds); 314private Region DetermineRegionToRefresh(object? primarySelection, Rectangle[] previousSelectionBounds, Rectangle[] currentSelectionBounds) 316Region toRefresh = new(Rectangle.Empty); 317Rectangle[] larger; 318Rectangle[] smaller; 342foreach (Rectangle large in larger) 349Rectangle small = smaller[s]; 420_currentSelectionBounds = new Rectangle[selComps.Count]; 438Rectangle toUpdate = _currentSelectionBounds[0]; 441toUpdate = Rectangle.Union(toUpdate, _currentSelectionBounds[i]); 444if (toUpdate != Rectangle.Empty)
System\Windows\Forms\Design\Behavior\TableLayoutPanelResizeGlyph.cs (3)
12private Rectangle _bounds; 20internal TableLayoutPanelResizeGlyph(Rectangle controlBounds, TableLayoutStyle style, Cursor hitTestCursor, Behavior behavior) : base(behavior) 32public override Rectangle Bounds => _bounds;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (6)
22private Rectangle _lastRectangle; // cache the last mouse loc - so we can ignore when mouse doesn't move 38_lastRectangle = Rectangle.Empty; 89_lastRectangle = Rectangle.Empty; 233private static SnapLine[] GenerateNewToolSnapLines(Rectangle r) 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\ToolStripPanelSelectionBehavior.cs (4)
85Rectangle oldBounds = selectionGlyph.Bounds; 95Rectangle oldBounds = selectionGlyph.Bounds; 119Rectangle translatedBounds = new(loc, parent.Size); 246Rectangle oldBounds = selectionGlyph.Bounds;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (11)
14private Rectangle _glyphBounds; 25internal ToolStripPanelSelectionGlyph(Rectangle bounds, Cursor cursor, IComponent relatedComponent, IServiceProvider? _provider, ToolStripPanelSelectionBehavior behavior) : base(bounds, cursor, relatedComponent, behavior) 63Rectangle translatedBounds = _behaviorService.ControlRectInAdornerWindow(_relatedPanel!); 65_glyphBounds = Rectangle.Empty; 98private void CollapseGlyph(Rectangle bounds) 147private void ExpandGlyph(Rectangle bounds) 199public override Rectangle Bounds => _glyphBounds; 212Rectangle baseParentBounds = _behaviorService.ControlRectInAdornerWindow(_baseParent); 213return _glyphBounds != Rectangle.Empty && baseParentBounds.Contains(_glyphBounds) && _glyphBounds.Contains(p) ? Cursors.Hand : null; 226Rectangle baseParentBounds = _behaviorService.ControlRectInAdornerWindow(_baseParent); 227if (_relatedPanel!.Visible && _image is not null && _glyphBounds != Rectangle.Empty && baseParentBounds.Contains(_glyphBounds))
System\Windows\Forms\Design\CommandSet.cs (2)
3309Rectangle childBounds = child.Bounds; 3332Rectangle pasteControlBounds = pasteControl.Bounds;
System\Windows\Forms\Design\ComponentTray.cs (24)
54private Rectangle _mouseDragWorkspace = Rectangle.Empty; // a temp work rectangle we cache for perf 199Rectangle bounds = control.Bounds; 589void ISelectionUIHandler.DragMoved(object[] components, Rectangle offset) => DragHandler.DragMoved(components, offset); 613Rectangle ISelectionUIHandler.GetComponentBounds(object component) => Rectangle.Empty; 617Rectangle ISelectionUIHandler.GetSelectionClipRect(object component) 624return Rectangle.Empty; 655Cursor.Clip = Rectangle.Empty; 1192Cursor.Clip = Rectangle.Empty; 1334Cursor.Clip = Rectangle.Empty; 1338Rectangle rect = new Rectangle 1374private IComponent[] GetComponentsInRect(Rectangle rect) 1381Rectangle bounds = child.Bounds; 1457Rectangle innerRect = c.Bounds; 1831Rectangle display = DisplayRectangle; 1859Rectangle bounds = prevCtl.Bounds; 1992Rectangle rc = Bounds; 2256Cursor.Clip = Rectangle.Empty; 2274Rectangle rc = ClientRectangle; 2420Rectangle bounds = Bounds; 2885public override Rectangle GetUpdatedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize)
System\Windows\Forms\Design\ControlCommandSet.cs (2)
717Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y, 720Rectangle newRect = parentDesigner.GetSnappedRect(primaryControl.Bounds, dragRect, true);
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (1)
24public override Rectangle Bounds => _control.AccessibilityObject.Bounds;
System\Windows\Forms\Design\ControlDesigner.cs (12)
682Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(Control) ?? Rectangle.Empty; 690Rectangle parentRect = parent.RectangleToScreen(parent.ClientRectangle); 691Rectangle controlRect = Control.RectangleToScreen(Control.ClientRectangle); 741Rectangle translatedBounds = BehaviorService.ControlRectInAdornerWindow(Control); 2074Rectangle paintRect = clip; 2118Rectangle controlScreenBounds = new(parent.PointToScreen(Control.Location), Control.Size); 2119Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize); 2244Rectangle clientRectangle = Control.ClientRectangle; 2245Rectangle borderRectangle = clientRectangle; 2251Rectangle imageRect = new(marginX, marginY, glyphSize.Width, glyphSize.Height); 2252Rectangle textRect = clientRectangle;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (5)
19private Rectangle _controlRect = Rectangle.Empty; 37_controlRect = Rectangle.Empty; 59_controlRect = Rectangle.Empty; 71if (e is not null && _controlRect != Rectangle.Empty && !_controlRect.Contains(new Point(e.X, e.Y)))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
905Rectangle bounds = new(0, selectedIndex * _selectedColumns.ItemHeight, _selectedColumns.Width, _selectedColumns.ItemHeight); 989Rectangle bounds = e.Bounds; 1006Rectangle focusRectangle = new(bounds.X, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1863Rectangle rect = new(ClientRectangle.Location, ClientRectangle.Size); 2030Rectangle bounds = node.Bounds;
System\Windows\Forms\Design\DesignerFrame.cs (5)
247void IOverlayService.InvalidateOverlays(Rectangle screenRectangle) 390Rectangle client = DisplayRectangle; 460public void InvalidateOverlays(Rectangle screenRectangle) 466Rectangle invalidateRect = new(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size); 483Rectangle overlayControlScreenBounds = overlayControl.Bounds;
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
53Rectangle r = Bounds;
System\Windows\Forms\Design\DesignerUtils.cs (18)
246public static void DrawGrabHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 261public static void DrawNoResizeHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 276public static void DrawLockedHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 300public static void DrawSelectionBorder(Graphics graphics, Rectangle bounds) 459public static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type, int borderSize) => 467_ => Rectangle.Empty 475private static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type, int bordersize, int offset) 477Rectangle bounds = GetBoundsForSelectionType(originalBounds, type, bordersize); 511public static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type) 516public static Rectangle GetBoundsForNoResizeSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type) 527Rectangle face = ctrl.ClientRectangle; 563public static Rectangle GetBoundsFromToolboxSnapDragDropInfo(ToolboxSnapDragDropEventArgs e, Rectangle originalBounds, bool isMirrored) 565Rectangle newBounds = originalBounds;
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
301Rectangle rc = ClientRectangle;
System\Windows\Forms\Design\DocumentDesigner.cs (1)
513Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (9)
145private Rectangle GetMarginBounds(Control control) 149var bounds = control.Bounds; 200var marginBounds = GetMarginBounds(currentControl); 201var bounds = currentControl.Bounds; 391private void DrawIBarBeforeRectangle(Rectangle bounds) 410private void DrawIBarAfterRectangle(Rectangle bounds) 458Rectangle invalidRect = new( 814Rectangle bounds = Rectangle.Empty;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
78Rectangle rectangle = Control.DisplayRectangle;
System\Windows\Forms\Design\InheritanceUI.cs (3)
15private static Rectangle s_inheritanceGlyphRect; 30public static Rectangle InheritanceGlyphRectangle 34if (s_inheritanceGlyphRect == Rectangle.Empty)
System\Windows\Forms\Design\IOverlayService.cs (1)
38void InvalidateOverlays(Rectangle screenRectangle);
System\Windows\Forms\Design\ISelectionUIHandler.cs (3)
29void DragMoved(object[] components, Rectangle offset); 42Rectangle GetComponentBounds(object component); 56Rectangle GetSelectionClipRect(object component);
System\Windows\Forms\Design\ISelectionUIService.cs (1)
52void DragMoved(Rectangle offset);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (3)
98Rectangle bounds = Rectangle.Empty; 104bounds = bounds.IsEmpty ? childControl.Bounds : Rectangle.Union(bounds, childControl.Bounds);
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
361Rectangle newRect; 410private static void DrawReversibleFrame(HWND handle, Rectangle rectangle, Color backColor) 767Rectangle bounds = default; 771bounds = _selectionHandler.GetUpdatedRect(Rectangle.Empty, bounds, false); 845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0);
System\Windows\Forms\Design\PanelDesigner.cs (1)
37Rectangle rc = Control.ClientRectangle;
System\Windows\Forms\Design\ParentControlDesigner.cs (48)
23private Rectangle _mouseDragOffset = Rectangle.Empty; // always keeps the current rectangle 311Rectangle displayRectangle = Control.DisplayRectangle; 458Rectangle bounds = default; 520Rectangle tempBounds = GetAdjustedSnapLocation(Rectangle.Empty, bounds); 529bounds = GetAdjustedSnapLocation(Rectangle.Empty, bounds); 541Rectangle snappedBounds = DesignerUtils.GetBoundsFromToolboxSnapDragDropInfo(e, bounds, Control.IsMirrored); 810protected void CreateTool(ToolboxItem tool, Rectangle bounds) 844private static SnapLine[] GenerateNewToolSnapLines(Rectangle r) 861internal List<Control> GetComponentsInRect(Rectangle value, bool screenCoords, bool containRect) 864Rectangle rect = screenCoords ? Control.RectangleToClient(value) : value; 874Rectangle bounds = child.Bounds; 915private Rectangle GetControlStackLocation(Rectangle centeredLocation) 996Rectangle controlRect = BehaviorService.ControlRectInAdornerWindow(Control); 1003Rectangle parentRect = BehaviorService.ControlRectInAdornerWindow(parent); 1004Rectangle nonClipRect = Rectangle.Intersect(parentRect, controlRect); 1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1090private Rectangle GetAdjustedSnapLocation(Rectangle originalRect, Rectangle dragRect) 1092Rectangle adjustedRect = GetUpdatedRect(originalRect, dragRect, true); 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1124internal Rectangle GetSnappedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize) 1133protected Rectangle GetUpdatedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize) 1135Rectangle updatedRect; 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 1769Rectangle offset = _mouseDragOffset; 1773_mouseDragOffset = Rectangle.Empty; 1778Cursor.Clip = Rectangle.Empty; 1783Rectangle frameRect = new(offset.X - _adornerWindowToScreenOffset.X, 1792newRegion.Exclude(Rectangle.Inflate(frameRect, -frameWidth, -frameWidth)); 1917Rectangle oldFrameRect = _mouseDragOffset; 1938Rectangle r = new(_mouseDragBase.X - _adornerWindowToScreenOffset.X, 1966_mouseDragOffset = GetUpdatedRect(Rectangle.Empty, _mouseDragOffset, true); 1975Rectangle frameRect = new(_mouseDragOffset.X - _adornerWindowToScreenOffset.X, 1984newRegion.Exclude(Rectangle.Inflate(frameRect, -frameWidth, -frameWidth)); 2000oldRegion.Exclude(Rectangle.Inflate(oldFrameRect, -frameWidth, -frameWidth)); 2029Rectangle displayRect = Control.DisplayRectangle; 2030Rectangle clientRect = Control.ClientRectangle; 2032Rectangle paintRect = new(Math.Min(displayRect.X, clientRect.X),
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
33Rectangle rc = ctl.ClientRectangle;
System\Windows\Forms\Design\SelectionUIHandler.cs (15)
21private Rectangle _dragOffset = Rectangle.Empty; // this gets added to a component's x, y, width, height 71Rectangle containerRect = containerControl.RectangleToScreen(containerControl.ClientRectangle); 75Rectangle screen = SystemInformation.VirtualScreen; 92Rectangle b = default; 127public virtual void DragMoved(object[] components, Rectangle offset) 203public abstract Rectangle GetUpdatedRect(Rectangle orignalRect, Rectangle dragRect, bool updateSize); 214Rectangle offset = _dragOffset; 222Cursor.Clip = Rectangle.Empty; 223_dragOffset = Rectangle.Empty; 303Rectangle oldBounds = controls[i].Bounds; 346Rectangle tempNewBounds = GetUpdatedRect(oldBounds, new Rectangle(targetX, targetY, targetWidth, targetHeight), true); 347Rectangle newBounds = oldBounds;
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (4)
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); 77_region = new(Rectangle.Empty);
System\Windows\Forms\Design\SelectionUIService.cs (8)
40private Rectangle _mouseDragOffset = Rectangle.Empty; // current drag offset 196_mouseDragOffset = Rectangle.Empty; 652Rectangle old = _mouseDragOffset; 691Rectangle delta = _mouseDragOffset; 1064void ISelectionUIService.DragMoved(Rectangle offset) 1066Rectangle newOffset = Rectangle.Empty;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (12)
62internal Rectangle _innerRect = Rectangle.Empty; // inner part of selection (== control bounds) 63internal Rectangle _outerRect = Rectangle.Empty; // outer part of selection (inner + border size) 134Rectangle rect = new(_outerRect.X, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT); 135Rectangle inner = _innerRect; 136Rectangle outer = _outerRect; 338_region = new(Rectangle.Empty); 343Rectangle handlerClip = _handler.GetSelectionClipRect(_component); 514Rectangle rcOuterNew = new(_innerRect.X - GRABHANDLE_WIDTH, _innerRect.Y - GRABHANDLE_HEIGHT, _innerRect.Width + 2 * GRABHANDLE_WIDTH, _innerRect.Height + 2 * GRABHANDLE_HEIGHT); 535Rectangle rcNew = Rectangle.Empty;
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
200Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(_splitterPanel1!) ?? Rectangle.Empty; 211translatedBounds = BehaviorService?.ControlRectInAdornerWindow(_splitterPanel2!) ?? Rectangle.Empty;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
26Rectangle rectangle = control.ClientRectangle;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
155Rectangle rectangle = control.ClientRectangle; 165Rectangle rectangle = control.ClientRectangle; 181Rectangle rectangle = control.ClientRectangle;
System\Windows\Forms\Design\StatusCommandUI.cs (5)
45Rectangle bounds; 52bounds = Rectangle.Empty; 74Rectangle bounds; 81bounds = Rectangle.Empty; 90public void SetStatusInformation(Rectangle bounds)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (6)
848Rectangle rc = Control.DisplayRectangle; 970Rectangle bounds = new(startingPoint, Table.DisplayRectangle.Size); 1076Rectangle bounds = new(loc, Table.DisplayRectangle.Size); 1079Rectangle checkBounds = new(controlLoc, Control.ClientSize); // Can't use Control.Size since that will include any scrollbar 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 (10)
23private Rectangle[]? _tabGlyphs; 202Rectangle ctlInner = GetConvertedBounds(_ctlHover); 203Rectangle ctlOuter = ctlInner; 232Rectangle convertedRectangle = GetConvertedBounds(control); 308Rectangle screenRectangle; 339private Rectangle GetConvertedBounds(Control? control) 343return Rectangle.Empty; 346Rectangle convertedBounds = control.Bounds; 659_tabGlyphs = new Rectangle[_tabControls.Count]; 761Rectangle rc = GetConvertedBounds(_ctlHover);
System\Windows\Forms\Design\TabPageDesigner.cs (2)
46Rectangle translatedBounds = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (3)
126public void Invalidate(Rectangle rect) 153internal void ProcessPaintMessage(Rectangle paintRect) 269internal void InvalidateAdornerWindow(Rectangle rectangle)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (8)
234Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(currentPanel) ?? Rectangle.Empty; 297Rectangle glyphBounds = childGlyph.Bounds; 298Rectangle controlBounds = BehaviorService?.ControlRectInAdornerWindow(dropDownItem.DropDown) ?? Rectangle.Empty; 327Rectangle glyphBounds = childGlyph.Bounds; 328Rectangle controlBounds = BehaviorService?.ControlRectInAdornerWindow(associatedControl) ?? Rectangle.Empty;
System\Windows\Forms\Design\ToolStripDesigner.cs (18)
34private Rectangle _dragBoxFromMouseDown = Rectangle.Empty; // Needed to Store the DRAGDROP Rect from the ToolStripItemBehavior. 41private Rectangle _boundsToInvalidate = Rectangle.Empty; // Bounds to Invalidate if a DropDownItem is Deleted 90private Rectangle AddItemRect 94Rectangle rect = default; 225public Rectangle DragBoxFromMouseDown 372private Rectangle OverFlowButtonRect 376Rectangle rect = default; 492Rectangle bounds = dropDownItemDesigner.GetGlyphBounds(); 667Rectangle bounds = designer.GetGlyphBounds(); 1075if (_toolStripAdornerWindowService is not null && _boundsToInvalidate != Rectangle.Empty) 1320Rectangle itemBounds = itemDesigner.GetGlyphBounds(); 1322Rectangle parentBounds = BehaviorService.ControlRectInAdornerWindow(parent); 1369Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1603internal static bool IsGlyphTotallyVisible(Rectangle itemBounds, Rectangle parentBounds) 2056Rectangle r = designer.GetGlyphBounds();
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
56public static void GetAdjustedBounds(ToolStripItem item, ref Rectangle r) 439Rectangle invalidateBounds = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (6)
133Rectangle bounds = Rectangle.Empty; 143if (bounds != Rectangle.Empty) 686Rectangle parentBounds = behaviorService.ControlRectInAdornerWindow(parent); 687Rectangle menuBounds = behaviorService.ControlRectInAdornerWindow(_designMenu); 697Rectangle r = _designMenu.Bounds;
System\Windows\Forms\Design\ToolStripEditorManager.cs (5)
26private Rectangle _lastKnownEditorBounds = Rectangle.Empty; 123private Rectangle _bounds; 125public ToolStripEditorControl(Control editorToolStrip, Rectangle bounds) 136public Rectangle Bounds1 { get => _bounds; set => _bounds = value; }
System\Windows\Forms\Design\ToolStripItemBehavior.cs (13)
24internal Rectangle _dragBoxFromMouseDown = Rectangle.Empty; 80Rectangle bounds = GetPaintingBounds(designerHost, item); 88if (bSvc is not null && bounds != Rectangle.Empty) 153private static Rectangle GetPaintingBounds(IDesignerHost designerHost, ToolStripItem item) 155Rectangle bounds = Rectangle.Empty; 546Rectangle dragBox = Rectangle.Empty; 572if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 919Rectangle bounds = GetPaintingBounds(designerHost, item); 996parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = Rectangle.Empty; 1019ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (14)
33internal Rectangle _dragBoxFromMouseDown = Rectangle.Empty; 432Rectangle itemBounds = itemDesigner.GetGlyphBounds(); 437Rectangle parentBounds = behaviorService.ControlRectInAdornerWindow(parent); 511public Rectangle GetGlyphBounds() 513Rectangle r = Rectangle.Empty; 576Rectangle r = GetGlyphBounds(); 578Rectangle parentBounds = GetService<BehaviorService>().ControlRectInAdornerWindow((Control)ImmediateParent); 923Rectangle r = ToolStripItem.Bounds; 1226Rectangle origBoundsInAdornerWindow = ToolStripItem.Bounds; 1247Rectangle boundsInAdornerWindow = ToolStripItem.Bounds; 1266boundsInAdornerWindow = Rectangle.Union(origBoundsInAdornerWindow, boundsInAdornerWindow); 1320Rectangle itemBounds = GetGlyphBounds();
System\Windows\Forms\Design\ToolStripItemGlyph.cs (1)
14public ToolStripItemGlyph(ToolStripItem item, ToolStripItemDesigner itemDesigner, Rectangle bounds, Behavior.Behavior? b) : base(bounds, Cursors.Default, item, b)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (17)
60private Rectangle _dropDownSizeToInvalidate = Rectangle.Empty; 62private Rectangle _boundsToInvalidateOnRemove = Rectangle.Empty; 392Rectangle bounds = dropDownItemDesigner.GetGlyphBounds(); 1074Rectangle r = designer.GetGlyphBounds(); 1389Rectangle bounds = wb.Items[i].Bounds; 1652Rectangle hostingDropDownBounds = (MenuItem.GetCurrentParent()).Bounds; 1654Rectangle itemDropDownBounds = MenuItem.DropDown.Bounds; 1657Rectangle boundstoInvalidate = Rectangle.Union(hostingDropDownBounds, itemDropDownBounds); 1918if (_toolStripAdornerWindowService is not null && _boundsToInvalidateOnRemove != Rectangle.Empty) 1923_boundsToInvalidateOnRemove = Rectangle.Empty; 1974_boundsToInvalidateOnRemove = Rectangle.Union(_boundsToInvalidateOnRemove, dropDownItem.DropDown.Bounds); 2316Rectangle bounds = ownerItem.DropDown.Bounds; 2599private Rectangle _bounds; 2600internal ToolStripDropDownGlyph(Rectangle bounds, Behavior.Behavior b) : base(b)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
240Rectangle rc = Control.ClientRectangle; 259_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior); 290_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (20)
70private Rectangle _boundingRect; 106private Rectangle _hotRegion; 255public Rectangle Bounds 323public Rectangle HotRegion 572Rectangle bounds = menuItemDesigner.GetGlyphBounds(); 836Rectangle invalidateBounds = designer.GetGlyphBounds(); 1307Rectangle translatedBounds = new(loc, _miniToolStrip.Size); 1787private Rectangle _hotRegion = Rectangle.Empty; 1812private void DrawArrow(Graphics g, Rectangle bounds) 1821private void DrawDropDown(Graphics g, Rectangle bounds, int state) 1871Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1873Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1886Rectangle bounds = new(Point.Empty, item.Size); 1887Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1975Rectangle buttonBounds = splitButton.DropDownButtonBounds; 1982Rectangle bounds = new(Point.Empty, splitButton.Size); 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 (8)
System\ComponentModel\Design\ByteViewerTests.cs (4)
427using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 468using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 513using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 543using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty);
System\Drawing\Design\FontNameEditorTests.cs (1)
87e = new PaintValueEventArgs(_typeDescriptorContext, fontName, g, Rectangle.Empty);
System\Windows\Forms\Design\InheritanceUITests.cs (1)
96Rectangle glyphRect = InheritanceUI.InheritanceGlyphRectangle;
ToolStripDesignerTests.cs (2)
51Assert.IsType<Rectangle>(toolStripDesigner.DragBoxFromMouseDown); 52Assert.Equal(Rectangle.Empty, toolStripDesigner.DragBoxFromMouseDown);
System.Windows.Forms.Primitives (21)
System\Windows\Forms\Automation\UiaTextProvider.cs (7)
31public abstract Rectangle BoundingRectangle { get; } 71public abstract Rectangle RectangleToScreen(Rectangle rect); 81public static SafeArrayScope<double> RectListToDoubleArray(List<Rectangle> rectArray) 107internal static SafeArrayScope<double> BoundingRectangleAsArray(Rectangle bounds) 117/// <inheritdoc cref="BoundingRectangleAsArray(Rectangle)"/> 118internal static VARIANT BoundingRectangleAsVariant(Rectangle bounds)
System\Windows\Forms\Automation\UiaTextRange.cs (8)
346List<Rectangle> rectangles = []; 362Rectangle endlineRectangle = new(endlinePoint.X, endlinePoint.Y + 2, UiaTextProvider.EndOfLineWidth, Math.Abs(_provider.Logfont.lfHeight) + 1); 384Rectangle clippingRectangle = _provider.BoundingRectangle; 398Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 717private List<Rectangle> GetMultilineBoundingRectangles(Rectangle clippingRectangle) 747List<Rectangle> rects = []; 864Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
System\Windows\Forms\DeviceContextExtensions.cs (6)
13internal static void DrawRectangle(this DeviceContextHdcScope hdc, Rectangle rectangle, HPEN hpen) => 40internal static void FillRectangle(this DeviceContextHdcScope hdc, Rectangle rectangle, HBRUSH hbrush) => 43internal static void FillRectangle(this HDC hdc, Rectangle rectangle, HBRUSH hbrush) 131Rectangle bounds) => 149internal static void FillRectangle(this GetDcScope hdc, HBRUSH hbrush, Rectangle rectangle) => 152internal static void FillRectangle(this HDC hdc, HBRUSH hbrush, Rectangle rectangle)
System.Windows.Forms.Primitives.Tests (20)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (5)
545Rectangle expected = new(10, 33, 96, 19); 715providerMock.Setup(m => m.RectangleToScreen(It.IsAny<Rectangle>())) 716.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height)); 797providerMock.Setup(m => m.RectangleToScreen(It.IsAny<Rectangle>())) 798.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height));
System\Windows\Forms\DeviceContextHdcScopeTests.cs (12)
18Rectangle clipRectangle = new(1, 1, 5, 5); 36Assert.Equal(new Rectangle(-1, -2, 10, 10), (Rectangle)clipRect); 51Assert.Equal(clipRectangle, (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); 119Rectangle expectedClipRect = originalClipRect; 122Assert.Equal(expectedClipRect, (Rectangle)clipRect); 146Assert.Equal(clipRectangle, (Rectangle)clipRect); 169Assert.Equal(new Rectangle(0, -1, 5, 5), (Rectangle)clipRect); 192Assert.Equal((Rectangle)originalClipRect, (Rectangle)clipRect);
System\Windows\Forms\DeviceContextScopeTests.cs (1)
52Assert.Equal(new Rectangle(2, 1, 1, 3), (Rectangle)rect);
Windows\Win32\RegionTests.cs (2)
54Rectangle rectangle = new(1, 2, 3, 4); 61Assert.Equal(rectangle, (Rectangle)rect);
System.Windows.Forms.Primitives.TestUtilities (21)
FluentAssertions\FluentAssertExtensions.cs (4)
105/// Asserts a <see cref="Rectangle"/> is empty. 110.ForCondition(assertions.Subject is Rectangle rect && rect.IsEmpty) 118/// Asserts a <see cref="Rectangle"/> is not empty. 123.ForCondition(assertions.Subject is Rectangle rect && !rect.IsEmpty)
Metafiles\Validators\BitBltValidator.cs (2)
12private readonly Rectangle? _bounds; 35Assert.Equal(_bounds.Value, (Rectangle)bitBlt->rclBounds);
Metafiles\Validators\Poly16Validator.cs (2)
12private readonly Rectangle? _bounds; 31Assert.Equal(_bounds.Value, (Rectangle)poly->rclBounds);
Metafiles\Validators\PolyPoly16Validator.cs (2)
12private readonly Rectangle? _bounds; 32Assert.Equal(_bounds.Value, (Rectangle)poly->rclBounds);
Metafiles\Validators\RectangleValidator.cs (2)
12private readonly Rectangle? _bounds; 35Assert.Equal(_bounds.Value, (Rectangle)rectangle->rect);
Metafiles\Validators\TextOutValidator.cs (3)
13private readonly Rectangle? _bounds; 20Rectangle? bounds = default, 45Assert.Equal(_bounds.Value, (Rectangle)textOut->rclBounds);
Metafiles\Validators\Validate.cs (5)
16Rectangle? bounds = default, 27Rectangle? bounds = default, 38Rectangle? bounds = default, 49Rectangle? bounds = default, 61Rectangle? bounds = default,
Win32\Window.cs (1)
16Rectangle bounds,
System.Windows.Forms.Tests (1051)
CheckedListBoxTests.cs (3)
405yield return new object[] { null, Rectangle.Empty, 0, DrawItemState.Default, Color.Red, Color.Blue }; 413public void CheckedListBox_OnDrawItem_Invoke_Success(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor) 428public void CheckedListBox_OnDrawItem_InvokeWithHandle_Success(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor)
System\Drawing\Design\PaintValueEventArgsTests.cs (3)
14yield return new object[] { null, null, Rectangle.Empty }; 20public void PaintValueEventArgs_Ctor_ITypeDescriptorContext_Object_Graphics_Rectangle(ITypeDescriptorContext context, object value, Rectangle bounds) 35AssertExtensions.Throws<ArgumentNullException>("graphics", () => new PaintValueEventArgs(null, new object(), null, Rectangle.Empty));
System\Drawing\Design\UITypeEditorTests.cs (4)
103yield return new object[] { new PaintValueEventArgs(null, null, graphics, Rectangle.Empty) }; 120yield return new object[] { null, graphics, Rectangle.Empty }; 126public void UITypeEditor_PaintValue_Invoke_CallsVirtualPaintValue(object value, Graphics canvas, Rectangle rectangle) 145Assert.Throws<ArgumentNullException>("graphics", () => editor.PaintValue(new object(), null, Rectangle.Empty));
System\Windows\Forms\AbstractButtonBaseTests.cs (1)
60Rectangle overChangeRectangle;
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (5)
21Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 616Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 682Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 2625var bounds = button.Bounds; 2656var bounds = comboBox.Bounds;
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (6)
319Rectangle dropDownRect = comboBox.ChildListAccessibleObject.Bounds; 405Rectangle actual = itemAccessibleObject.Bounds; 406Rectangle dropdownRect = comboBox.ChildListAccessibleObject.Bounds; 445public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_ForDifferentHeightItems(ComboBoxStyle comboBoxStyle, int itemIndex, Rectangle expectedRect) 467Rectangle actual = itemAccessibleObject.Bounds; 468Rectangle dropdownRect = comboBox.ChildListAccessibleObject.Bounds;
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (5)
158Rectangle actualBounds = accessibleObject.Bounds; 160Rectangle expectedBounds = dataGridView.Bounds; 179Rectangle actualBounds = accessibleObject.Bounds; 181Rectangle expectedBounds = dataGridView.Bounds; 183Assert.Equal(Rectangle.Empty, actualBounds);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (2)
109yield return new object[] { new DataGridViewCellAccessibleObject(cell), Rectangle.Empty }; 114public void DataGridViewCellAccessibleObject_Bounds_Get_ReturnsExpected(AccessibleObject accessibleObject, Rectangle expected)
System\Windows\Forms\AccessibleObjects\DataGridViewColumnHeaderCellAccessibleObjectTests.cs (2)
79Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds); 91Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (2)
43yield return new object[] { new DataGridViewRowAccessibleObject(new DataGridViewRow()), Rectangle.Empty }; 48public void DataGridViewRowAccessibleObject_Bounds_Get_ReturnsExpected(AccessibleObject accessibleObject, Rectangle expected)
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (1)
130Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\DataGridViewTopLeftHeaderCellAccessibleObjectTests.cs (3)
32Assert.Equal(Rectangle.Empty, cell.AccessibilityObject.Bounds); 43Assert.Equal(Rectangle.Empty, cell.AccessibilityObject.Bounds); 56Assert.NotEqual(Rectangle.Empty, cell.AccessibilityObject.Bounds);
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (2)
36Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 56Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (4)
179Rectangle actual = form.AccessibilityObject.BoundingRectangle; 180Rectangle expected = createControl ? form.Bounds : Rectangle.Empty; 200Rectangle actual = form.AccessibilityObject.BoundingRectangle;
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (2)
44Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 55Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
44Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (2)
99Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]); 174itemAccessibleObject.Bounds.Should().Be(Rectangle.Empty);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (5)
305Rectangle actualBounds = group1AccObj.Bounds; 307Rectangle expectedBounds = groupRect; 343Rectangle actualBounds = groupAccObj.Bounds; 345Rectangle expectedBounds = groupRect; 1197Rectangle listViewBounds = listView.AccessibilityObject.Bounds;
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (7)
755Assert.NotEqual(Rectangle.Empty, listView.Items[0].AccessibilityObject.Bounds); 758Assert.Equal(Rectangle.Empty, listView.Items[1].AccessibilityObject.Bounds); 762Assert.NotEqual(Rectangle.Empty, listView.Items[1].AccessibilityObject.Bounds); 765Assert.NotEqual(Rectangle.Empty, listView.Items[2].AccessibilityObject.Bounds); 776Assert.Equal(Rectangle.Empty, listView.Items[0].AccessibilityObject.Bounds); 777Assert.Equal(Rectangle.Empty, listView.Items[1].AccessibilityObject.Bounds); 778Assert.Equal(Rectangle.Empty, listView.Items[2].AccessibilityObject.Bounds);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (1)
236Assert.Equal(Rectangle.Empty, accessibleObject.GetSubItemBounds(0));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemListAccessibleObjectTests.cs (1)
31Assert.Equal(Rectangle.Empty, control.Items[0].AccessibilityObject.Bounds);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (21)
198Assert.Equal(Rectangle.Empty, subItemAccObj1.Bounds); 199Assert.Equal(Rectangle.Empty, subItemAccObj2.Bounds); 200Assert.Equal(Rectangle.Empty, subItemAccObj3.Bounds); 202Assert.Equal(Rectangle.Empty, subItemAccObjInGroup1.Bounds); 203Assert.Equal(Rectangle.Empty, subItemAccObjInGroup2.Bounds); 204Assert.Equal(Rectangle.Empty, subItemAccObjInGroup3.Bounds); 228Assert.NotEqual(Rectangle.Empty, subItemAccObj1.Bounds); 229Assert.NotEqual(Rectangle.Empty, subItemAccObj2.Bounds); 230Assert.NotEqual(Rectangle.Empty, subItemAccObj3.Bounds); 232Assert.NotEqual(Rectangle.Empty, subItemAccObjInGroup1.Bounds); 233Assert.NotEqual(Rectangle.Empty, subItemAccObjInGroup2.Bounds); 234Assert.NotEqual(Rectangle.Empty, subItemAccObjInGroup3.Bounds); 258Assert.Equal(Rectangle.Empty, subItemAccObj1.Bounds); 259Assert.Equal(Rectangle.Empty, subItemAccObj2.Bounds); 260Assert.Equal(Rectangle.Empty, subItemAccObj3.Bounds); 262Assert.Equal(Rectangle.Empty, subItemAccObjInGroup1.Bounds); 263Assert.Equal(Rectangle.Empty, subItemAccObjInGroup2.Bounds); 264Assert.Equal(Rectangle.Empty, subItemAccObjInGroup3.Bounds); 663Rectangle actualBounds = accessibleObject.Bounds; 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 (2)
25Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]); 26Assert.Equal((Rectangle)r, actualRectangle);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (1)
35Rectangle bounds = calendar.Bounds;
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarCellAccessibleObjectTests.cs (2)
45public void CalendarCellAccessibleObject_Bounds_ReturnsExpected(int rowIndex, int columnIndex, Rectangle expected) 51Rectangle actual = cellAccessibleObject.Bounds;
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarHeaderAccessibleObjectTests.cs (2)
51Rectangle actual = headerAccessibleObject.Bounds; 53Rectangle actualInClientCoordinates = control.RectangleToClient(actual);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarNextButtonAccessibleObjectTests.cs (2)
36Rectangle actual = nextButtonAccessibleObject.Bounds; 37Rectangle actualInClientCoordinates = control.RectangleToClient(actual);
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (4)
133Assert.Equal(Rectangle.Empty, panelAccessibleObject.Bounds); 140Rectangle expected = new(0, 0, 10, 10); 276Rectangle boundingRectangle = panel1.AccessibilityObject.BoundingRectangle; 281Rectangle expected = panel1.RectangleToScreen(panel1.ClientRectangle);
System\Windows\Forms\AccessibleObjects\PrintPreviewControl.PrintPreviewControlAccessibleObjectTests.cs (5)
74Assert.Equal(Rectangle.Empty, accessibleObject.BoundingRectangle); 87Rectangle controlBounds = panel.RectangleToScreen(control.Bounds); 90Rectangle accessibleObjectBoundingRectangle = accessibleObject.BoundingRectangle; 103Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 113Rectangle controlClientRectangle = control.RectangleToScreen(control.ClientRectangle);
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (1)
49Assert.Equal(Rectangle.Empty.Size, accessibilityObject.Bounds.Size);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (4)
132Rectangle gridViewBounds = propertyGrid.RectangleToClient(accessibleObject.Bounds); 133Rectangle propertyGridBounds = propertyGrid.Bounds; 243Rectangle gridViewRectangle = accessibleObject.Bounds; 252Rectangle rect = propertyGridView.GetRectangle(row, ROWVALUE | ROWLABEL);
System\Windows\Forms\AccessibleObjects\ScrollBar.ScrollBarChildAccessibleObjectTests.cs (3)
25Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 37Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 48Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (2)
548Rectangle boundingRectangle = tabPage.AccessibilityObject.BoundingRectangle; 553Rectangle expected = tabPage.RectangleToScreen(tabPage.ClientRectangle);
System\Windows\Forms\AccessibleObjects\TextBoxBaseAccessibleObjectTests.cs (2)
108Rectangle expected = textBoxBase.RectangleToScreen(textBoxBase.ClientRectangle); 109Rectangle actual = accessibleObject.BoundingRectangle;
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (1)
25Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (1)
50Assert.Equal(Rectangle.Empty.Size, accessibilityObject.Bounds.Size);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarChildAccessibleObjectTests.cs (3)
24Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 36Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 47Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarFirstButtonAccessibleObjectTests.cs (3)
19Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds); 30Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 41Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarLastButtonAccessibleObjectTests.cs (4)
19Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds); 30Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 41Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 152var bounds = accessibleObject.Bounds;
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarThumbAccessibleObjectTests.cs (2)
19Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 30Assert.NotEqual(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (2)
614accessibleObject.Bounds.Should().Be(Rectangle.Empty); 618accessibleObject.Bounds.Should().NotBe(Rectangle.Empty);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (2)
24Rectangle actualRectangle = new((int)actualArray[0], (int)actualArray[1], (int)actualArray[2], (int)actualArray[3]); 25Assert.Equal((Rectangle)r, actualRectangle);
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\AccessibleObjects\VScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (2)
44Assert.Equal(Rectangle.Empty, accessibleObject.Bounds); 55Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
44Assert.Equal(Rectangle.Empty, accessibleObject.Bounds);
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (2)
468Rectangle value = new(1, 1, 2, 2); 904public Rectangle Rectangle = new(1, 2, 3, 4);
System\Windows\Forms\ButtonRenderingTests.cs (5)
39Rectangle bounds = button.Bounds; 83Rectangle bounds = button.Bounds; 124Rectangle bounds = button.Bounds; 170Rectangle bounds = button.Bounds; 233Rectangle bounds = button.Bounds;
System\Windows\Forms\CheckBoxRendererTests.cs (4)
29Rectangle bounds = control.Bounds; 65Rectangle bounds = control.Bounds; 102Rectangle bounds = control.Bounds; 136Rectangle bounds = control.Bounds;
System\Windows\Forms\CheckBoxTests.cs (1)
798Rectangle downChangeRectangle = checkBox.DownChangeRectangle;
System\Windows\Forms\ClipboardTests.cs (1)
817Rectangle expected = new(1, 1, 2, 2);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (4)
572public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(ComboBoxStyle dropDownStyle, Size size, Rectangle expectedRectangle) 578Rectangle providerRectangle = provider.BoundingRectangle; 595Rectangle providerRectangle = provider.BoundingRectangle; 597Assert.Equal(Rectangle.Empty, providerRectangle);
System\Windows\Forms\ContainerControlTests.cs (3)
41Assert.Equal(Rectangle.Empty, control.Bounds); 48Assert.Equal(Rectangle.Empty, control.ClientRectangle); 66Assert.Equal(Rectangle.Empty, control.DisplayRectangle);
System\Windows\Forms\ContentsResizedEventArgsTests.cs (2)
13yield return new object[] { Rectangle.Empty }; 20public void Ctor_Rectangle(Rectangle newRectangle)
System\Windows\Forms\ControlPaintTests.cs (59)
542yield return new object[] { Rectangle.Empty, Color.Empty, style }; 559public void ControlPaint_DrawBorder_GraphicsRectangleColorButtonBorderStyle_Success(Rectangle bounds, Color color, ButtonBorderStyle style) 587yield return new object[] { Rectangle.Empty, Color.Red, 1, style, Color.Green, 2, style, Color.Blue, 3, style, Color.Yellow, 4, style }; 614Rectangle bounds, 656Rectangle bounds, 688yield return new object[] { Rectangle.Empty }; 698public void ControlPaint_DrawBorder3D_InvokeGraphicsRectangle_Success(Rectangle rectangle) 712yield return new object[] { Rectangle.Empty, style }; 723public void ControlPaint_DrawBorder3D_InvokeGraphicsRectangleBorder3DStyle_Success(Rectangle rectangle, Border3DStyle style) 739yield return new object[] { Rectangle.Empty, style, side }; 751public void ControlPaint_DrawBorder3D_InvokeGraphicsRectangleBorder3DStyleBorder3DSide_Success(Rectangle rectangle, Border3DStyle style, Border3DSide side) 763public void ControlPaint_DrawBorder3D_InvokeGraphicsIntIntIntInt_Success(Rectangle rectangle) 775public void ControlPaint_DrawBorder3D_InvokeGraphicsIntIntIntIntBorder3DStyleSuccess(Rectangle rectangle, Border3DStyle style) 787public void ControlPaint_DrawBorder3D_InvokeGraphicsIntIntIntIntBorder3DStyleBorder3DSide_Success(Rectangle rectangle, Border3DStyle style, Border3DSide side) 823public void ControlPaint_DrawButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ButtonState state) 835public void ControlPaint_DrawButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ButtonState state) 907public void ControlPaint_DrawCaptionButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, CaptionButton button, ButtonState state) 919public void ControlPaint_DrawCaptionButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, CaptionButton button, ButtonState state) 987public void ControlPaint_DrawCheckBox_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ButtonState state) 999public void ControlPaint_DrawCheckBox_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ButtonState state) 1068public void ControlPaint_DrawComboButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ButtonState state) 1080public void ControlPaint_DrawComboButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ButtonState state) 1137yield return new object[] { Rectangle.Empty }; 1147public void ControlPaint_DrawContainerGrabHandle_Invoke_Success(Rectangle rectangle) 1165yield return new object[] { Rectangle.Empty }; 1175public void ControlPaint_DrawFocusRectangle_InvokeGraphicsRectangle_Success(Rectangle rectangle) 1187yield return new object[] { Rectangle.Empty, Color.Red, Color.Blue }; 1206public void ControlPaint_DrawFocusRectangle_Invoke_Success(Rectangle rectangle, Color foreColor, Color backColor) 1229yield return new object[] { Rectangle.Empty, primary, enabled }; 1241public void ControlPaint_DrawGrabHandle_Invoke_Success(Rectangle rectangle, bool primary, bool enabled) 1263yield return new object[] { Rectangle.Empty, new Size(1, 1), Color.Red }; 1278public void ControlPaint_DrawGrid_Invoke_Success(Rectangle area, Size pixelsBetweenDots, Color backColor) 1356yield return new object[] { Rectangle.Empty, primary }; 1367public void ControlPaint_DrawLockedFrame_Invoke_Success(Rectangle rectangle, bool primary) 1398public void ControlPaint_DrawMenuGlyph_InvokeGraphicsRectangleMenuGlyph_Success(Rectangle rectangle, MenuGlyph glyph) 1430public void ControlPaint_DrawMenuGlyph_InvokeGraphicsRectangleMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor) 1442public void ControlPaint_DrawMenuGlyph_InvokeGraphicsIntIntIntIntMenuGlyph_Success(Rectangle rectangle, MenuGlyph glyph) 1454public void ControlPaint_DrawMenuGlyph_InvokeGraphicsIntIntIntIntMenuGlyphColorColor_Success(Rectangle rectangle, MenuGlyph glyph, Color foreColor, Color backColor) 1529public void ControlPaint_DrawMixedCheckBox_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ButtonState state) 1541public void ControlPaint_DrawMixedCheckBox_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ButtonState state) 1609public void ControlPaint_DrawRadioButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ButtonState state) 1621public void ControlPaint_DrawRadioButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ButtonState state) 1680yield return new object[] { Rectangle.Empty, Color.Empty, style }; 1697public void ControlPaint_DrawReversibleFrame_Invoke_Success(Rectangle rectangle, Color backColor, FrameStyle style) 1747public void ControlPaint_DrawScrollButton_InvokeGraphicsRectangleButtonState_Success(Rectangle rectangle, ScrollButton button, ButtonState state) 1759public void ControlPaint_DrawScrollButton_InvokeGraphicsIntIntIntIntButtonState_Success(Rectangle rectangle, ScrollButton button, ButtonState state) 1818yield return new object[] { active, Rectangle.Empty, Rectangle.Empty, Color.Red }; 1832public void ControlPaint_DrawSelectionFrame_Invoke_Success(bool active, Rectangle outsideRect, Rectangle insideRect, Color backColor) 1852yield return new object[] { Color.Red, Rectangle.Empty }; 1867public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorRectangle_Success(Color backColor, Rectangle rectangle) 1879public void ControlPaint_DrawSizeGrip_InvokeGraphicsColorIntIntIntInt_Success(Color backColor, Rectangle rectangle) 1949yield return new object[] { s, SystemFonts.MenuFont, Color.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter }; 1963Rectangle layoutRectangle, TextFormatFlags format) 1982yield return new object[] { Rectangle.Empty }; 1992public void ControlPaint_DrawVisualStyleBorder_Invoke_Success(Rectangle rectangle) 2010yield return new object[] { Rectangle.Empty, Color.Red }; 2024public void ControlPaint_FillReversibleRectangle_Invoke_Success(Rectangle rectangle, Color backColor)
System\Windows\Forms\ControlPaintTests.Rendering.cs (7)
21Rectangle bounds = new(10, 10, 10, 10); 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); 351Rectangle bounds = new(10, 10, 10, 10);
System\Windows\Forms\ControlTests.cs (12)
29Assert.Equal(Rectangle.Empty, control.Bounds); 37Assert.Equal(Rectangle.Empty, control.ClientRectangle); 53Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 118Assert.Equal(Rectangle.Empty, control.Bounds); 126Assert.Equal(Rectangle.Empty, control.ClientRectangle); 142Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 310Assert.Equal(Rectangle.Empty, control.Bounds); 317Assert.Equal(Rectangle.Empty, control.ClientRectangle); 334Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 1214public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified); 1234public new void NotifyInvalidate(Rectangle invalidatedArea) => base.NotifyInvalidate(invalidatedArea);
System\Windows\Forms\ControlTests.Handlers.cs (15)
2769yield return new object[] { true, Color.Empty, new InvalidateEventArgs(Rectangle.Empty) }; 2773yield return new object[] { true, Color.Red, new InvalidateEventArgs(Rectangle.Empty) }; 2777yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty) }; 2782yield return new object[] { false, Color.Empty, new InvalidateEventArgs(Rectangle.Empty) }; 2786yield return new object[] { false, Color.Red, new InvalidateEventArgs(Rectangle.Empty) }; 2873yield return new object[] { true, Color.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2876yield return new object[] { true, Color.Red, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2879yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), new InvalidateEventArgs(Rectangle.Empty), 0 }; 2883yield return new object[] { false, Color.Empty, new InvalidateEventArgs(Rectangle.Empty), 0 }; 2886yield return new object[] { false, Color.Red, new InvalidateEventArgs(Rectangle.Empty), 0 }; 4638using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 4657using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 4696using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 4725using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 4761using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty);
System\Windows\Forms\ControlTests.Internals.cs (2)
175Rectangle expectedBounds = new(expected, expected, expected, expected); 177Rectangle actualBounds = control.ApplyBoundsConstraints(expected, expected, expected, expected);
System\Windows\Forms\ControlTests.Methods.cs (129)
1840public void Control_DrawToBitmap_Invoke_Success(Rectangle targetBounds) 1854public void Control_DrawToBitmap_InvokeWithHandle_Success(Rectangle rectangle) 2396yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2397yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2398yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2399yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2402yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(0, 0), BoundsSpecified.All, Rectangle.Empty }; 2429public void Control_GetScaledBounds_Invoke_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2442yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.All, new Rectangle(0, 0, 4, 4) }; 2443yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.X, Rectangle.Empty }; 2444yield return new object[] { Rectangle.Empty, new Size(0, 0), BoundsSpecified.Y, Rectangle.Empty }; 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) }; 2475public void Control_GetScaledBounds_InvokeWithStyles_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2488public void Control_GetScaledBounds_InvokeWithSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2535public void Control_GetScaledBounds_InvokeWithInvalidDesignModeSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected, object designerHost) 2569yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2570yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2571yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2572yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2602public void Control_GetScaledBounds_InvokeWithValidDesignModeSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2641public void Control_GetScaledBounds_InvokeTopLevel_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2658yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2659yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2660yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2661yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2691public void Control_GetScaledBounds_InvokeFixedWidth_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2708yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2709yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2710yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2711yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2741public void Control_GetScaledBounds_InvokeFixedHeight_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2758yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 2759yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 2760yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 2761yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 2791public void Control_GetScaledBounds_InvokeFixedWidthAndHeight_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2807public void Control_GetScaledBounds_InvokeFixedWidthAndHeightWithStyles_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 3199yield return new object[] { opaque, Rectangle.Empty }; 3210public void Control_Invalidate_InvokeRectangle_Success(bool opaque, Rectangle rc) 3230yield return new object[] { opaque, Rectangle.Empty, new Rectangle(0, 0, 10, 20) }; 3241public void Control_Invalidate_InvokeRectangleWithHandle_Success(bool opaque, Rectangle rc, Rectangle expectedInvalidRect) 3277public void Control_Invalidate_InvokeRectangleWithChildrenWithHandle_Success(bool opaque, Rectangle rc, Rectangle expectedInvalidRect) 3336yield return new object[] { opaque, Rectangle.Empty, invalidateChildren }; 3348public void Control_Invalidate_InvokeRectangleBool_Success(bool opaque, Rectangle rc, bool invalidateChildren) 3370yield return new object[] { opaque, Rectangle.Empty, invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3382public void Control_Invalidate_InvokeRectangleBoolWithHandle_Success(bool opaque, Rectangle rc, bool invalidateChildren, Rectangle expectedInvalidRect) 3418public void Control_Invalidate_InvokeRectangleBoolWithChildrenWithHandle_Success(bool opaque, Rectangle rc, bool invalidateChildren, Rectangle expectedInvalidRect) 3519public void Control_Invalidate_InvokeRegionWithHandle_Success(bool opaque, Region region, Rectangle expectedInvalidRect) 3555public void Control_Invalidate_InvokeRegionWithChildrenWithHandle_Success(bool opaque, Region region, Rectangle expectedInvalidRect) 3662public void Control_Invalidate_InvokeRegionBoolWithHandle_Success(bool opaque, Region region, bool invalidateChildren, Rectangle expectedInvalidRect) 3698public void Control_Invalidate_InvokeRegionBoolWithChildrenWithHandle_Success(bool opaque, Region region, bool invalidateChildren, Rectangle expectedInvalidRect) 4494yield return new object[] { Rectangle.Empty }; 4500public void Control_NotifyInvalidate_Invoke_CallsInvalidated(Rectangle invalidatedArea) 4527yield return new object[] { true, Color.Empty, Rectangle.Empty }; 4531yield return new object[] { true, Color.Red, Rectangle.Empty }; 4535yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), Rectangle.Empty }; 4540yield return new object[] { false, Color.Empty, Rectangle.Empty }; 4544yield return new object[] { false, Color.Red, Rectangle.Empty }; 4551public void Control_NotifyInvalidate_InvokeWithChildren_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, Rectangle invalidatedArea) 4596public void Control_NotifyInvalidate_InvokeWithHandle_CallsInvalidated(Rectangle invalidatedArea) 4631yield return new object[] { true, Color.Empty, Rectangle.Empty, 0 }; 4634yield return new object[] { true, Color.Red, Rectangle.Empty, 0 }; 4637yield return new object[] { true, Color.FromArgb(200, 50, 100, 150), Rectangle.Empty, 0 }; 4641yield return new object[] { false, Color.Empty, Rectangle.Empty, 0 }; 4644yield return new object[] { false, Color.Red, Rectangle.Empty, 0 }; 4651public void Control_NotifyInvalidate_InvokeWithChildrenWithHandle_CallsInvalidated(bool supportsTransparentBackgroundColor, Color backColor, Rectangle invalidatedArea, int expectedChildInvalidatedCallCount) 10141public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified); 10340Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10341Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10349Assert.Equal(Rectangle.Empty, control.Bounds); 10359Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10360Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10368Assert.Equal(Rectangle.Empty, control.Bounds); 10514Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10515Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10523Assert.Equal(Rectangle.Empty, control.Bounds); 10533Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10534Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10542Assert.Equal(Rectangle.Empty, control.Bounds); 10606Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10607Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10615Assert.Equal(Rectangle.Empty, control.Bounds); 10625Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10626Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10634Assert.Equal(Rectangle.Empty, control.Bounds); 10697Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10698Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10706Assert.Equal(Rectangle.Empty, control.Bounds); 10719Assert.Equal(Rectangle.Empty, control.ClientRectangle); 10720Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 10728Assert.Equal(Rectangle.Empty, control.Bounds);
System\Windows\Forms\CursorTests.cs (11)
180Rectangle clip = Cursor.Clip; 192Rectangle clip = Cursor.Clip; 207Rectangle virtualScreen = SystemInformation.VirtualScreen; 214Cursor.Clip = Rectangle.Inflate(virtualScreen, 10, 10); 264Rectangle virtualScreen = SystemInformation.VirtualScreen; 283Rectangle virtualScreen = SystemInformation.VirtualScreen; 364yield return new object[] { Rectangle.Empty }; 376public void Cursor_Draw_InvokeValidCursor_Success(Rectangle rectangle) 386public void Cursor_Draw_InvokeInvalidCursor_Success(Rectangle rectangle) 413public void Cursor_DrawStretched_InvokeValidCursor_Success(Rectangle rectangle) 423public void Cursor_DrawStretched_InvokeInvalidCursor_Success(Rectangle rectangle)
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (36)
12yield return new object[] { Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All }; 19public void DataGridViewCellPaintingEventArgs_Ctor_Rectangle_Rectangle_Int_Int_DataGridViewElementStates_Object_Object_String_DataGridViewCellStyle_DataGridViewAdvancedBorderStyle_DataGridViewPaintParts(Rectangle clipBounds, Rectangle cellBounds, int rowIndex, int columnIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts) 46Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewCellPaintingEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All)); 53Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewCellPaintingEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All)); 62Assert.Throws<ArgumentNullException>("cellStyle", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, null, null, DataGridViewPaintParts.All)); 72Assert.Throws<ArgumentException>("paintParts", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, paintParts)); 84DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All); 95DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 108DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 121DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 134DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All); 145DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 158DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 171DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 184DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All); 195DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 208DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All); 221DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All);
System\Windows\Forms\DataGridViewCellTests.cs (40)
21Assert.Equal(Rectangle.Empty, cell.ContentBounds); 57Assert.Equal(Rectangle.Empty, cell.ContentBounds); 66Assert.Equal(Rectangle.Empty, cell.ContentBounds); 75Assert.Equal(Rectangle.Empty, cell.ContentBounds); 89Assert.Equal(Rectangle.Empty, cell.GetContentBounds(0)); 689Assert.Equal(Rectangle.Empty, cell.ErrorIconBounds); 3212public void DataGridViewCell_BorderWidths_Invoke_ReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3220public void DataGridViewCell_BorderWidths_InvokeWithRow_ReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3233public void DataGridViewCell_BorderWidths_InvokeWithColumn_ReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3246public void DataGridViewCell_BorderWidths_InvokeWithDataGridView_ReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3264public void DataGridViewCell_BorderWidths_InvokeWithDataGridViewRightToLeft_ReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3285public void DataGridViewCell_BorderWidths_InvokeSharedReturnsExpected(DataGridViewAdvancedBorderStyle advancedBorderStyle, Rectangle expected) 3339Assert.Equal(Rectangle.Empty, cell.ContentBounds); 3376Assert.Equal(Rectangle.Empty, cell.ContentBounds); 3578Assert.Equal(Rectangle.Empty, cell.GetContentBounds(rowIndex)); 3591Assert.Equal(Rectangle.Empty, cell.GetContentBounds(rowIndex)); 3604Assert.Equal(Rectangle.Empty, cell.GetContentBounds(rowIndex)); 3618Assert.Equal(Rectangle.Empty, cell.GetContentBounds(0)); 3632Assert.Equal(Rectangle.Empty, cell.GetContentBounds(0)); 3669Assert.Equal(Rectangle.Empty, cell.GetContentBounds(null, cellStyle, rowIndex)); 3679Assert.Equal(Rectangle.Empty, cell.GetContentBounds(graphics, cellStyle, rowIndex)); 3821Assert.Equal(Rectangle.Empty, cell.GetErrorIconBounds(null, cellStyle, rowIndex)); 3831Assert.Equal(Rectangle.Empty, cell.GetErrorIconBounds(graphics, cellStyle, rowIndex)); 4808IList<Rectangle> neighbors00 = ((IKeyboardToolTip)control.Rows[0].Cells[0]).GetNeighboringToolsRectangles(); 4813IList<Rectangle> neighbors21 = ((IKeyboardToolTip)control.Rows[2].Cells[1]).GetNeighboringToolsRectangles(); 4820IList<Rectangle> neighbors33 = ((IKeyboardToolTip)control.Rows[3].Cells[3]).GetNeighboringToolsRectangles(); 6011cell.Paint(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, null, null, null, null, null, DataGridViewPaintParts.All); 6020cell.Paint(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, null, null, null, null, null, DataGridViewPaintParts.All); 6523public new Rectangle BorderWidths(DataGridViewAdvancedBorderStyle advancedBorderStyle) => base.BorderWidths(advancedBorderStyle); 6553public new Rectangle BorderWidths(DataGridViewAdvancedBorderStyle advancedBorderStyle) => base.BorderWidths(advancedBorderStyle); 6574public new Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => base.GetContentBounds(graphics, cellStyle, rowIndex); 6576public new Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => base.GetErrorIconBounds(graphics, cellStyle, rowIndex); 6649public new void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts) 6654public new void PaintBorder(Graphics graphics, Rectangle clipBounds, Rectangle bounds, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle) 6659public new void PaintErrorIcon(Graphics graphics, Rectangle clipBounds, Rectangle cellValueBounds, string errorText) => base.PaintErrorIcon(graphics, clipBounds, cellValueBounds, errorText);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (9)
20Assert.Equal(Rectangle.Empty, cell.ContentBounds); 2041Assert.Equal(Rectangle.Empty, cell.ContentBounds); 2078Assert.Equal(Rectangle.Empty, cell.ContentBounds); 2127Assert.Equal(Rectangle.Empty, cell.ContentBounds); 2164Assert.Equal(Rectangle.Empty, cell.ContentBounds); 4620Assert.Throws<ArgumentNullException>("cellStyle", () => cell.Paint(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, null, null, null, null, null, DataGridViewPaintParts.All)); 4710Rectangle clipBounds, 4711Rectangle cellBounds,
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (36)
12yield return new object[] { Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false }; 19public void Ctor_DataGridView_Graphics_Rectangle_Rectangle_Int_DataGridViewElementStates_String_DataGridViewCellStyle_Bool_Bool(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, string errorText, DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow) 42Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPostPaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false)); 49Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPostPaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false)); 58Assert.Throws<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPostPaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false)); 63yield return new object[] { Rectangle.Empty }; 70public void ClipBounds_Set_GetReturnsExpected(Rectangle value) 75DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false) 89DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 102DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 113DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 126DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 137DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 150DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 161DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 174DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 185DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 198DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 211DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false);
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (40)
15yield return new object[] { new DataGridView(), graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false }; 22public void Ctor_DataGridView_Graphics_Rectangle_Rectangle_Int_DataGridViewElementStates_String_DataGridViewCellStyle_Bool_Bool(DataGridView dataGridView, Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, string errorText, DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow) 43Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPrePaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false)); 50Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPrePaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false)); 59Assert.Throws<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPrePaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false)); 64yield return new object[] { Rectangle.Empty }; 71public void ClipBounds_Set_GetReturnsExpected(Rectangle value) 76DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false) 91DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false) 105DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 116DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 129DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 140DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 153DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 164DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 177DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 188DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 201DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 212DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 225DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false); 238DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false);
System\Windows\Forms\DataGridViewRowTests.cs (93)
4184yield return new object[] { Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, new DataGridViewCellStyle(), false }; 4185yield return new object[] { Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.None, new DataGridViewCellStyle(), false }; 4194public void DataGridViewRow_DrawFocus_Invoke_Success(Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates rowState, DataGridViewCellStyle cellStyle, bool cellsPaintSelectionBackground) 4568yield return new object[] { Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true }; 4576public void DataGridViewRow_Paint_Invoke_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4599public void DataGridViewRow_Paint_InvokeHeadersInvisible_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4623public void DataGridViewRow_Paint_InvokeFrozen_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4649public void DataGridViewRow_Paint_InvokeRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4673public void DataGridViewRow_Paint_InvokeSingleVerticalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4697public void DataGridViewRow_Paint_InvokeSingleHorizontalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4721public void DataGridViewRow_Paint_InvokeFirstDisplayedScrollingColumnIndex_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4745public void DataGridViewRow_Paint_InvokeFirstDisplayedScrollingColumnIndexRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 4770public void DataGridViewRow_Paint_InvokeSingleHorizontalBorderAddedDisplayedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 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)); 4955Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, Rectangle.Empty, 1, DataGridViewElementStates.None, true, true)); 4969Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true)); 4990Assert.Throws<InvalidOperationException>(() => row.Paint(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true)); 5014yield return new object[] { Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All }; 5022public void DataGridViewRow_PaintCells_Invoke_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5045public void DataGridViewRow_PaintCells_InvokeHeadersInvisible_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5069public void DataGridViewRow_PaintCells_InvokeFrozen_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5095public void DataGridViewRow_PaintCells_InvokeRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5119public void DataGridViewRow_PaintCells_InvokeSingleVerticalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5143public void DataGridViewRow_PaintCells_InvokeSingleHorizontalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5167public void DataGridViewRow_PaintCells_InvokeFirstDisplayedScrollingColumnIndex_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5191public void DataGridViewRow_PaintCells_InvokeFirstDisplayedScrollingColumnIndexRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5216public void DataGridViewRow_PaintCells_InvokeSingleHorizontalBorderAddedDisplayedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5250Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5264Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5299Assert.Throws<InvalidOperationException>(() => row.PaintCells(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5337Assert.Throws<ArgumentException>(() => row.PaintCells(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, paintParts)); 5342public void DataGridViewRow_PaintHeader_Invoke_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5365public void DataGridViewRow_PaintHeader_InvokeHeadersInvisible_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5389public void DataGridViewRow_PaintHeader_InvokeFrozen_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5415public void DataGridViewRow_PaintHeader_InvokeRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5439public void DataGridViewRow_PaintHeader_InvokeSingleVerticalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5463public void DataGridViewRow_PaintHeader_InvokeSingleHorizontalBorderAddedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5487public void DataGridViewRow_PaintHeader_InvokeFirstDisplayedScrollingColumnIndex_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5511public void DataGridViewRow_PaintHeader_InvokeFirstDisplayedScrollingColumnIndexRightToLeft_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5536public void DataGridViewRow_PaintHeader_InvokeSingleHorizontalBorderAddedDisplayedDataGridView_Success(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5571Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, Rectangle.Empty, Rectangle.Empty, -1, 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)); 5623Assert.Throws<InvalidOperationException>(() => row.PaintHeader(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5675Assert.Throws<InvalidEnumArgumentException>("paintParts", () => row.PaintHeader(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, paintParts)); 5770public new void DrawFocus(Graphics graphics, Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates rowState, DataGridViewCellStyle cellStyle, bool cellsPaintSelectionBackground) 5775public new void Paint(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow) 5780public new void PaintCells(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts) 5785public new void PaintHeader(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, DataGridViewPaintParts paintParts)
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
38Rectangle bounds = dataGrid.Bounds;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (2)
119Assert.Equal(Rectangle.Empty, control.MaximizedBounds); 424public new Rectangle MaximizedBounds => base.MaximizedBounds;
System\Windows\Forms\DrawItemEventArgsTests.cs (6)
13yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1, SystemColors.HighlightText, SystemColors.Highlight }; 22public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState(Font font, Rectangle rect, int index, DrawItemState state, Color expectedForeColor, Color expectedBackColor) 38yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1, Color.Empty, Color.Empty }; 47public void DrawItemEventArgs_Ctor_Graphics_Font_Rectangle_Int_DrawItemState_Color_Color(Font font, Rectangle rect, int index, DrawItemState state, Color foreColor, Color backColor) 87public void DrawItemEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, DrawItemState state) 97public void DrawItemEventArgs_DrawFocusRectangle_Invoke_Success(Rectangle bounds, DrawItemState state)
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (4)
13yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1), Color.Empty, Color.Empty, null }; 21public void DrawListViewColumnHeaderEventArgs_Ctor_Graphics_Rectangle_Int_ColumnHeader_ListViewItemStates_Color_Color_Font(Rectangle bounds, int columnIndex, ColumnHeader header, ListViewItemStates state, Color foreColor, Color backColor, Font font) 73public void DrawListViewColumnHeaderEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, ColumnHeader header, ListViewItemStates state, Color foreColor, Color backColor, Font font) 111public void DrawListViewColumnHeaderEventArgs_DrawText_NullHeader_Success(Rectangle bounds, int columnIndex, ListViewItemStates state, Color foreColor, Color backColor, Font font)
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (9)
13yield return new object[] { Rectangle.Empty, -2, ListViewItemStates.Checked - 1 }; 21public void DrawListViewItemEventArgs_Ctor_Graphics_ListViewItem_Rectangle_Int_ListViewItemStates(Rectangle bounds, int itemIndex, ListViewItemStates state) 75yield return new object[] { new ListViewItem(), Rectangle.Empty, ListViewItemStates.Default }; 76yield return new object[] { new ListViewItem(), Rectangle.Empty, ListViewItemStates.Focused }; 77yield return new object[] { new ListViewItem(), Rectangle.Empty, ListViewItemStates.Checked }; 110public void DrawListViewItemEventArgs_DrawBackground_Invoke_Success(ListViewItem item, Rectangle bounds, ListViewItemStates state) 120public void DrawListViewItemEventArgs_DrawFocusRectangle_HasGraphicsFocused_Success(ListViewItem item, Rectangle bounds, ListViewItemStates state) 130public void DrawListViewItemEventArgs_DrawText_Invoke_Success(ListViewItem item, Rectangle bounds, ListViewItemStates state) 140public void DrawListViewItemEventArgs_DrawText_InvokeTextFormatFlags(ListViewItem item, Rectangle bounds, ListViewItemStates state)
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (5)
12yield return new object[] { Rectangle.Empty, null, new ListViewItem.ListViewSubItem(), -2, -2, null, ListViewItemStates.Checked - 1 }; 13yield return new object[] { Rectangle.Empty, new ListViewItem(), new ListViewItem.ListViewSubItem(), -2, -2, null, ListViewItemStates.Checked - 1 }; 22public void DrawListViewSubItemEventArgs_Ctor_Graphics_ListViewItem_Rectangle_Int_ListViewItemStates(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, int columnIndex, ColumnHeader header, ListViewItemStates itemState) 114public void DrawListViewSubItemEventArgs_DrawBackground_HasGraphics_Success(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, ColumnHeader header, ListViewItemStates itemState) 124public void DrawListViewSubItemEventArgs_DrawFocusRectangle_HasGraphics_Success(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, ColumnHeader header, ListViewItemStates itemState)
System\Windows\Forms\DrawToolTipEventArgsTests.cs (6)
13yield return new object[] { null, null, Rectangle.Empty, null, Color.Empty, Color.Empty, null }; 20public void Ctor_Graphics_IWin32Window_Control_Rectangle_String_Color_Color_Font(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 45public void DrawBackground_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 55public void DrawText_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 65public void DrawText_InvokeTextFormatFlags_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font) 75public void DrawBorder_Invoke_Success(IWin32Window associatedWindow, Control associatedControl, Rectangle bounds, string toolTipText, Color backColor, Color foreColor, Font font)
System\Windows\Forms\DrawTreeNodeEventArgsTests.cs (2)
13yield return new object[] { null, Rectangle.Empty, TreeNodeStates.Checked - 1 }; 20public void Ctor_Graphics_TreeNode_Rectangle_TreeNodeStates(TreeNode node, Rectangle bounds, TreeNodeStates state)
System\Windows\Forms\FormTests.cs (2)
121Assert.Equal(Rectangle.Empty, control.MaximizedBounds); 2734public new Rectangle MaximizedBounds => base.MaximizedBounds;
System\Windows\Forms\GroupBoxTests.cs (6)
568Rectangle result = control.DisplayRectangle; 581Rectangle result = control.DisplayRectangle; 594Rectangle result = control.DisplayRectangle; 607Rectangle result = groupBox.DisplayRectangle; 1851using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 1889using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty);
System\Windows\Forms\HtmlElementTests.cs (6)
113Rectangle result = element.ClientRectangle; 114Assert.Equal(Rectangle.Empty, result); 805Rectangle result = element.OffsetRectangle; 806Assert.NotEqual(Rectangle.Empty, result); 1154Rectangle result = element.ScrollRectangle; 1155Assert.NotEqual(Rectangle.Empty, result);
System\Windows\Forms\InvalidateEventArgsTests.cs (2)
13yield return new object[] { Rectangle.Empty }; 20public void Ctor_Rectangle(Rectangle invalidRect)
System\Windows\Forms\ListBoxTests.cs (8)
770Assert.Equal(123, ((Rectangle)rc).Width); 5330Rectangle rect1 = control.GetItemRectangle(0); 5338Rectangle rect2 = control.GetItemRectangle(1); 5360Rectangle rect1 = control.GetItemRectangle(0); 5371Rectangle rect2 = control.GetItemRectangle(1); 5384yield return new object[] { default(RECT), Rectangle.Empty }; 5390public void ListBox_GetItemRectangle_InvokeCustomGetItemRect_ReturnsExpected(object getItemRectResult, Rectangle expected) 5428Assert.Equal(Rectangle.Empty, control.GetItemRectangle(0));
System\Windows\Forms\ListControlTests.cs (3)
33Assert.Equal(Rectangle.Empty, control.Bounds); 41Assert.Equal(Rectangle.Empty, control.ClientRectangle); 60Assert.Equal(Rectangle.Empty, control.DisplayRectangle);
System\Windows\Forms\ListViewInsertionMarkTests.cs (4)
187Assert.Equal(Rectangle.Empty, insertionMark.Bounds); 205Assert.Equal(Rectangle.Empty, insertionMark.Bounds); 215yield return new object[] { default(RECT), Rectangle.Empty }; 221public void ListViewInsertionMark_Bounds_GetCustomGetInsertMarkRect_ReturnsExpected(object getInsertMarkRectResult, Rectangle expected)
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (22)
246IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[0]).GetNeighboringToolsRectangles(); 264IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[1]).GetNeighboringToolsRectangles(); 283IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[2]).GetNeighboringToolsRectangles(); 301IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[3]).GetNeighboringToolsRectangles(); 320IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[4]).GetNeighboringToolsRectangles(); 340IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[5]).GetNeighboringToolsRectangles(); 359IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[6]).GetNeighboringToolsRectangles(); 377IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[7]).GetNeighboringToolsRectangles(); 396IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[8]).GetNeighboringToolsRectangles(); 415IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[0]).GetNeighboringToolsRectangles(); 434IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[1]).GetNeighboringToolsRectangles(); 455IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[2]).GetNeighboringToolsRectangles(); 475IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[3]).GetNeighboringToolsRectangles(); 496IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[4]).GetNeighboringToolsRectangles(); 518IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[5]).GetNeighboringToolsRectangles(); 539IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[6]).GetNeighboringToolsRectangles(); 559IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[7]).GetNeighboringToolsRectangles(); 579IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[8]).GetNeighboringToolsRectangles(); 595IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[0]).GetNeighboringToolsRectangles(); 612IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[1]).GetNeighboringToolsRectangles(); 630IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.Items[2]).GetNeighboringToolsRectangles(); 823private Rectangle GetNativeScreenRectangle(ListViewItem listView)
System\Windows\Forms\ListViewItemTests.cs (22)
17Assert.Equal(Rectangle.Empty, item.Bounds); 56Assert.Equal(Rectangle.Empty, item.Bounds); 94Assert.Equal(Rectangle.Empty, item.Bounds); 132Assert.Equal(Rectangle.Empty, item.Bounds); 170Assert.Equal(Rectangle.Empty, item.Bounds); 207Assert.Equal(Rectangle.Empty, item.Bounds); 244Assert.Equal(Rectangle.Empty, item.Bounds); 282Assert.Equal(Rectangle.Empty, item.Bounds); 320Assert.Equal(Rectangle.Empty, item.Bounds); 357Assert.Equal(Rectangle.Empty, item.Bounds); 395Assert.Equal(Rectangle.Empty, item.Bounds); 433Assert.Equal(Rectangle.Empty, item.Bounds); 470Assert.Equal(Rectangle.Empty, item.Bounds); 508Assert.Equal(Rectangle.Empty, item.Bounds); 546Assert.Equal(Rectangle.Empty, item.Bounds); 584Assert.Equal(Rectangle.Empty, item.Bounds); 621Assert.Equal(Rectangle.Empty, item.Bounds); 659Assert.Equal(Rectangle.Empty, item.Bounds); 697Assert.Equal(Rectangle.Empty, item.Bounds); 734Assert.Equal(Rectangle.Empty, item.Bounds); 773Assert.Equal(Rectangle.Empty, item.Bounds); 803Assert.Equal(Rectangle.Empty, item.Bounds);
System\Windows\Forms\ListViewSubItemTests.cs (3)
18Assert.Equal(Rectangle.Empty, subItem.Bounds); 44Assert.Equal(Rectangle.Empty, subItem.Bounds); 70Assert.Equal(Rectangle.Empty, subItem.Bounds);
System\Windows\Forms\ListViewTests.cs (6)
4089Rectangle rect1 = control.GetItemRect(0); 4097Rectangle rect2 = control.GetItemRect(1); 4120Rectangle rect1 = control.GetItemRect(0); 4131Rectangle rect2 = control.GetItemRect(1); 4143yield return new object[] { default(RECT), Rectangle.Empty }; 4149public void ListView_GetItemRect_InvokeCustomGetItemRect_ReturnsExpected(object getItemRectResult, Rectangle expected)
System\Windows\Forms\MdiClientTests.cs (15)
31Assert.Equal(Rectangle.Empty, control.Bounds); 37Assert.Equal(Rectangle.Empty, control.ClientRectangle); 46Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 774Assert.Equal(Rectangle.Empty, control.ClientRectangle); 775Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 783Assert.Equal(Rectangle.Empty, control.Bounds); 801Assert.Equal(Rectangle.Empty, control.ClientRectangle); 802Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 810Assert.Equal(Rectangle.Empty, control.Bounds); 926Assert.Equal(Rectangle.Empty, control.ClientRectangle); 927Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 935Assert.Equal(Rectangle.Empty, control.Bounds); 953Assert.Equal(Rectangle.Empty, control.ClientRectangle); 954Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 962Assert.Equal(Rectangle.Empty, control.Bounds);
System\Windows\Forms\MdiControlStripTests.cs (1)
87Assert.Equal(Rectangle.Empty, mdiControlStrip.GripRectangle);
System\Windows\Forms\MenuStripTests.cs (1)
85Assert.Equal(Rectangle.Empty, control.GripRectangle);
System\Windows\Forms\MonthCalendarTests.cs (6)
4314Rectangle actual = todayLinkAccessibleObject.Bounds; 4315Rectangle expected = controlAccessibleObject.GetCalendarPartRectangle(MCGRIDINFO_PART.MCGIP_FOOTER); 4328Rectangle bounds = previousButtonAccessibleObject.Bounds; 4329Rectangle expectedBounds = new(13, 42, 16, 16); 4353Rectangle actual = rowAccessibleObject.Bounds; 4354Rectangle expected = controlAccessibleObject.GetCalendarPartRectangle(MCGRIDINFO_PART.MCGIP_CALENDARROW, 0, 0);
System\Windows\Forms\PaintEventArgsTests.cs (3)
13yield return new object[] { Rectangle.Empty }; 20public void Ctor_Graphics_Rectangle(Rectangle clipRect) 71public SubPaintEventArgs(Graphics graphics, Rectangle clipRect) : base(graphics, clipRect)
System\Windows\Forms\ProgressBarRendererTest.cs (2)
64private void TestProgressBarRenderer(Action<Graphics, Rectangle> drawAction) 69Rectangle rectangle1 = new(0, 0, 50, 50);
System\Windows\Forms\PropertyStoreTests.cs (5)
160Rectangle one = new(1, 2, 3, 4); 161Rectangle two = new(5, 6, 7, 8); 168store.TryGetValue(1, out Rectangle result).Should().BeTrue(); 176Rectangle one = new(1, 2, 3, 4); 181store.TryGetValue(1, out Rectangle result).Should().BeTrue();
System\Windows\Forms\RadioButtonRendererTests.cs (4)
28Rectangle bounds = control.Bounds; 59Rectangle bounds = control.Bounds; 96Rectangle bounds = control.Bounds; 115Rectangle bounds = control.Bounds;
System\Windows\Forms\RichTextBoxTests.cs (7)
10322yield return new object[] { BorderStyle.Fixed3D, Rectangle.Empty, new Rectangle(0, 0, 0, 1) }; 10323yield return new object[] { BorderStyle.FixedSingle, Rectangle.Empty, Rectangle.Empty }; 10324yield return new object[] { BorderStyle.None, Rectangle.Empty, Rectangle.Empty }; 10333public unsafe void RichTextBox_WndProc_InvokeReflectNotifyWithHandleWithHWndRequestResize_Success(BorderStyle borderStyle, Rectangle result, Rectangle expected)
System\Windows\Forms\ScreenTests.cs (3)
132public void Screen_FromRectangle_Invoke_ReturnsExpected(Rectangle rectangle) 157public void Screen_GetBounds_InvokeRectangle_ReturnsExpected(Rectangle rectangle) 187public void Screen_GetWorkingArea_InvokeRectangle_ReturnsExpected(Rectangle rectangle)
System\Windows\Forms\ScrollableControlTests.cs (6)
35Assert.Equal(Rectangle.Empty, control.Bounds); 42Assert.Equal(Rectangle.Empty, control.ClientRectangle); 59Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 213public void ScrollableControl_ClientRectangle_should_reduce_if_scrollbars_shown(bool createHandle, int width, int height, int childWidth, int childHeight, Rectangle expected) 2528public void ScrollableControl_ScrollControlIntoView_Invoke_Success(bool autoScroll, bool hScroll, bool vScroll, Size clientSize, Control activeControl, Rectangle expectedDisplayRectangle) 2552public Rectangle ExpectedSize => new(new Point(0, 0), DefaultSize);
System\Windows\Forms\ScrollBarTests.cs (27)
30Assert.Equal(Rectangle.Empty, control.Bounds); 37Assert.Equal(Rectangle.Empty, control.ClientRectangle); 54Assert.Equal(Rectangle.Empty, control.DisplayRectangle); 1768yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 1769yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 1770yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 1771yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 1801public void ScrollBar_GetScaledBounds_Invoke_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 1816yield return new object[] { Rectangle.Empty, new Size(0, 0), specified, Rectangle.Empty }; 1817yield return new object[] { Rectangle.Empty, new Size(1, 1), specified, Rectangle.Empty }; 1818yield return new object[] { Rectangle.Empty, new Size(2, 3), specified, Rectangle.Empty }; 1819yield return new object[] { Rectangle.Empty, new Size(-2, -3), specified, Rectangle.Empty }; 1849public void ScrollBar_GetScaledBounds_InvokeVertical_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 3155public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified); 3214public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified);
System\Windows\Forms\StatusStripTests.cs (13)
85Assert.Equal(Rectangle.Empty, control.GripRectangle); 624yield return new object[] { false, layoutStyle, RightToLeft.Yes, Rectangle.Empty }; 625yield return new object[] { false, layoutStyle, RightToLeft.No, Rectangle.Empty }; 626yield return new object[] { false, layoutStyle, RightToLeft.Inherit, Rectangle.Empty }; 632public void StatusStrip_SizeGripBounds_Get_ReturnsExpected(bool sizingGrip, ToolStripLayoutStyle layoutStyle, RightToLeft rightToLeft, Rectangle expected) 650yield return new object[] { false, layoutStyle, RightToLeft.Yes, Rectangle.Empty }; 651yield return new object[] { false, layoutStyle, RightToLeft.No, Rectangle.Empty }; 652yield return new object[] { false, layoutStyle, RightToLeft.Inherit, Rectangle.Empty }; 658public void StatusStrip_SizeGripBounds_GetLargeSize_ReturnsExpected(bool sizingGrip, ToolStripLayoutStyle layoutStyle, RightToLeft rightToLeft, Rectangle expected) 677yield return new object[] { false, layoutStyle, RightToLeft.Yes, Rectangle.Empty }; 678yield return new object[] { false, layoutStyle, RightToLeft.No, Rectangle.Empty }; 679yield return new object[] { false, layoutStyle, RightToLeft.Inherit, Rectangle.Empty }; 685public void StatusStrip_SizeGripBounds_GetSmallSize_ReturnsExpected(bool sizingGrip, ToolStripLayoutStyle layoutStyle, RightToLeft rightToLeft, Rectangle expected)
System\Windows\Forms\StatusStripTests.Rendering.cs (3)
35Rectangle bounds = statusStrip.Bounds; 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\SystemInformationTests.cs (2)
791Rectangle screen = SystemInformation.VirtualScreen; 800Rectangle workingArea = SystemInformation.WorkingArea;
System\Windows\Forms\TabControlTests.cs (9)
742Rectangle displayRectangle = control.DisplayRectangle; 763Rectangle displayRectangle = control.DisplayRectangle; 782Rectangle displayRectangle = control.DisplayRectangle; 3659Rectangle rect1 = control.GetTabRect(0); 3667Rectangle rect2 = control.GetTabRect(1); 3691Rectangle rect1 = control.GetTabRect(0); 3699Rectangle rect2 = control.GetTabRect(1); 3712yield return new object[] { default(RECT), Rectangle.Empty }; 3718public void TabControl_GetTabRect_InvokeCustomGetItemRect_ReturnsExpected(object getItemRectResult, Rectangle expected)
System\Windows\Forms\TableLayoutCellPaintEventArgsTests.cs (4)
13yield return new object[] { Rectangle.Empty, Rectangle.Empty, -2, -2 }; 21public void Ctor_Graphics_Rectangle_Rectangle_Int_Int(Rectangle clipRectangle, Rectangle cellBounds, int column, int row)
System\Windows\Forms\TableLayoutPanelTests.cs (2)
1210yield return new object[] { new TableLayoutCellPaintEventArgs(graphics, Rectangle.Empty, Rectangle.Empty, 0, 0) };
System\Windows\Forms\TabPageTests.cs (9)
2173Rectangle expected = parent.DisplayRectangle; 4726Rectangle expected = parent.DisplayRectangle; 4946IList<Rectangle> actual = ((IKeyboardToolTip)control).GetNeighboringToolsRectangles(); 4968IList<Rectangle> neighborsRectangles = ((IKeyboardToolTip)testedTab).GetNeighboringToolsRectangles(); 4992Rectangle GetTabRect(int index) 5034Rectangle expected = tabControl.RectangleToScreen(tabControl.GetTabRect(0)); 5035Rectangle actual = page.GetToolNativeScreenRectangle(); 5045Rectangle actual = control.GetToolNativeScreenRectangle(); 5047Assert.Equal(Rectangle.Empty, actual);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (5)
489public void TextBoxBaseUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(bool multiline, Size size, Rectangle expectedRectangle) 495Rectangle providerRectangle = provider.BoundingRectangle; 504public void TextBoxBaseUiaTextProvider_GetFormattingRectangle_ReturnsEmpty_WithoutHandle(bool multiline, Size size, Rectangle expectedRectangle) 509Rectangle providerRectangle = provider.BoundingRectangle; 511Assert.Equal(Rectangle.Empty, providerRectangle);
System\Windows\Forms\TextBoxRendererTests.cs (4)
36Rectangle bounds = textbox.Bounds; 65Rectangle bounds = textbox.Bounds; 100Rectangle bounds = textbox.Bounds; 101Rectangle textBounds = new(10, 20, 30, 40);
System\Windows\Forms\TextRendererTests.cs (15)
162yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red }; 177public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle bounds, Color foreColor) 194yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, Color.Blue }; 213public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColor_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, Color backColor) 230yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, TextFormatFlags.Default, }; 253public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, TextFormatFlags flags) 270yield return new object[] { hint, text, null, Rectangle.Empty, Color.Red, Color.Blue, TextFormatFlags.Default, }; 297public void TextRenderer_DrawText_InvokeIDeviceContextStringFontRectangleColorColorTextFormatFlags_Success(TextRenderingHint textRenderingHint, string text, Font font, Rectangle rectangle, Color foreColor, Color backColor, TextFormatFlags flags) 634default(Rectangle), 641default(Rectangle), 669public unsafe void TextRenderer_DrawText_Padding_Point(TextFormatFlags flags, Rectangle expectedBounds) 692public unsafe void TextRenderer_DrawText_Padding_Rectangle(TextFormatFlags flags, Rectangle expectedBounds) 713public static TheoryData<TextFormatFlags, Rectangle> TextRenderer_DrawText_Padding_TestData 747public void TextRenderer_DrawText_ApplyState(TextFormatFlags flags, Rectangle expectedBounds) 789public static TheoryData<TextFormatFlags, Rectangle> TextRenderer_DrawText_ApplyState_TestData
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (5)
14Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty, Color.Empty, ArrowDirection.Up)); 21yield return new object[] { graphics, null, Rectangle.Empty, Color.Empty, ArrowDirection.Down + 1 }; 28public void Ctor_Graphics_ToolStripItem_Rectangle_Color_ArrowDirection(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 40yield return new object[] { Rectangle.Empty }; 47public void ArrowRectangle_Set_GetReturnsExpected(Rectangle value)
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
27Rectangle bounds = toolStripButton.Bounds; 51Rectangle bounds = toolStripButton.Bounds; 76Rectangle bounds = toolStripButton.Bounds; 102Rectangle bounds = toolStripButton.Bounds; 128Rectangle bounds = toolStripDropDownButton.Bounds; 155Rectangle bounds = toolStripDropDownButton.Bounds;
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (1)
79Rectangle dropDownRect = new(0, 0, 100, 100);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
90Assert.Equal(Rectangle.Empty, control.GripRectangle);
System\Windows\Forms\ToolStripItemImageRenderEventArgsTests.cs (3)
24Assert.Throws<ArgumentNullException>(() => new ToolStripItemImageRenderEventArgs(g, toolStripItem, Rectangle.Empty)); 62public void ToolStripItemImageRenderEventArgs_Ctor_Graphics_ToolStripItem_Rectangle(Graphics g, ToolStripItem item, Rectangle imageRectangle, Image expectedImage) 98public void ToolStripItemImageRenderEventArgs_Ctor_ToolStripItem_Image_Rectangle(ToolStripItem item, Image image, Rectangle imageRectangle)
System\Windows\Forms\ToolStripItemTests.cs (13)
2046public void ToolStripItem_ContentRectangle_GetWithLargePadding_ReturnsExpected(Padding padding, Rectangle expected) 10471yield return new object[] { Rectangle.Empty }; 10477public void ToolStripItem_Invalidate_InvokeRectangle_Nop(Rectangle r) 10488public void ToolStripItem_Invalidate_InvokeRectangleWithOwner_Nop(Rectangle r) 10505public void ToolStripItem_Invalidate_InvokeRectangleWithOwnerWithHandler_Nop(Rectangle r) 10536public void ToolStripItem_Invalidate_InvokeRectangleWithParent_Nop(Rectangle r) 10553public void ToolStripItem_Invalidate_InvokeRectangleWithParentWithHandler_CallsInvalidate(Rectangle r) 14547public void ToolStripItem_SetBounds_Invoke_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 14576public void ToolStripItem_SetBounds_InvokeWithOwner_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 14623public void ToolStripItem_SetBounds_InvokeWithOwnerWithHandle_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 14697public void ToolStripItem_SetBounds_InvokeWithParent_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount, int expectedParentLayoutCallCount) 14751public void ToolStripItem_SetBounds_InvokeWithParentWithHandle_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount, int expectedParentLayoutCallCount) 15605public new void SetBounds(Rectangle bounds) => base.SetBounds(bounds);
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (4)
12yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.Empty, null, TextFormatFlags.Top - 1 }; 19public void Ctor_ToolStripItem_String_Rectangle_Color_Font_TextFormatFlags(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format) 37yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.Empty, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix }; 45public void Ctor_ToolStripItem_String_Rectangle_Color_Font_ContentAlignment(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, ContentAlignment textAlign, TextFormatFlags expectedTextFormat)
System\Windows\Forms\ToolStripPanelTests.cs (3)
37Assert.Equal(Rectangle.Empty, control.Bounds); 44Assert.Equal(Rectangle.Empty, control.ClientRectangle); 62Assert.Equal(Rectangle.Empty, control.DisplayRectangle);
System\Windows\Forms\ToolStripRendererTests.cs (13)
30yield return new object[] { null, Rectangle.Empty, Color.Empty, arrowDirection }; 34yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Left - 1 }; 35yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Up + 1 }; 42public void ToolStripRenderer_DrawArrow_Invoke_CallsRenderArrow(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 204public void ToolStripRenderer_DrawItemCheck_Invoke_CallsRenderItemCheck(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 237public void ToolStripRenderer_DrawItemImage_Invoke_CallsRenderItemImage(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 294yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty, Color.Empty, null, TextFormatFlags.Left }; 299yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty, Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left }; 310public void ToolStripRenderer_DrawItemText_Invoke_CallsRenderItemText(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format) 722public void ToolStripRenderer_OnRenderArrow_Invoke_Nop(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 799public void ToolStripRenderer_OnRenderItemCheck_Invoke_Nop(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 819public void ToolStripRenderer_OnRenderItemImage_Invoke_Nop(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 839public void ToolStripRenderer_OnRenderItemText_Invoke_Nop(ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, TextFormatFlags format)
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (3)
37public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip(ToolStrip toolStrip, Rectangle expectedAffectedBounds, Color expectedBackColor) 61public void ToolStripRenderEventArgs_Ctor_Graphics_ToolStrip_Rectangle_Color(ToolStrip toolStrip, Rectangle affectedBounds, Color backColor, Color expectedBackColor) 95Assert.Equal(Rectangle.Empty, e.ConnectedArea);
System\Windows\Forms\ToolStripSeparatorTests.cs (6)
1367public void ToolStripSeparator_SetBounds_Invoke_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 1396public void ToolStripSeparator_SetBounds_InvokeWithOwner_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 1458public void ToolStripSeparator_SetBounds_InvokeWithToolStripDropDownMenuOwner_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount) 1519public void ToolStripSeparator_SetBounds_InvokeWithParent_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount, int expectedParentLayoutCallCount) 1573public void ToolStripSeparator_SetBounds_InvokeWithDropDownMenuParent_GetReturnsExpected(Rectangle bounds, int expectedLocationChangedCallCount, int expectedParentLayoutCallCount) 1663public new void SetBounds(Rectangle bounds) => base.SetBounds(bounds);
System\Windows\Forms\ToolStripSplitButtonTests.cs (1)
333_toolStripSplitButton.SplitterBounds.Should().Be(Rectangle.Empty);
System\Windows\Forms\ToolStripTests.cs (9)
2304public void ToolStrip_DisplayRectangle_Get_ReturnsExpected(ToolStripLayoutStyle layoutStyle, ToolStripGripStyle gripStyle, RightToLeft rightToLeft, Rectangle expected) 6233using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 6262using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 6702Rectangle oldBounds1 = item1.Bounds; 6703Rectangle oldBounds2 = item2.Bounds; 6754Rectangle oldBounds1 = item1.Bounds; 6755Rectangle oldBounds2 = item2.Bounds; 7018Rectangle oldBounds = item.Bounds; 7067Rectangle oldBounds = item.Bounds;
System\Windows\Forms\ToolStripTests.Rendering.cs (2)
29Rectangle bounds = toolStrip.Bounds; 33Rectangle bitBltBounds = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\TrackBarRendererTests.cs (21)
38void TestDrawTrack(Action<Graphics, Rectangle> drawTrack, Rectangle bounds) 51void TestDrawTrackWithInvalidBounds(Action<Graphics, Rectangle> drawTrack, Rectangle[] invalidBounds) 53foreach (Rectangle bounds in invalidBounds) 75void TestDrawThumb(Action<Graphics, Rectangle, TrackBarThumbState> drawThumb, Rectangle bounds, TrackBarThumbState state) 81Rectangle bounds = new(0, 0, 10, 10); 106void TestDrawTicks(Action<Graphics, Rectangle, int, EdgeStyle> drawTicks, Rectangle bounds, int tickCount, EdgeStyle edgeStyle) 112Rectangle horizontalBounds = new(0, 0, 100, 10); 113Rectangle verticalBounds = new(0, 0, 10, 100); 124void TestDrawTicksWithInvalidParameters(Action<Graphics, Rectangle, int, EdgeStyle> drawTicks, Rectangle bounds, int[] invalidTickCounts, Rectangle[] invalidBounds) 132foreach (Rectangle invalidBound in invalidBounds) 139Rectangle Bounds = new(0, 0, 100, 10); 141Rectangle[] invalidBounds = 154Rectangle bounds = new(0, 0, 10, 10); 155var drawThumbActions = new Action<Graphics, Rectangle, TrackBarThumbState>[] 163foreach (Action<Graphics, Rectangle, TrackBarThumbState> drawThumb in drawThumbActions)
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (13)
103Rectangle expectedBounds = Rectangle.Empty; 124IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)firstTreeNode).GetNeighboringToolsRectangles(); 140IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)middleTreeNode).GetNeighboringToolsRectangles(); 157IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)lastTreeNode).GetNeighboringToolsRectangles(); 175IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)firstSubNode).GetNeighboringToolsRectangles(); 194IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)middleSubNode).GetNeighboringToolsRectangles(); 213IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)lastSubNode).GetNeighboringToolsRectangles(); 234IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)subSubNode).GetNeighboringToolsRectangles(); 253IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)middleNode).GetNeighboringToolsRectangles(); 274IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)middleNode).GetNeighboringToolsRectangles(); 294IList<Rectangle> neighboringRectangles = ((IKeyboardToolTip)lastSubNode).GetNeighboringToolsRectangles(); 438private Rectangle GetRectangle(TreeView treeView, TreeNode treeNode)
System\Windows\Forms\TreeNodeTests.cs (13)
18Assert.Equal(Rectangle.Empty, node.Bounds); 58Assert.Equal(Rectangle.Empty, node.Bounds); 106Assert.Equal(Rectangle.Empty, node.Bounds); 149Assert.Equal(Rectangle.Empty, node.Bounds); 197Assert.Equal(Rectangle.Empty, node.Bounds); 456Rectangle bounds = node.Bounds; 478Rectangle bounds = node.Bounds; 491yield return new object[] { default(RECT), Rectangle.Empty }; 514public void TreeNode_Bounds_GetCustomGetItemRect_ReturnsExpected(object getItemRectResult, Rectangle expected) 536Assert.Equal(Rectangle.Empty, node.Bounds); 548Assert.Equal(Rectangle.Empty, node.Bounds); 4704treeNode.RowBounds.Should().Be(Rectangle.Empty); 4708treeNode.RowBounds.Should().NotBe(Rectangle.Empty);
System\Windows\Forms\TreeViewTests.cs (1)
5668yield return new object[] { new DrawTreeNodeEventArgs(graphics, null, Rectangle.Empty, TreeNodeStates.Checked) };
System\Windows\Forms\UpDownBaseTests.cs (2)
2247using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty); 2283using PaintEventArgs eventArgs = new(graphics, Rectangle.Empty);
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (12)
132public void VisualStyleRenderer_DrawBackground_InvokeIDeviceContextRectangle_Success(Rectangle bounds) 166public void VisualStyleRenderer_DrawBackground_InvokeIDeviceContextRectangleRectangle_Success(Rectangle bounds, Rectangle clipBounds) 201public void VisualStyleRenderer_DrawEdge_Invoke_Success(Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 207Rectangle result = renderer.DrawEdge(graphics, bounds, edges, style, effects); 263public void VisualStyleRenderer_DrawImage_InvokeIDeviceContextRectangleImage_Success(Rectangle bounds) 276public void VisualStyleRenderer_DrawImage_InvokeIDeviceContextRectangleImageListInt_Success(Rectangle bounds) 348public void VisualStyleRenderer_DrawParentBackgroundInvokeIDeviceContextRectangleChildWithoutHandle_Success(Rectangle bounds) 375public void VisualStyleRenderer_DrawParentBackground_InvokeIDeviceContextRectangleChildWithHandle_Success(Rectangle bounds) 414public void VisualStyleRenderer_DrawText_InvokeIDeviceContextRectangleString_Success(Rectangle bounds, string textToDraw) 445public void VisualStyleRenderer_DrawText_InvokeIDeviceContextRectangleStringBool_Success(Rectangle bounds, string textToDraw, bool drawDisabled) 476public void VisualStyleRenderer_DrawText_InvokeIDeviceContextRectangleStringBoolTextFormatFlags_Success(Rectangle bounds, string textToDraw, bool drawDisabled, TextFormatFlags flags)
Text\FontMetrics.cs (5)
131public unsafe void Font_AdjustForVerticalAlignment(string family, float size, Rectangle bounds, uint dt, Rectangle expected) 145Rectangle result = screen.HDC.AdjustForVerticalAlignment( 153public static TheoryData<string, float, Rectangle, uint, Rectangle> AdjustData =>
TrackBarTests.cs (1)
3245Rectangle rectangle = new(rectX, rectY, rectWidth, rectHeight);
WebBrowserBaseTests.cs (2)
665public void WebBrowserBase_DrawToBitmap_Invoke_Success(Rectangle targetBounds) 679public void WebBrowserBase_DrawToBitmap_InvokeWithHandle_Success(Rectangle rectangle)
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
116new(graphics, Rectangle.Empty)
System.Windows.Forms.UI.IntegrationTests (37)
AnchorLayoutTests.cs (2)
222var bounds = button.Bounds; 242Rectangle newButtonBounds = button.Bounds;
ButtonTests.cs (7)
118var originalButtonPosition = button.DisplayRectangle; 142var originalButtonPosition = button.DisplayRectangle; 168var originalButtonPosition = button.DisplayRectangle; 198var originalButtonPosition = button.DisplayRectangle; 257Rectangle rect = control2.DisplayRectangle; 290Rectangle rect = control2.DisplayRectangle; 293Rectangle rect1 = control1.DisplayRectangle;
DataGridViewTests.cs (2)
27Rectangle cellRectangle = dataGridView.GetCellDisplayRectangle(columnIndex: 0, rowIndex: 0, cutOverflow: false); 55Rectangle cellRectangle = dataGridView.GetCellDisplayRectangle(columnIndex: 0, rowIndex: 0, cutOverflow: false);
Dpi\FormDpiTests.cs (1)
34Drawing.Rectangle initialBounds = form.Bounds;
DragDropTests.cs (11)
101var startRect = form.DisplayRectangle; 193Rectangle endRect = dragDropForm.RichTextBoxDropTarget.ClientRectangle; 196Rectangle vscreen = SystemInformation.VirtualScreen; 316var startRect = form.DisplayRectangle; 378var startRect = form.ListDragSource.DisplayRectangle; 380var endRect = form.ListDragTarget.DisplayRectangle; 526var startRect = form.DisplayRectangle; 647private Rectangle _dragBoxFromMouseDown; 728_dragBoxFromMouseDown = Rectangle.Empty; 735_dragBoxFromMouseDown = Rectangle.Empty; 745if (_dragBoxFromMouseDown != Rectangle.Empty &&
FormTests.cs (2)
64var screenWorkingArea = Screen.FromControl(form).WorkingArea; 124var screenWorkingArea = Screen.FromControl(form).WorkingArea;
Infra\ControlTestBase.cs (2)
175var rect = control.DisplayRectangle; 395internal static Point GetCenter(Rectangle cell)
Infra\ScreenRecordService.cs (2)
238var bounds = new Rectangle(0, 0, width, height); 324var cropArea = new Rectangle(firstChangedColumn, firstChangedLine, lastChangedColumn - firstChangedColumn + 1, lastChangedLine - firstChangedLine + 1);
Infra\ScreenshotService.cs (1)
75Rectangle bounds = new(Cursor.Position - (Size)cursor.HotSpot, cursor.Size);
ListBoxAccesibleObjectTests.cs (1)
54var itemBounds = listBox.GetItemRectangle(0);
ListBoxItemAccessibleObjestTests.cs (4)
20var boundsBeforeHandleCreation = itemAccessibleObject.Bounds; 21boundsBeforeHandleCreation.Should().Be(Rectangle.Empty); 28var boundsAfterHandleCreation = itemAccessibleObject.Bounds; 29boundsAfterHandleCreation.Should().NotBe(Rectangle.Empty);
MonthCalendarTests.cs (2)
140var rect = GetCalendarGridRect(calendar, (MCGRIDINFO_PART)action); 160static unsafe Rectangle GetCalendarGridRect(MonthCalendar control, MCGRIDINFO_PART part)