- width
- Value to shift Rectangle.Left to the left and Rectangle.Right to the right.
- height
- Value to shift Rectangle.Top upward and Rectangle.Bottom downward.
A new Xamarin.Forms.Rectangle whose Rectangle.Left and Rectangle.Right are inflated by width and whose Rectangle.Top and Rectangle.Bottom are inflated by height.
Application developers should note that since the inflation occurs in every direction, the returned Xamarin.Forms.Rectangle is larger in X by twice width and larger in Y by twice height.
C# Example
var rect = new Rectangle (10, 10, 5, 5); var larger = rect.Inflate (1,1); Assert.AreEqual (larger, new Rectangle (9, 9, 7, 7));