Size Structure

Defines a size.

Definition

Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public readonly struct Size : IEquatable<Size>
Inheritance
Object    ValueType    Size
Implements
IEquatableSize

Properties

AspectRatio Gets the aspect ratio of the size.
Height Gets the height.
Width Gets the width.

Methods

Constrain(Size) Constrains the size.
Deconstruct(Double, Double) Deconstructs the size into its Width and Height values.
Deflate(Thickness) Deflates the size by a Thickness.
Equals(Object) Checks for equality between a size and an object.
(Overrides ValueTypeEquals(Object))
Equals(Size) Returns a boolean indicating whether the size is equal to the other given size (bitwise).
GetHashCode Returns a hash code for a Size.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Inflate(Thickness) Inflates the size by a Thickness.
NearlyEquals(Size) Returns a boolean indicating whether the size is equal to the other given size (numerically).
Parse(String) Parses a Size string.
ToString Returns the string representation of the size.
(Overrides ValueTypeToString)
WithHeight(Double) Returns a new Size with the same width and the specified height.
WithWidth(Double) Returns a new Size with the same height and the specified width.

Operators

Addition(Size, Size) 
Division(Size, Size) Divides a size by another size to produce a scaling factor.
Division(Size, Vector) Scales a size.
Division(Size, Double) Scales a size.
Equality(Size, Size) Checks for equality between two Sizes.
Inequality(Size, Size) Checks for inequality between two Sizes.
Multiply(Size, Vector) Scales a size.
Multiply(Size, Double) Scales a size.
Subtraction(Size, Size) 

Fields

Infinity A size representing infinity.

See Also