RectHelper Class
Definition
public ref class RectHelper sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Microsoft.UI.Xaml.IRectHelperStatics, 65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class RectHelper final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Microsoft.UI.Xaml.IRectHelperStatics), 65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class RectHelper
Public NotInheritable Class RectHelper
- Inheritance
-
RectHelper
- Attributes
-
Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.StaticAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute
Remarks
Rect is a Windows Runtime structure that represents a rectangle's dimensions with an origin.
RectHelper is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use members of Rect instead, because utility members are available directly on the structure due to .NET Framework runtime support. C++ code can only access the data values on Rect, for example Left. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on Rect are available in a static form on the RectHelper class.
Properties
Empty |
Gets a static Rect value where the Rect has no size or position (all values 0). C# and Microsoft Visual Basic code should use Rect.Empty instead. |
Methods
Contains(Rect, Point) |
Returns whether a given Point is within the bounds of a given Rect, for a shared coordinate reference. C# and Microsoft Visual Basic code should use Rect.Contains instead. |
Equals(Rect, Rect) |
Provides comparison of the values of two Rect values. C# and Microsoft Visual Basic code should use the Equality (=) operator or Equals method instead. |
FromCoordinatesAndDimensions(Single, Single, Single, Single) |
Creates a new Rect value based on the element values of a Rect structure. C# and Microsoft Visual Basic code should use the Rect(Double,Double,Double,Double) constructor instead. |
FromLocationAndSize(Point, Size) |
Creates a new Rect value based on a Point that specifies the upper-left origin, and a Size that specifies the width and height. C# and Microsoft Visual Basic code should use the Rect(Point,Size) constructor instead. |
FromPoints(Point, Point) |
Creates a new Rect value based on two points. C# and Microsoft Visual Basic code should use the Rect(Point,Point) constructor instead. |
GetBottom(Rect) |
Gets a "Bottom" value for the specified Rect. So long as Height is positive, "Bottom" is evaluated as Y + Height. C# and Microsoft Visual Basic code should use Rect.Bottom instead. |
GetIsEmpty(Rect) |
Returns whether a specified Rect is equivalent to an Empty Rect. C# and Microsoft Visual Basic code should use Rect.IsEmpty instead. |
GetLeft(Rect) |
Gets a "Left" value for the specified Rect. So long as Width is positive, "Left" is evaluated as X. C# and Microsoft Visual Basic code should use Rect.Left instead. |
GetRight(Rect) |
Gets a "Right" value for the specified Rect. So long as Width is positive, "Right" is evaluated as X + Width. C# and Microsoft Visual Basic code should use Rect.Right instead. |
GetTop(Rect) |
Gets a "Top" value for the specified Rect. So long as Height is positive, "Top" is evaluated as Y. C# and Microsoft Visual Basic code should use Rect.Top instead. |
Intersect(Rect, Rect) |
Returns the areas of two specified Rect values that intersect, as a new Rect. C# and Microsoft Visual Basic code should use Rect.Intersect instead. |
Union(Rect, Point) |
Creates a rectangle that is exactly large enough to contain the a specified rectangle and a specified point. C# and Microsoft Visual Basic code should use Rect.Union(Point) instead. |
Union(Rect, Rect) |
Creates a rectangle that is exactly large enough to contain the two specified rectangles. C# and Microsoft Visual Basic code should use Rect.Union(Rect) instead. |