Rectangle Struct
Definition
Struct defining a rectangle, using doubles.
[System.Diagnostics.DebuggerDisplay("X={X}, Y={Y}, Width={Width}, Height={Height}")]
[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.RectangleTypeConverter))]
public struct Rectangle
type Rectangle = struct
 Inheritance

Rectangle
 Attributes
Remarks
Application developers should be aware of the limits of floatingpoint representations, specifically the possibility of incorrect comparisons and equality checks for values with small differences. David Goldberg's paper
Constructors
Rectangle(Double, Double, Double, Double) 
Creates a new Rectangle object with its top left corner at ( 
Rectangle(Point, Size) 
Creates a new Rectangle object with its top left corner at 
Fields
Zero 
The Rectangle at {0,0} whose Size is {0,0}. 
Properties
Bottom 
The bottom of the Rectangle. 
Center  
Height 
Extent along the Y axis. 
IsEmpty 
Whether 
Left 
The position of the Rectangle on the X axis. 
Location  
Right 
The furthest extent along the X axis. 
Size 
The extent of the Rectangle along its X and Y axes. 
Top 
The top of the Rectangle. 
Width 
The extent of this Rectangle along the X axis. 
X 
The position of this Rectangle on the X axis. 
Y 
The position of this Rectangle on the Y axis. 
Methods
Contains(Double, Double) 
Whether the point described by 
Contains(Point) 
Whether the 
Contains(Rectangle) 
Whether 
Deconstruct(Double, Double, Double, Double) 
Stores the components of the location and size of the rectangle in the corresponding arguments. 
Equals(Object) 
Whether an Object is a Rectangle and has exactly the same values as 
Equals(Rectangle) 
Whether a Rectangle has exactly the same values as 
FromLTRB(Double, Double, Double, Double) 
Factory method to create a Rectangle from 
GetHashCode() 
The hashcode for the Rectangle. 
Inflate(Double, Double) 
Creates a Rectangle whose borders are inflated in every direction. 
Inflate(Size) 
Creates a Rectangle whose borders are inflated in every direction. 
Intersect(Rectangle) 
A new Rectangle that is the intersection of 
Intersect(Rectangle, Rectangle) 
A new Rectangle that is the intersection of 
IntersectsWith(Rectangle) 
Whether 
Offset(Double, Double)  
Offset(Point)  
Round() 
Returns a new Rectangle whose values have been rounded to their nearest integral value. 
ToString() 
A humanreadable description of the Rectangle. 
Union(Rectangle) 
A new Rectangle whose bounds cover the union of 
Union(Rectangle, Rectangle) 
A new Rectangle whose bounds cover the union of 
Operators
Equality(Rectangle, Rectangle) 
Whether two Rectangles have equal values. 
Inequality(Rectangle, Rectangle) 
Whether two Rectangles have unequal values. 
Applies to
Feedback
Loading feedback...