VisualElement.WidthRequest Property


Gets or sets the desired width override of this element.

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

Property Value


The width this element desires to be.


WidthRequest does not immediately change the Bounds of a VisualElement, however setting the WidthRequest will change the result of calls to GetSizeRequest, which will in turn modify the final size the element receives during a layout cycle.

Applies to