Int32Rect Int32Rect Int32Rect Int32Rect Struct

Definition

Describes the width, height, and location of an integer rectangle.

public value class Int32Rect : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Int32RectConverter))]
public struct Int32Rect : IFormattable
type Int32Rect = struct
    interface IFormattable
Public Structure Int32Rect
Implements IFormattable
Inheritance
Attributes
Implements

Remarks

XAML Attribute Usage

<object property="X,Y,Width,Height"/>  
- or   
<object property="Empty"/>  

XAML Values

X
System.Int32

The x-coordinate of the top-left corner of the rectangle.

Y
System.Int32

The y-coordinate of the top-left corner of the rectangle.

Width
System.Int32

The width of the rectangle.

Height
System.Int32

The height of the rectangle.

XAML Text Usage

You can also use white space instead of commas to delimit values. White space can also be used with a comma delimited value set.

Constructors

Int32Rect(Int32, Int32, Int32, Int32) Int32Rect(Int32, Int32, Int32, Int32) Int32Rect(Int32, Int32, Int32, Int32) Int32Rect(Int32, Int32, Int32, Int32)

Initializes a new instance of an Int32Rect with the specified X and Y coordinates and the specified Width and Height.

Properties

Empty Empty Empty Empty

Gets the empty rectangle, a special value that represents a rectangle with no position or area.

HasArea HasArea HasArea HasArea

Gets a value that indicates whether the Width and Height properties of the Int32Rect are greater than 0.

Height Height Height Height

Gets or sets the height of the rectangle.

IsEmpty IsEmpty IsEmpty IsEmpty

Gets a value indicating whether the rectangle is empty.

Width Width Width Width

Gets or sets the width of the rectangle.

X X X X

Gets or sets the x-coordinate of the top-left corner of the rectangle.

Y Y Y Y

Gets or sets the y-coordinate of the top-left corner of the rectangle.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified rectangle is equal to this rectangle.

Equals(Int32Rect) Equals(Int32Rect) Equals(Int32Rect) Equals(Int32Rect)

Determines whether the specified rectangle is equal to this rectangle.

Equals(Int32Rect, Int32Rect) Equals(Int32Rect, Int32Rect) Equals(Int32Rect, Int32Rect) Equals(Int32Rect, Int32Rect)

Determines whether the specified rectangles are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Creates a hash code from this rectangle's X, Y, Width, and Height values.

Parse(String) Parse(String) Parse(String) Parse(String)

Creates an Int32Rect structure from the specified String representation.

ToString() ToString() ToString() ToString()

Creates a string representation of this Int32Rect.

ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

Creates a string representation of this Int32Rect based on the supplied IFormatProvider.

Operators

Equality(Int32Rect, Int32Rect) Equality(Int32Rect, Int32Rect) Equality(Int32Rect, Int32Rect) Equality(Int32Rect, Int32Rect)

Compares two rectangles for exact equality.

Inequality(Int32Rect, Int32Rect) Inequality(Int32Rect, Int32Rect) Inequality(Int32Rect, Int32Rect) Inequality(Int32Rect, Int32Rect)

Compares two rectangles for inequality.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

Formats the value of the current instance using the specified format.

Applies to