Share via


Size Constructors

Definition

Overloads

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.

Size(Double, Double)

Initializes a new instance of the Size struct with the specified width and height.

Size(Double)

Source:
Size.cs
Source:
Size.cs
Source:
Size.cs

Initializes a new instance of the Size struct with equal width and height.

public Size(double size = 0);
new Microsoft.Maui.Graphics.Size : double -> Microsoft.Maui.Graphics.Size
Public Sub New (Optional size As Double = 0)

Parameters

size
Double

The value to use for both width and height (default is 0).

Applies to

Size(Vector2)

Source:
Size.cs
Source:
Size.cs
Source:
Size.cs

Initializes a new instance of the Size struct from a Vector2.

public:
 Size(System::Numerics::Vector2 vector);
public Size(System.Numerics.Vector2 vector);
new Microsoft.Maui.Graphics.Size : System.Numerics.Vector2 -> Microsoft.Maui.Graphics.Size
Public Sub New (vector As Vector2)

Parameters

vector
Vector2

The vector containing the width (X) and height (Y) values.

Applies to

Size(Double, Double)

Source:
Size.cs
Source:
Size.cs
Source:
Size.cs

Initializes a new instance of the Size struct with the specified width and height.

public:
 Size(double width, double height);
public Size(double width, double height);
new Microsoft.Maui.Graphics.Size : double * double -> Microsoft.Maui.Graphics.Size
Public Sub New (width As Double, height As Double)

Parameters

width
Double

The width component of the size.

height
Double

The height component of the size.

Applies to