Struct
Size

2D extent with non-negative width and height used for layout and geometry calculations.

Definition

Namespace:Telerik.Documents.Primitives

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

cs-api-definition
public struct Size

Constructors

Size(double, double)

Initializes a new instance of the Size structure.

Declaration

cs-api-definition
public Size(double width, double height)

Parameters

width

double

The Width. Should be non-negative.

height

double

The Height. Should be non-negative.

Properties

Empty

Gets an empty Size. It has negative-infinity Width and Height.

Declaration

cs-api-definition
public static Size Empty { get; }

Property Value

Size

Height

Gets or sets the height. Should be non-negative.

Declaration

cs-api-definition
public double Height { get; set; }

Property Value

double

IsEmpty

Returns true if this size is the Empty size.

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

Width

Gets or sets the width. Should be non-negative.

Declaration

cs-api-definition
public double Width { get; set; }

Property Value

double

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides ValueType.Equals(object)

GetHashCode()

Returns the hash code for this instance.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Overrides ValueType.GetHashCode()

ToString()

Returns the fully qualified type name of this instance.

Declaration

cs-api-definition
public override string ToString()

Returns

string

The fully qualified type name.

Overrides ValueType.ToString()

Operators

operator !=(Size, Size)

Compares two Size instances for exact inequality.

Declaration

cs-api-definition
public static bool operator !=(Size firstSize, Size secondSize)

Parameters

firstSize

Size

The first Size to compare.

secondSize

Size

The second Size to compare.

Returns

bool

True if the two Sizes are exactly unequal; otherwise false.

operator ==(Size, Size)

Compares two Size instances for exact equality.

Declaration

cs-api-definition
public static bool operator ==(Size firstSize, Size secondSize)

Parameters

firstSize

Size

The first Size to compare.

secondSize

Size

The second Size to compare.

Returns

bool

True if the two Sizes are exactly equal; otherwise false.