Share via


VisualElement.HeightRequest Property

Definition

Gets or sets the desired height override of this element in device-independent units. This is a bindable property.

public:
 property double HeightRequest { double get(); void set(double value); };
public double HeightRequest { get; set; }
member this.HeightRequest : double with get, set
Public Property HeightRequest As Double

Property Value

The desired height in device-independent units (DIUs), or -1 if unset.

Remarks

The default value is -1, which means the value is unset; the effective minimum height will be zero.

HeightRequest does not immediately change the Bounds of an element; setting the HeightRequest will change the resulting height of the element during the next layout pass.

Device-independent units (DIUs) provide a consistent unit of measurement across different screen densities. One device-independent unit equals one pixel on a 96-DPI display.

Applies to