Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.
Assembly: System.Drawing (in System.Drawing.dll)
Thetype exposes the following members.
|SizeF(PointF)||Initializes a new instance of the structure from the specified PointF structure.|
|SizeF(SizeF)||Initializes a new instance of the structure from the specified existing structure.|
|SizeF(Single, Single)||Initializes a new instance of the structure from the specified dimensions.|
|Add||Adds the width and height of one structure to the width and height of another structure.|
|Equals||Tests to see whether the specified object is a structure with the same dimensions as this structure. (Overrides ValueType.Equals(Object).)|
|GetHashCode||Returns a hash code for this Size structure. (Overrides ValueType.GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Subtract||Subtracts the width and height of one structure from the width and height of another structure.|
|ToPointF||Converts a structure to a PointF structure.|
|ToSize||Converts a structure to a Size structure.|
|ToString||Creates a human-readable string that represents this structure. (Overrides ValueType.ToString().)|
|Addition||Adds the width and height of one structure to the width and height of another structure.|
|Equality||Tests whether two structures are equal.|
|Explicit(SizeF to PointF)||Converts the specified structure to a PointF structure.|
|Inequality||Tests whether two structures are different.|
|Subtraction||Subtracts the width and height of one structure from the width and height of another structure.|
The following code example adds a shadow to a ListBox by using the following members:
This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the AddShadow method when handling the form's Paint event. Verify that the form contains a ListBox named listBox1.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.