Muokkaa

Jaa


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))]
[System.Serializable]
public struct Int32Rect : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Int32RectConverter))]
public struct Int32Rect : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Int32RectConverter))>]
[<System.Serializable>]
type Int32Rect = struct
    interface IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Int32RectConverter))>]
type Int32Rect = struct
    interface IFormattable
Public Structure Int32Rect
Implements IFormattable
Inheritance
Int32Rect
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)

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

Properties

Empty

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

HasArea

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

Height

Gets or sets the height of the rectangle.

IsEmpty

Gets a value indicating whether the rectangle is empty.

Width

Gets or sets the width of the rectangle.

X

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

Y

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

Methods

Equals(Int32Rect, Int32Rect)

Determines whether the specified rectangles are equal.

Equals(Int32Rect)

Determines whether the specified rectangle is equal to this rectangle.

Equals(Object)

Determines whether the specified rectangle is equal to this rectangle.

GetHashCode()

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

Parse(String)

Creates an Int32Rect structure from the specified String representation.

ToString()

Creates a string representation of this Int32Rect.

ToString(IFormatProvider)

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

Operators

Equality(Int32Rect, Int32Rect)

Compares two rectangles for exact equality.

Inequality(Int32Rect, Int32Rect)

Compares two rectangles for inequality.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)

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

Applies to