Int32Rect Int32Rect Int32Rect Int32Rect Struct

定義

描述整數矩形的寬度、高度以及位置。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
type Int32Rect = struct
    interface IFormattable
Public Structure Int32Rect
Implements IFormattable
繼承
屬性
實作

備註

XAML Attribute UsageXAML Attribute Usage

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

XAML 值XAML Values

XX
System.Int32

矩形左上角的 X 座標。The x-coordinate of the top-left corner of the rectangle.

YY
System.Int32

矩形左上角的 Y 座標。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 文字使用方式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.

建構函式

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

使用指定的 Int32RectX 座標,以及指定的 YWidth,初始化 Height 的新執行個體。Initializes a new instance of an Int32Rect with the specified X and Y coordinates and the specified Width and Height.

屬性

Empty Empty Empty Empty

取得空矩形,表示沒有位置或區域之矩形的特殊值。Gets the empty rectangle, a special value that represents a rectangle with no position or area.

HasArea HasArea HasArea HasArea

取得值,指出 WidthHeightInt32Rect 屬性是否大於 0。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

取得或設定矩形左上角的 X 座標。Gets or sets the x-coordinate of the top-left corner of the rectangle.

Y Y Y Y

取得或設定此矩形左上角的 Y 座標。Gets or sets the y-coordinate of the top-left corner of the rectangle.

方法

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()

從這個矩形的 XYWidthHeight 值建立雜湊程式碼。Creates a hash code from this rectangle's X, Y, Width, and Height values.

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

從指定的 Int32Rect 表示建立 String 結構。Creates an Int32Rect structure from the specified String representation.

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

建立這個 Int32Rect 的字串表示。Creates a string representation of this Int32Rect.

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

根據提供的 Int32Rect 建立這個 IFormatProvider 的字串表示。Creates a string representation of this Int32Rect based on the supplied IFormatProvider.

運算子

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.

明確介面實作

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.

適用於