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

注解

避免涉及空矩形的数学计算。 由于这两个值 XY 值都是无限值,因此处理器操作受到这些操作的严重损害。 涉及这些值的比较不会影响应用程序性能。

适用于

另请参阅