Rectangle Structure

Defines a rectangle.

  public struct Rectangle

Public Instance Constructors

Method Description
Rectangle(int, int, int, int) Initializes a new instance of the Rectangle structure.
Rectangle(Point, Size) Initializes a new instance of the Rectangle structure.

Public Operators

Operator Description
Addition Combines two Rectangle structures.
Equality Tests whether two specified Rectangle structures are equivalent.
Inequality Tests whether two Rectangle structures are different.
Subtraction Subtracts one Rectangle structure from another.

Public Static Methods

Method Description
Add Combines two Rectangle structures.
Inflate Increases the size of the Rectangle structure by specified X and Y values.
Intersect Creates a Rectangle that is the intersection of two Rectangle structures.
Subtract Subtracts one Rectangle structure from another.
Union Creates a Rectangle structure that is the union of two Rectangle structures.

Public Instance Methods

Method Description
Contains Determines whether a Point is located within a given Rectangle structure.
Equals Tests whether the specified object is a Rectangle structure and is equivalent to the current Rectangle structure.
GetHashCode Returns a hash code for this structure.
ToString Converts this structure to a human-readable string.

Public Static Fields

Field Description
Zero Represents a zero Rectangle structure.

Public Instance Properties

Property Description
Height Gets or sets the height of the rectangle.
Width Gets or sets the width of the rectangle.
X Gets or sets the X-value.
Y Gets or sets the Y-value.


Reference: Microsoft.MediaCenter.UI

Namespace: Microsoft.MediaCenter.UI

Assembly: Microsoft.MediaCenter.UI.dll

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also