2 writes to Width
System.Windows.Forms (2)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
743retval.Width = (int)Math.Round(size.Width / ((float)FontMeasureString.Length)); 747retval.Width = tm.tmAveCharWidth;
92 references to Width
System.ComponentModel.TypeConverter (2)
System\Drawing\SizeFConverter.cs (2)
72floatConverter.ConvertToString(context, culture, size.Width), 82return new InstanceDescriptor(ctor, new object[] { size.Width, size.Height });
System.Drawing.Common.Tests (35)
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
59Assert.Equal(110, bmp.PhysicalDimension.Width); 186Assert.Equal(110, bmp.PhysicalDimension.Width);
mono\System.Drawing\GraphicsTests.cs (32)
1670Assert.Equal((double)near.Width, center.Width, 1); 1673Assert.Equal((double)center.Width, far.Width, 1); 1703Assert.Equal((double)near.Width, center.Width, 0); 1706Assert.Equal((double)center.Width, far.Width, 0); 1734Assert.Equal((double)near.Width, center.Width, 1); 1737Assert.Equal((double)center.Width, far.Width, 1); 1767Assert.Equal((double)near.Width, center.Width, 1); 1770Assert.Equal((double)center.Width, far.Width, 1); 1789Assert.True(size2.Width < size.Width); 1807Assert.Equal(0, size.Width); 1816Assert.Equal((double)expected.Width, size.Width, 1); 1823float space_width = size.Width - expected.Width; 1828Assert.Equal((double)expected.Width + i * space_width, size.Width, 1); 1839Assert.Equal((double)expected.Width, size.Width, 1); 1901RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1926RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1967RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 2122Assert.True(sz.Width <= 80); 2126Assert.True(sz.Width <= 80);
mono\System.Imaging\MetafileTest.cs (1)
317RectangleF rect = new(0, 0, size.Width, size.Height);
System.Drawing.Primitives (16)
System\Drawing\PointF.cs (2)
130public static PointF Add(PointF pt, SizeF sz) => new PointF(pt.X + sz.Width, pt.Y + sz.Height); 135public static PointF Subtract(PointF pt, SizeF sz) => new PointF(pt.X - sz.Width, pt.Y - sz.Height);
System\Drawing\RectangleF.cs (3)
47width = size.Width; 108Width = value.Width; 242public void Inflate(SizeF size) => Inflate(size.Width, size.Height);
System\Drawing\Size.cs (3)
157new Size(unchecked((int)Math.Ceiling(value.Width)), unchecked((int)Math.Ceiling(value.Height))); 168public static Size Truncate(SizeF value) => new Size(unchecked((int)value.Width), unchecked((int)value.Height)); 174new Size(unchecked((int)Math.Round(value.Width)), unchecked((int)Math.Round(value.Height)));
System\Drawing\SizeF.cs (8)
117public static bool operator ==(SizeF sz1, SizeF sz2) => sz1.Width == sz2.Width && sz1.Height == sz2.Height; 127public static explicit operator PointF(SizeF size) => new PointF(size.Width, size.Height); 156public static SizeF Add(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width + sz2.Width, sz1.Height + sz2.Height); 161public static SizeF Subtract(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width - sz2.Width, sz1.Height - sz2.Height); 171public override readonly int GetHashCode() => HashCode.Combine(Width, Height);
System.Private.Windows.Core (1)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
249value.Width,
System.Windows.Forms (29)
System\Windows\Forms\Control.cs (4)
5278float dx = factor.Width; 9719float dx = factor.Width; 9758factor.Width, 9767factor.Width,
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
1939if (factor.Width != 1F && factor.Height != 1F)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
634if (factor.Width != 1F && factor.Height != 1F)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
2071if (factor.Width != 1F && factor.Height != 1F) 2282width = (int)(Math.Ceiling(graphics.MeasureString(GetItemText(item), Font).Width));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1202_cacheItems.LastLabelWidth = (int)textSize.Width; 1225_cacheItems.LastValueTextWidth = (int)graphics.MeasureString(text, font).Width;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
302int detailsWidth = (int)Math.Ceiling(sizef.Width);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1502MinimumSize = ScaleSize(minSize, factor.Width, factor.Height); 1507MaximumSize = ScaleSize(maxSize, factor.Width, factor.Height);
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
209int titleWidth = (int)graphics.MeasureString(title, Font).Width;
System\Windows\Forms\Form.cs (5)
449return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 2984Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 3736float stringWidth = graphics.MeasureString(magicString, font).Width; 4551desiredSize.Width = (int)(Size.Width * autoScaleFactor.Width); 4553Debug.WriteLine($"AutoScaleFactor computed for new DPI = {autoScaleFactor.Width} - {autoScaleFactor.Height}");
System\Windows\Forms\Layout\Containers\ContainerControl.cs (5)
115if (value.Width < 0 || value.Height < 0) 152: new(currentAutoScaleDimensions.Width / savedAutoScaleDimensions.Width, currentAutoScaleDimensions.Height / savedAutoScaleDimensions.Height); 824&& (AutoScaleFactor.Width != 1.0F || AutoScaleFactor.Height != 1.0F)) 978if (autoScaleFactor.Width != 1.0F || autoScaleFactor.Height != 1.0F)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1761scale = factor.Width;
System\Windows\Forms\Layout\DefaultLayout.cs (1)
981double widthFactor = factor.Width;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (2)
529cs.Width = (float)Math.Round(lastColumnHeight * factor.Width); 533cs.Width = (float)Math.Round(cs.Width * factor.Width);
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
726ScaleDockPadding(factor.Width, factor.Height);
System.Windows.Forms.Design (9)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (4)
217w = Math.Max(w, (int)Math.Ceiling(sizeW.Width)); 227return (int)Math.Ceiling(size.Width) + w + pic + SystemInformation.BorderSize.Width * 4; 569w = Math.Max(w, (int)Math.Ceiling(sizeW.Width)); 621int width = offset + (int)g.MeasureString(itemText, Font).Width;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
366_watermarkSize = new Size((int)Math.Ceiling(size.Width), (int)Math.Ceiling(size.Height));
System\Windows\Forms\Design\FormDocumentDesigner.cs (3)
66return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 269Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 277float percX = newVar.Width / ((float)baseVar.Width);
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
192int watermarkX = rectangle.Width / 2 - (int)g.MeasureString(name, drawFont).Width / 2;