Share via


VisualElement.WidthRequest Property

Definition

Gets or sets the desired width override of this element. This is a bindable property.

public:
 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

Remarks

The default value is -1, which means the value is unset and a width will be determined automatically.

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

Applies to