Table of Contents

Class Size

Namespace
BSGameLib.UI.Builder.Models
Assembly
BSGameLib.UI.dll

A size in pixels, written as {width,height} in a view file.

public class Size
Inheritance
Size
Inherited Members

Constructors

Size()

Creates a size of zero by zero.

public Size()

Size(int, int)

Creates a size of the given width and height, in pixels.

public Size(int width, int height)

Parameters

width int
height int

Size(string)

Parses {width,height}, or {size} for a square. Anything that does not parse leaves the values at zero.

public Size(string sizeString)

Parameters

sizeString string

Properties

Height

The height, in pixels.

[Required]
public int Height { get; set; }

Property Value

int

Width

The width, in pixels.

[Required]
public int Width { get; set; }

Property Value

int

Methods

ToString()

Formats the size as {width,height}.

public override string ToString()

Returns

string