132 instantiations of SizeF
BinaryFormatTests (4)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (4)
199new SizeF(7F, 8F), 200new SizeF(float.MaxValue, float.MinValue), 201new SizeF(-float.MaxValue, float.PositiveInfinity), 202new SizeF(0, 0),
DesignSurface (1)
MainForm.Designer.cs (1)
292this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
NativeHost.ManagedControl (1)
ManagedControl.Designer.cs (1)
48this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
PresentationUI (11)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (1)
726this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (1)
160this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (1)
216AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (1)
205AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (1)
209this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (1)
120this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RMPermissions.Designer.cs (1)
182this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
369this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (1)
202AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\SigningDialog.Designer.cs (1)
254AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MS\Internal\Documents\SigningProgress.Designer.cs (1)
55AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
System.ComponentModel.TypeConverter (2)
System\Drawing\SizeFConverter.cs (2)
50return new SizeF(width, height); 98return new SizeF((float)width, (float)height);
System.Drawing.Common (8)
System\Drawing\Graphics.cs (7)
1823return new SizeF(boundingBox.Width, boundingBox.Height); 1885public SizeF MeasureString(string? text, Font font) => MeasureString(text, font, new SizeF(0, 0)); 1889public SizeF MeasureString(ReadOnlySpan<char> text, Font font) => MeasureString(text, font, new SizeF(0, 0)); 1894public SizeF MeasureString(string? text, Font font, int width) => MeasureString(text, font, new SizeF(width, 999999)); 1899MeasureString(text, font, new SizeF(width, 999999)); 1907MeasureString(text, font, new SizeF(width, 999999), format); 1912MeasureString(text, font, new SizeF(width, 999999), format);
System\Drawing\Image.cs (1)
414return new SizeF(width, height);
System.Drawing.Common.Tests (9)
mono\System.Drawing\GraphicsTests.cs (2)
1785? g.MeasureString(s.AsSpan(), _font, new SizeF(80, size.Height), null, out int chars, out int lines) 1786: g.MeasureString(s, _font, new SizeF(80, size.Height), null, out chars, out lines);
System\Drawing\Drawing2D\GraphicsPathTests.cs (1)
2381path.AddRoundedRectangle(new RectangleF(10, 10, 20, 20), new(5, 5));
System\Drawing\GraphicsTests.cs (2)
2983graphics.DrawRoundedRectangle(Pens.Red, new RectangleF(0, 0, 10, 10), new(2, 2)); 3001graphics.FillRoundedRectangle(Brushes.Green, new RectangleF(0, 0, 10, 10), new(2, 2));
System\Drawing\IconConverterTests.cs (2)
116Assert.Throws<NotSupportedException>(() => _icoConv.ConvertFrom(null, CultureInfo.InvariantCulture, new SizeF(10, 10))); 128Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, new SizeF(10, 10)));
System\Drawing\ImageConverterTests.cs (2)
143Assert.Throws<NotSupportedException>(() => _imgConv.ConvertFrom(null, CultureInfo.InvariantCulture, new SizeF(10, 10))); 150Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, new SizeF(10, 10)));
System.Drawing.Primitives (9)
System\Drawing\RectangleF.cs (1)
105readonly get => new SizeF(Width, Height);
System\Drawing\Size.cs (3)
47public static implicit operator SizeF(Size p) => new SizeF(p.Width, p.Height); 106=> new SizeF(left.width / right, left.height / right); 210new SizeF(size.width * multiplier, size.height * multiplier);
System\Drawing\SizeF.cs (5)
77public static explicit operator SizeF(Vector2 vector) => new SizeF(vector); 112=> new SizeF(left.width / right, left.height / right); 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); 189new SizeF(size.width * multiplier, size.height * multiplier);
System.Private.Windows.Core (1)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
205value = new SizeF(classInfo.GetSingle("width"), classInfo.GetSingle("height"));
System.Private.Windows.Core.Tests (2)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
61new SizeF(float.MaxValue, float.MinValue), 1007public SizeF SizeF = new(1, 2);
System.Windows.Forms (14)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (1)
671screen.Graphics.MeasureString(Text, Font, new SizeF(proposedSize.Width, proposedSize.Height),
System\Windows\Forms\Controls\Labels\Label.cs (2)
1083new SizeF(0, proposedConstraints.Height) : 1084new SizeF(proposedConstraints.Width, proposedConstraints.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (2)
16=> MeasureTextSimple(owner, g, text, font, new SizeF(0, 0)); 19=> MeasureText(owner, g, text, font, new SizeF(width, 999999));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
265AutoScaleDimensions = new SizeF(7F, 15F);
System\Windows\Forms\Form.cs (1)
3743return new SizeF(width, height);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (6)
83internal SizeF _currentAutoScaleFactor = new(1F, 1F); 150? new(1.0F, 1.0F) 151: new(currentAutoScaleDimensions.Width / savedAutoScaleDimensions.Width, currentAutoScaleDimensions.Height / savedAutoScaleDimensions.Height); 332currentAutoScaleDimensions = new SizeF(_deviceDpi, _deviceDpi); 337currentAutoScaleDimensions = new SizeF(ScaleHelper.InitialSystemDpi, ScaleHelper.InitialSystemDpi); 671return parentControl is ContainerControl container ? container._currentAutoScaleFactor : new SizeF(1F, 1F);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (1)
488ScaleAbsoluteStyles(new SizeF(dx, dy));
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\BorderSidesEditor.BorderSidesEditorUI.cs (1)
162AutoScaleDimensions = new SizeF(6F, 13F);
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
238AutoScaleDimensions = new Drawing.SizeF(6F, 13F);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1004int textWidth = Size.Ceiling(e.Graphics.MeasureString(columnName, e.Font!, new SizeF(bounds.Width, bounds.Height))).Width;
System\Windows\Forms\Design\FormatStringDialog.cs (1)
203AutoScaleDimensions = new Drawing.SizeF(6, 13);
System.Windows.Forms.Tests (13)
System\Windows\Forms\ContainerControlTests.cs (3)
30Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor); 242yield return new object[] { AutoScaleMode.Dpi, new SizeF(96, 96) }; 252AutoScaleDimensions = new SizeF(1, 2),
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
36Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
System\Windows\Forms\DomainUpDownTests.cs (1)
39_sub.AutoScaleFactor.Should().Be(new SizeF(1, 1));
System\Windows\Forms\FormTests.cs (1)
34Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
System\Windows\Forms\PropertyGridTests.cs (1)
35Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
System\Windows\Forms\ScrollableControlTests.cs (2)
2198control.Scale(new SizeF(10, 20)); 2211control.Scale(new SizeF(10, 20));
System\Windows\Forms\ScrollBarTests.cs (1)
2599SizeF factor = new(((float)deviceDpiNew) / deviceDpiOld, ((float)deviceDpiNew) / deviceDpiOld);
System\Windows\Forms\ToolStripPanelTests.cs (1)
27Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
System\Windows\Forms\UpDownBaseTests.cs (1)
25Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
System\Windows\Forms\UserControlTests.cs (1)
31Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor);
TestPassApp (13)
CommonControl1.Designer.cs (1)
679this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
CommonControl2.Designer.cs (1)
258this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
ContainerControls.Designer.cs (1)
800this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
ContainerControls2.Designer.cs (1)
417this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
DataBindingExample.Designer.cs (1)
271this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
DataControls.Designer.cs (1)
349this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
DialogControls.Designer.cs (1)
82this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
Main.Designer.cs (1)
166this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
Menu_Toolbars_controls.Designer.cs (1)
592AutoScaleDimensions = new SizeF(8F, 20F);
MenuForm.Designer.cs (1)
59this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
PrintingControls.Designer.cs (1)
159this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
RemainingControls.Designer.cs (1)
116this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
ToolStripContainer.Designer.cs (1)
591this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
TrimTest (1)
Form1.Designer.cs (1)
98AutoScaleDimensions = new SizeF(7F, 15F);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
58AutoScaleDimensions = new SizeF(7F, 15F);
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
182Child?.Scale(new System.Drawing.SizeF((float)(newScale.X / _currentScale.X), (float)(newScale.Y / _currentScale.Y)));
WinFormsControlsTest (37)
AnchorLayoutTests.Designer.cs (1)
138this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
Buttons.Designer.cs (1)
44this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
Calendar.Designer.cs (1)
232this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
ChartControl.Designer.cs (1)
413this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
ComboBoxes.Designer.cs (1)
266this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
ComboBoxesWithScrollBars.Designer.cs (1)
347this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
DataGridViewInVirtualModeTest.Designer.cs (1)
83this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
DataGridViewTest.Designer.cs (1)
207this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
DateTimePicker.Designer.cs (1)
95this.AutoScaleDimensions = new SizeF(7F, 15F);
DesignTimeAligned.Designer.cs (1)
94this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
Dialogs.Designer.cs (1)
148this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
DockLayoutTests.Designer.cs (1)
95this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
DragDrop.Designer.cs (1)
197AutoScaleDimensions = new SizeF(7F, 15F);
ErrorProviderTest.Designer.cs (1)
128this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
FormBorderStyles.Designer.cs (1)
55this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
ListBoxes.Designer.cs (1)
226this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
MainForm.Designer.cs (1)
48this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
MdiChild.Designer.cs (1)
140this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MdiParent.Designer.cs (1)
38this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MediaPlayer.Designer.cs (1)
53this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MenuStripAndCheckedListBox.Designer.cs (1)
283this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
MessageBoxes.Designer.cs (1)
51this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
MultipleControls.Designer.cs (1)
299this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
Password.Designer.cs (1)
237AutoScaleDimensions = new SizeF(8F, 20F);
PictureBoxes.Designer.cs (1)
81this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
PropertyGrid.Designer.cs (1)
49this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
RichTextBoxes.Designer.cs (1)
62this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
ScalingBeforeChanges.cs (1)
102checkBox1.Scale(new SizeF(factorX, factorY));
ScalingBeforeChanges.Designer.cs (1)
49this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
ScrollableControls.Designer.cs (1)
436AutoScaleDimensions = new SizeF(7F, 15F);
ScrollBars.Designer.cs (1)
135this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
Splitter.Designer.cs (1)
60this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
TextBoxes.Designer.cs (1)
151this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
ToolStripSeparatorPreferredSize.cs (1)
85AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
ToolStripTests.Designer.cs (1)
435this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
ToolTipTests.Designer.cs (1)
159this.AutoScaleDimensions = new System.Drawing.SizeF(17F, 41F);
TrackBars.Designer.cs (1)
247this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
327 references to SizeF
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
55typeof(SizeF),
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
93Dim labelSizeNeeded As SizeF = labelGraphics.MeasureString(prompt, Label.Font, Label.Width)
netstandard (1)
netstandard.cs (1)
756[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SizeF))]
System.ComponentModel.TypeConverter (3)
System\Drawing\SizeFConverter.cs (3)
60if (value is SizeF size) 75ConstructorInfo? ctor = typeof(SizeF).GetConstructor([typeof(float), typeof(float)]); 108PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(SizeF), attributes);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
180typeof(SizeF),
System.Drawing (1)
System.Drawing.cs (1)
145[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SizeF))]
System.Drawing.Common (38)
Special\Forwards.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SizeF))]
System\Drawing\Drawing2D\GraphicsPath.cs (2)
660/// <inheritdoc cref="AddRoundedRectangle(RectangleF, SizeF)"/> 669public void AddRoundedRectangle(RectangleF rect, SizeF radius)
System\Drawing\Graphics.cs (34)
721/// <inheritdoc cref="DrawRoundedRectangle(Pen, RectangleF, SizeF)"/> 731public void DrawRoundedRectangle(Pen pen, RectangleF rect, SizeF radius) 1195/// <inheritdoc cref="FillRoundedRectangle(Brush, RectangleF, SizeF)"/> 1205public void FillRoundedRectangle(Brush brush, RectangleF rect, SizeF radius) 1763/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/> 1764public SizeF MeasureString( 1767SizeF layoutArea, 1774/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?, out int, out int)"/> 1775public SizeF MeasureString( 1778SizeF layoutArea, 1785public SizeF MeasureStringInternal( 1797return SizeF.Empty; 1827/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/> 1828public SizeF MeasureString(string? text, Font font, PointF origin, StringFormat? stringFormat) 1833public SizeF MeasureString(ReadOnlySpan<char> text, Font font, PointF origin, StringFormat? stringFormat) 1837/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/> 1838public SizeF MeasureString(string? text, Font font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null); 1841/// <inheritdoc cref="MeasureString(string?, Font, SizeF)"/> 1842public SizeF MeasureString(ReadOnlySpan<char> text, Font font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null); 1849/// <see cref="SizeF"/> structure that specifies the maximum layout area for the text. 1852public SizeF MeasureString(string? text, Font font, SizeF layoutArea, StringFormat? stringFormat) => 1856/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/> 1857public SizeF MeasureString(ReadOnlySpan<char> text, Font font, SizeF layoutArea, StringFormat? stringFormat) => 1867/// This method returns a <see cref="SizeF"/> structure that represents the size, in the units specified by the 1885public SizeF MeasureString(string? text, Font font) => MeasureString(text, font, new SizeF(0, 0)); 1889public SizeF MeasureString(ReadOnlySpan<char> text, Font font) => MeasureString(text, font, new SizeF(0, 0)); 1894public SizeF MeasureString(string? text, Font font, int width) => MeasureString(text, font, new SizeF(width, 999999)); 1898public SizeF MeasureString(ReadOnlySpan<char> text, Font font, int width) => 1906public SizeF MeasureString(string? text, Font font, int width, StringFormat? format) => 1911public SizeF MeasureString(ReadOnlySpan<char> text, Font font, int width, StringFormat? format) =>
System\Drawing\Image.cs (1)
405public SizeF PhysicalDimension
System.Drawing.Common.Tests (38)
mono\System.Drawing\GraphicsTests.cs (29)
1575SizeF size = g.MeasureString(null, _font); 1605SizeF size = g.MeasureString("a", _font, SizeF.Empty); 1608size = g.MeasureString("a".AsSpan(), _font, SizeF.Empty); 1611size = g.MeasureString(string.Empty, _font, SizeF.Empty); 1614size = g.MeasureString(string.Empty.AsSpan(), _font, SizeF.Empty); 1622SizeF size0 = useSpan ? g.MeasureString(s.AsSpan(), _font, 0) : g.MeasureString(s, _font, 0); 1623SizeF sizeN = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MinValue) : g.MeasureString(s, _font, int.MinValue); 1624SizeF sizeP = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MaxValue) : g.MeasureString(s, _font, int.MaxValue); 1656SizeF near = useSpan 1661SizeF center = useSpan 1666SizeF far = useSpan 1689SizeF near = useSpan 1694SizeF center = useSpan 1699SizeF far = useSpan 1720SizeF near = useSpan 1725SizeF center = useSpan 1730SizeF far = useSpan 1753SizeF near = useSpan 1758SizeF center = useSpan 1763SizeF far = useSpan 1782SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font); 1784SizeF size2 = useSpan 1805SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font); 1810SizeF expected = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font); 1900SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format); 1923SizeF size = useSpan 1966SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format); 2121SizeF sz = g.MeasureString(text, _font, 80, format);
mono\System.Imaging\MetafileTest.cs (1)
308SizeF size = g.MeasureString(text, test_font);
System\Drawing\IconConverterTests.cs (4)
45Assert.False(_icoConv.CanConvertFrom(null, typeof(SizeF)), "SizeF"); 58Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(SizeF)), "TD SizeF"); 81Assert.False(_icoConv.CanConvertTo(null, typeof(SizeF)), "SizeF"); 99Assert.False(_icoConvFrmTD.CanConvertTo(null, typeof(SizeF)), "TD SizeF");
System\Drawing\ImageConverterTests.cs (4)
71Assert.False(_imgConv.CanConvertFrom(null, typeof(SizeF)), "SizeF"); 84Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(SizeF)), "TD SizeF"); 103Assert.False(_imgConv.CanConvertTo(null, typeof(SizeF)), "SizeF"); 117Assert.False(_imgConvFrmTD.CanConvertTo(null, typeof(SizeF)), "TD SizeF");
System.Drawing.Primitives (99)
System\Drawing\PointF.cs (8)
94/// Translates a <see cref='System.Drawing.PointF'/> by a given <see cref='System.Drawing.SizeF'/> . 96public static PointF operator +(PointF pt, SizeF sz) => Add(pt, sz); 99/// Translates a <see cref='System.Drawing.PointF'/> by the negative of a given <see cref='System.Drawing.SizeF'/> . 101public static PointF operator -(PointF pt, SizeF sz) => Subtract(pt, sz); 128/// Translates a <see cref='System.Drawing.PointF'/> by a given <see cref='System.Drawing.SizeF'/> . 130public static PointF Add(PointF pt, SizeF sz) => new PointF(pt.X + sz.Width, pt.Y + sz.Height); 133/// Translates a <see cref='System.Drawing.PointF'/> by the negative of a given <see cref='System.Drawing.SizeF'/> . 135public static PointF Subtract(PointF pt, SizeF sz) => new PointF(pt.X - sz.Width, pt.Y - sz.Height);
System\Drawing\RectangleF.cs (3)
43public RectangleF(PointF location, SizeF size) 103public SizeF Size 242public void Inflate(SizeF size) => Inflate(size.Width, size.Height);
System\Drawing\Size.cs (16)
45/// Converts the specified <see cref='System.Drawing.Size'/> to a <see cref='System.Drawing.SizeF'/>. 47public static implicit operator SizeF(Size p) => new SizeF(p.Width, p.Height); 84/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 88/// <returns>Product of type <see cref="SizeF"/>.</returns> 89public static SizeF operator *(float left, Size right) => Multiply(right, left); 92/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 96/// <returns>Product of type <see cref="SizeF"/>.</returns> 97public static SizeF operator *(Size left, float right) => Multiply(left, right); 100/// Divides <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 104/// <returns>Result of type <see cref="SizeF"/>.</returns> 105public static SizeF operator /(Size left, float right) 156public static Size Ceiling(SizeF value) => 168public static Size Truncate(SizeF value) => new Size(unchecked((int)value.Width), unchecked((int)value.Height)); 173public static Size Round(SizeF value) => 204/// Multiplies <see cref="Size"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 209private static SizeF Multiply(Size size, float multiplier) =>
System\Drawing\SizeF.cs (72)
16public struct SizeF : IEquatable<SizeF> 19/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class. 21public static readonly SizeF Empty; 26/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified 27/// existing <see cref='System.Drawing.SizeF'/>. 29public SizeF(SizeF size) 36/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified 46/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> struct from the specified 56/// Creates a new <see cref="System.Numerics.Vector2"/> from this <see cref="System.Drawing.SizeF"/>. 61/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified dimensions. 70/// Converts the specified <see cref="System.Drawing.SizeF"/> to a <see cref="System.Numerics.Vector2"/>. 72public static explicit operator Vector2(SizeF size) => size.ToVector2(); 75/// Converts the specified <see cref="System.Numerics.Vector2"/> to a <see cref="System.Drawing.SizeF"/>. 77public static explicit operator SizeF(Vector2 vector) => new SizeF(vector); 80/// Performs vector addition of two <see cref='System.Drawing.SizeF'/> objects. 82public static SizeF operator +(SizeF sz1, SizeF sz2) => Add(sz1, sz2); 85/// Contracts a <see cref='System.Drawing.SizeF'/> by another <see cref='System.Drawing.SizeF'/> 87public static SizeF operator -(SizeF sz1, SizeF sz2) => Subtract(sz1, sz2); 90/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 93/// <param name="right">Multiplicand of type <see cref="SizeF"/>.</param> 94/// <returns>Product of type <see cref="SizeF"/>.</returns> 95public static SizeF operator *(float left, SizeF right) => Multiply(right, left); 98/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 100/// <param name="left">Multiplicand of type <see cref="SizeF"/>.</param> 102/// <returns>Product of type <see cref="SizeF"/>.</returns> 103public static SizeF operator *(SizeF left, float right) => Multiply(left, right); 106/// Divides <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 108/// <param name="left">Dividend of type <see cref="SizeF"/>.</param> 110/// <returns>Result of type <see cref="SizeF"/>.</returns> 111public static SizeF operator /(SizeF left, float right) 115/// Tests whether two <see cref='System.Drawing.SizeF'/> objects are identical. 117public static bool operator ==(SizeF sz1, SizeF sz2) => sz1.Width == sz2.Width && sz1.Height == sz2.Height; 120/// Tests whether two <see cref='System.Drawing.SizeF'/> objects are different. 122public static bool operator !=(SizeF sz1, SizeF sz2) => !(sz1 == sz2); 125/// Converts the specified <see cref='System.Drawing.SizeF'/> to a <see cref='System.Drawing.PointF'/>. 127public static explicit operator PointF(SizeF size) => new PointF(size.Width, size.Height); 130/// Tests whether this <see cref='System.Drawing.SizeF'/> has zero width and height. 136/// Represents the horizontal component of this <see cref='System.Drawing.SizeF'/>. 145/// Represents the vertical component of this <see cref='System.Drawing.SizeF'/>. 154/// Performs vector addition of two <see cref='System.Drawing.SizeF'/> objects. 156public static SizeF Add(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width + sz2.Width, sz1.Height + sz2.Height); 159/// Contracts a <see cref='System.Drawing.SizeF'/> by another <see cref='System.Drawing.SizeF'/>. 161public static SizeF Subtract(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width - sz2.Width, sz1.Height - sz2.Height); 164/// Tests to see whether the specified object is a <see cref='System.Drawing.SizeF'/> with the same dimensions 165/// as this <see cref='System.Drawing.SizeF'/>. 167public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is SizeF && Equals((SizeF)obj); 169public readonly bool Equals(SizeF other) => this == other; 178/// Creates a human-readable string that represents this <see cref='System.Drawing.SizeF'/>. 183/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>. 185/// <param name="size">Multiplicand of type <see cref="SizeF"/>.</param> 188private static SizeF Multiply(SizeF size, float multiplier) =>
System.Private.Windows.Core (8)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
235/// Writes a <see cref="SizeF"/> in binary format. 237public static void WriteSizeF(Stream stream, SizeF value) 242new ClassInfo(1, typeof(SizeF).FullName!, s_sizeMemberNames), 738case SizeF sizeF:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
89{ Types.ToTypeName($"{Types.SizeFType}"), typeof(SizeF) }, 156|| type == typeof(SizeF)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
187/// Tries to get this object as a <see cref="SizeF"/>. 198|| !classInfo.TypeNameMatches(typeof(SizeF))
System.Private.Windows.Core.Tests (1)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (1)
1007public SizeF SizeF = new(1, 2);
System.Windows.Forms (78)
System\Windows\Forms\ActiveX\AxHost.cs (1)
1155protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => bounds;
System\Windows\Forms\Control.cs (9)
5274protected virtual Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 9517public void Scale(SizeF factor) 9557internal virtual void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9593internal void ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 9642internal void ScaleControl(SizeF includedFactor, SizeF excludedFactor) 9692protected virtual void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
1937protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
632protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Controls\Labels\Label.cs (1)
1082SizeF bounds = (proposedConstraints.Width == 1) ?
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
1060focusRectangle = new RectangleF(regionRectangles[0].Location, SizeF.Empty);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
1459protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 2069protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (6)
15public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font) 18public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, int width) 21public static SizeF MeasureTextSimple(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size) 31public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1194SizeF textSize = PropertyGrid.MeasureTextHelper.MeasureText(OwnerGrid, graphics, text, font);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
301SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(_ownerGrid, g, _detailsButton.Text, _detailsButton.Font);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
90SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(OwnerPropertyGrid, g, _titleLabel.Text, Font, width);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1071SizeF sizeF = PropertyGrid.MeasureTextHelper.MeasureText(OwnerGrid, g, gridEntry.PropertyLabel, Font);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
614SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1491protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Form.cs (7)
447SizeF real = GetAutoScaleSize(Font); 2980SizeF newVarF = GetAutoScaleSize(Font); 3722public static SizeF GetAutoScaleSize(Font font) 4545SizeF currentAutoScaleDimensions = GetCurrentAutoScaleDimensions(fontwrapper.Handle); 4546SizeF autoScaleFactor = GetCurrentAutoScaleFactor(currentAutoScaleDimensions, AutoScaleDimensions); 5125protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 5141protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (34)
35private SizeF _autoScaleDimensions = SizeF.Empty; 37private SizeF _currentAutoScaleDimensions = SizeF.Empty; 83internal SizeF _currentAutoScaleFactor = new(1F, 1F); 109public SizeF AutoScaleDimensions 133protected SizeF AutoScaleFactor 137SizeF current = CurrentAutoScaleDimensions; 138SizeF saved = AutoScaleDimensions; 148internal static SizeF GetCurrentAutoScaleFactor(SizeF currentAutoScaleDimensions, SizeF savedAutoScaleDimensions) 182_autoScaleDimensions = SizeF.Empty; 185_currentAutoScaleDimensions = SizeF.Empty; 306public SizeF CurrentAutoScaleDimensions 319internal SizeF GetCurrentAutoScaleDimensions(HFONT fontHandle) 321SizeF currentAutoScaleDimensions; 658private SizeF GetParentAutoScaleFactor() 700private unsafe SizeF GetFontAutoScaleDimensions(HFONT fontHandle) 702SizeF retval = SizeF.Empty; 822child.Scale(AutoScaleFactor, SizeF.Empty, this); 858_currentAutoScaleDimensions = SizeF.Empty; 962SizeF autoScaleFactor = AutoScaleFactor; 978SizeF included = includedBounds ? autoScaleFactor : SizeF.Empty; 979SizeF excluded = excludedBounds ? autoScaleFactor : SizeF.Empty; 1064internal override void Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl, bool causedByFontChanged = false) 1077SizeF ourExcludedFactor = excludedFactor; 1078SizeF childIncludedFactor = includedFactor; 1100SizeF ourExternalContainerFactor = ourExcludedFactor; 1104ourExternalContainerFactor = SizeF.Empty;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1751protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Layout\DefaultLayout.cs (1)
972public static void ScaleAnchorInfo(IArrangedElement element, SizeF factor)
System\Windows\Forms\MDI\MDIClient.cs (2)
209/// <see cref="ScaleControl(SizeF,BoundsSpecified)" /> to enforce a minimum and maximum size. 213protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (2)
494protected override void ScaleControl(SizeF factor, BoundsSpecified specified) 500private void ScaleAbsoluteStyles(SizeF factor)
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
718protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
137protected override void ScaleControl(SizeF factor, BoundsSpecified specified) 484protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified)
System.Windows.Forms.Design (10)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
212SizeF sizeW = g.MeasureString(c.ToString(CultureInfo.CurrentCulture), _listBox.Font); 220SizeF size = g.MeasureString(GetDisplayText(item), _listBox.Font); 564SizeF sizeW = g.MeasureString(maxC.ToString(CultureInfo.CurrentCulture), _listBox.Font);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
358SizeF size;
System\Windows\Forms\Design\DocumentDesigner.cs (2)
64private SizeF AutoScaleDimensions 75return SizeF.Empty;
System\Windows\Forms\Design\FormDocumentDesigner.cs (3)
65SizeF real = Form.GetAutoScaleSize(((Form)Component).Font); 262private static void ApplyAutoScaling(SizeF baseVar, Form form) 268SizeF newVarF = Form.GetAutoScaleSize(form.Font);
System\Windows\Forms\Design\ImageListImage.cs (1)
48public SizeF PhysicalDimension => Image.Size;
System.Windows.Forms.Tests (47)
System\Windows\Forms\ComboBoxTests.cs (1)
2936public new void ScaleControl(SizeF factor, BoundsSpecified specified) => base.ScaleControl(factor, specified);
System\Windows\Forms\ContainerControlTests.cs (6)
29Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 58Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 241yield return new object[] { AutoScaleMode.None, SizeF.Empty }; 243yield return new object[] { AutoScaleMode.Inherit, SizeF.Empty }; 248public void ContainerControl_AutoScaleMode_SetWithCustomOldValue_ResetsAutoScaleDimensions(AutoScaleMode value, SizeF expectedAutoScaleDimensions) 1413public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\ControlTests.cs (1)
1216public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified);
System\Windows\Forms\ControlTests.Methods.cs (11)
2431public void Control_GetScaledBounds_Invoke_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2477public void Control_GetScaledBounds_InvokeWithStyles_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2490public void Control_GetScaledBounds_InvokeWithSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2537public void Control_GetScaledBounds_InvokeWithInvalidDesignModeSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected, object designerHost) 2604public void Control_GetScaledBounds_InvokeWithValidDesignModeSite_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2643public void Control_GetScaledBounds_InvokeTopLevel_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2693public void Control_GetScaledBounds_InvokeFixedWidth_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2743public void Control_GetScaledBounds_InvokeFixedHeight_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2793public void Control_GetScaledBounds_InvokeFixedWidthAndHeight_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2809public void Control_GetScaledBounds_InvokeFixedWidthAndHeightWithStyles_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 10143public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
35Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 67Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 382public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\DomainUpDownTests.cs (3)
38_sub.AutoScaleDimensions.Should().Be(SizeF.Empty); 78_sub.CurrentAutoScaleDimensions.Should().Be(SizeF.Empty); 1466public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\FormTests.cs (3)
33Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 66Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 2692public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\ListBoxTests.cs (1)
6510public new void ScaleControl(SizeF factor, BoundsSpecified specified) => base.ScaleControl(factor, specified);
System\Windows\Forms\PropertyGridTests.cs (3)
34Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 78Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 4234public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\ScrollBarTests.cs (5)
1803public void ScrollBar_GetScaledBounds_Invoke_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 1851public void ScrollBar_GetScaledBounds_InvokeVertical_ReturnsExpected(Rectangle bounds, SizeF factor, BoundsSpecified specified, Rectangle expected) 2599SizeF factor = new(((float)deviceDpiNew) / deviceDpiOld, ((float)deviceDpiNew) / deviceDpiOld); 3157public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified); 3216public new Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => base.GetScaledBounds(bounds, factor, specified);
System\Windows\Forms\TableLayoutPanelTests.cs (1)
2257public new void ScaleControl(SizeF factor, BoundsSpecified specified) => base.ScaleControl(factor, specified);
System\Windows\Forms\ToolStripPanelTests.cs (3)
26Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 54Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 359public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\UpDownBaseTests.cs (3)
24Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 65Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 3099public new SizeF AutoScaleFactor => base.AutoScaleFactor;
System\Windows\Forms\UserControlTests.cs (3)
30Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); 58Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); 1797public new SizeF AutoScaleFactor => base.AutoScaleFactor;