Size Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a size with double-precision floating-point width and height.
public value class Size
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.SizeTypeConverter))]
public struct Size
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.SizeTypeConverter))>]
type Size = struct
Public Structure Size
- Inheritance
-
Size
- Attributes
Constructors
Size(Double, Double) |
Initializes a new instance of the Size struct with the specified width and height. |
Size(Double) |
Initializes a new instance of the Size struct with equal width and height. |
Size(Vector2) |
Initializes a new instance of the Size struct from a Vector2. |
Fields
Zero |
A size with both width and height set to zero. |
Properties
Height |
Gets or sets the height component of this size. |
IsZero |
Gets a value indicating whether both the width and height of this size are zero. |
Width |
Gets or sets the width component of this size. |
Methods
Deconstruct(Double, Double) |
Deconstructs this size into its component parts. |
Equals(Object) |
Determines whether the specified object is equal to the current size. |
Equals(Size) |
Determines whether the specified size is equal to the current size. |
GetHashCode() |
Returns a hash code for this size. |
ToString() |
Returns a string representation of this size. |
TryParse(String, Size) |
Operators
Addition(Size, Size) |
Adds two sizes together by adding their width and height components. |
Division(Size, Double) |
Divides a size by a scalar value. |
Equality(Size, Size) |
Determines whether two sizes have the same width and height. |
Explicit(Size to Point) | |
Implicit(Size to SizeF) | |
Inequality(Size, Size) |
Determines whether two sizes have different width or height. |
Multiply(Size, Double) |
Multiplies a size by a scalar value. |
Subtraction(Size, Size) |
Subtracts one size from another by subtracting their width and height components. |
Extension Methods
Lerp(Size, Size, Double) | |
AdjustForFill(Size, Rect, IView) |