SizeF Structure

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

[<Sealed>]
[<SerializableAttribute>]
[<ComVisibleAttribute(true)>]
[<TypeConverterAttribute(typeof(SizeFConverter))>]
type SizeF = struct end

NameDescription
System_CAPS_pubmethodSizeF(PointF)

Initializes a new instance of the SizeF structure from the specified PointF structure.

System_CAPS_pubmethodSizeF(Single, Single)

Initializes a new instance of the SizeF structure from the specified dimensions.

System_CAPS_pubmethodSizeF(SizeF)

Initializes a new instance of the SizeF structure from the specified existing SizeF structure.

NameDescription
System_CAPS_pubpropertyHeight

Gets or sets the vertical component of this SizeF structure.

System_CAPS_pubpropertyIsEmpty

Gets a value that indicates whether this SizeF structure has zero width and height.

System_CAPS_pubpropertyWidth

Gets or sets the horizontal component of this SizeF structure.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAdd(SizeF, SizeF)

Adds the width and height of one SizeF structure to the width and height of another SizeF structure.

System_CAPS_pubmethodEquals(Object)

Tests to see whether the specified object is a SizeF structure with the same dimensions as this SizeF structure.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns a hash code for this Size structure.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticSubtract(SizeF, SizeF)

Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.

System_CAPS_pubmethodToPointF()

Converts a SizeF structure to a PointF structure.

System_CAPS_pubmethodToSize()

Converts a SizeF structure to a Size structure.

System_CAPS_pubmethodToString()

Creates a human-readable string that represents this SizeF structure.(Overrides ValueType.ToString().)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticEmpty

Gets a SizeF structure that has a Height and Width value of 0.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(SizeF, SizeF)

Adds the width and height of one SizeF structure to the width and height of another SizeF structure.

System_CAPS_puboperatorSystem_CAPS_staticEquality(SizeF, SizeF)

Tests whether two SizeF structures are equal.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SizeF to PointF)

Converts the specified SizeF structure to a PointF structure.

System_CAPS_puboperatorSystem_CAPS_staticInequality(SizeF, SizeF)

Tests whether two SizeF structures are different.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(SizeF, SizeF)

Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure.

The unit for a SizeF structure depends on the PageUnit and PageScale settings for the Graphics object that is used to draw.

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: