Rect.Empty 屬性

定義

會得到一個特殊值,代表一個沒有位置或面積的矩形。

public:
 static property System::Windows::Rect Empty { System::Windows::Rect get(); };
public static System.Windows.Rect Empty { get; }
static member Empty : System.Windows.Rect
Public Shared ReadOnly Property Empty As Rect

屬性值

空矩形,具有 XY 的性質值,PositiveInfinity且具有 WidthHeight 性質值 。NegativeInfinity

備註

避免使用涉及空矩形的數學計算。 由於 和 X 都是Y無限值,處理器操作會受到這些操作嚴重影響。 涉及這些數值的比較不會影響應用程式效能。

適用於

另請參閱