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