Xamarin.Forms.Rectangle.Inflate Method
Creates a Xamarin.Forms.Rectangle whose borders are inflated in every direction.

Syntax

public Rectangle Inflate (Size sz)

Parameters

sz
Values to inflate all the borders.

Returns

A new Xamarin.Forms.Rectangle whose Rectangle.Left and Rectangle.Right are inflated by sz's Size.Width and whose Rectangle.Top and Rectangle.Bottom are inflated by sz's Size.Height.

Remarks

Application developers should note that since the inflation occurs in every direction, the returned Xamarin.Forms.Rectangle is larger in each dimension by twice sz.

C# Example

var rect = new Rectangle (10, 10, 5, 5);
var larger = rect.Inflate (new Size (1, 1));
Assert.AreEqual (larger, new Rectangle (9, 9, 7, 7));

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0