Skip to content

Commit 84b0ee8

Browse files
authored
Merge pull request #2355 from mcooley/recthelper-sizehelper-fixes
Corrections to RectHelper and SizeHelper's definition of "empty"
2 parents de36a4b + 3dde176 commit 84b0ee8

8 files changed

Lines changed: 12 additions & 8 deletions

windows.ui.xaml/recthelper_empty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public Windows.Foundation.Rect Empty { get; }
1111

1212
## -description
1313

14-
Gets a static [Rect](../windows.foundation/rect.md) value where the [Rect](../windows.foundation/rect.md) has no size or position (all values 0). C# and Microsoft Visual Basic code should use [Rect.Empty](/dotnet/api/windows.foundation.rect.empty?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a static [Rect](../windows.foundation/rect.md) value where the [Rect](../windows.foundation/rect.md) has no size or position. C# and Microsoft Visual Basic code should use [Rect.Empty](/dotnet/api/windows.foundation.rect.empty?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

1818
## -property-value
1919

20-
A [Rect](../windows.foundation/rect.md) with all values as 0.
20+
A [Rect](../windows.foundation/rect.md) with X and Y set to positive infinity, and Width and Height set to negative infinity.
2121

2222
## -remarks
2323

windows.ui.xaml/recthelper_getbottom_1066401735.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public float GetBottom(Windows.Foundation.Rect target)
1111

1212
## -description
1313

14-
Gets a "Bottom" value for the specified [Rect](../windows.foundation/rect.md). So long as **Height** is positive, "Bottom" is evaluated as **Y** + **Height**. C# and Microsoft Visual Basic code should use [Rect.Bottom](/dotnet/api/windows.foundation.rect.bottom?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a "Bottom" value for the specified [Rect](../windows.foundation/rect.md). So long as the Rect is not the [Empty](recthelper_empty.md) Rect, "Bottom" is evaluated as **Y** + **Height**. C# and Microsoft Visual Basic code should use [Rect.Bottom](/dotnet/api/windows.foundation.rect.bottom?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

windows.ui.xaml/recthelper_getisempty_1110221055.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The [Rect](../windows.foundation/rect.md) to evaluate.
2727

2828
## -remarks
2929

30+
Do not use this method to test for zero area; a rectangle with zero area is not necessarily the [Empty](recthelper_empty.md) rectangle. For more information, see the [Empty](recthelper_empty.md) property.
31+
3032
## -examples
3133

3234
## -see-also

windows.ui.xaml/recthelper_getleft_1023490401.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public float GetLeft(Windows.Foundation.Rect target)
1111

1212
## -description
1313

14-
Gets a "Left" value for the specified [Rect](../windows.foundation/rect.md). So long as **Width** is positive, "Left" is evaluated as **X**. C# and Microsoft Visual Basic code should use [Rect.Left](/dotnet/api/windows.foundation.rect.left?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a "Left" value for the specified [Rect](../windows.foundation/rect.md). So long as the Rect is not the [Empty](recthelper_empty.md) Rect, "Left" is evaluated as **X**. C# and Microsoft Visual Basic code should use [Rect.Left](/dotnet/api/windows.foundation.rect.left?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

windows.ui.xaml/recthelper_getright_1384154527.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public float GetRight(Windows.Foundation.Rect target)
1111

1212
## -description
1313

14-
Gets a "Right" value for the specified [Rect](../windows.foundation/rect.md). So long as **Width** is positive, "Right" is evaluated as **X** + **Width**. C# and Microsoft Visual Basic code should use [Rect.Right](/dotnet/api/windows.foundation.rect.right?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a "Right" value for the specified [Rect](../windows.foundation/rect.md). So long as the Rect is not the [Empty](recthelper_empty.md) Rect, "Right" is evaluated as **X** + **Width**. C# and Microsoft Visual Basic code should use [Rect.Right](/dotnet/api/windows.foundation.rect.right?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

windows.ui.xaml/recthelper_gettop_1602274045.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public float GetTop(Windows.Foundation.Rect target)
1111

1212
## -description
1313

14-
Gets a "Top" value for the specified [Rect](../windows.foundation/rect.md). So long as **Height** is positive, "Top" is evaluated as **Y**. C# and Microsoft Visual Basic code should use [Rect.Top](/dotnet/api/windows.foundation.rect.top?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a "Top" value for the specified [Rect](../windows.foundation/rect.md). So long as the Rect is not the [Empty](recthelper_empty.md) Rect, "Top" is evaluated as **Y**. C# and Microsoft Visual Basic code should use [Rect.Top](/dotnet/api/windows.foundation.rect.top?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

windows.ui.xaml/sizehelper_empty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public Windows.Foundation.Size Empty { get; }
1111

1212
## -description
1313

14-
Gets a static [Size](../windows.foundation/size.md) value where the [Size](../windows.foundation/size.md) has no height or width (all values 0). C# and Microsoft Visual Basic code should use [Size.Empty](/dotnet/api/windows.foundation.size.empty?view=dotnet-uwp-10.0&preserve-view=true) instead.
14+
Gets a static [Size](../windows.foundation/size.md) value where the [Size](../windows.foundation/size.md) has no height or width. C# and Microsoft Visual Basic code should use [Size.Empty](/dotnet/api/windows.foundation.size.empty?view=dotnet-uwp-10.0&preserve-view=true) instead.
1515

1616

1717

1818
## -property-value
1919

20-
A [Size](../windows.foundation/size.md) with all values as 0.
20+
A [Size](../windows.foundation/size.md) with Width and Height set to negative infinity.
2121

2222
## -remarks
2323

windows.ui.xaml/sizehelper_getisempty_1023510010.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The [Size](../windows.foundation/size.md) to evaluate.
2727

2828
## -remarks
2929

30+
Do not use this method to test for zero area; a size with zero area is not necessarily the [Empty](sizehelper_empty.md) size. For more information, see the [Empty](sizehelper_empty.md) property.
31+
3032
## -examples
3133

3234
## -see-also

0 commit comments

Comments
 (0)