Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RadialGauge.StretchToFit Property

Gets or sets whether the gauge is resized to best fit the page. This is a bindable property.

Namespace: DevExpress.Maui.Gauges

Assembly: DevExpress.Maui.Gauges.dll

NuGet Package: DevExpress.Maui.Gauges

#Declaration

C#
public bool StretchToFit { get; set; }

#Property Value

Type Default Description
Boolean True

true if the gauge is stretched to fit the page; otherwise, false and the gauge’s size is set according to its MinimumHeightRequest and MinimumWidthRequest property values.

#Remarks

When enabled, the StretchToFit property makes the gauge occupy the maximum available square area to be fully visible on the page. Otherwise, the gauge’s size is set according to its MinimumHeightRequest and MinimumWidthRequest properties.

The following image shows gauges with different StretchToFit property values:

DevExpress Gauges for .NET MAUI - The StretchToFit property in action

<dx:DXStackLayout Orientation="Vertical">

    <dxga:RadialGauge StretchToFit="False" 
                      MinimumHeightRequest="200" MinimumWidthRequest="200" 
                      Margin="4">
        <dxga:RadialScale .../>
    </dxga:RadialGauge>
    <dxga:RadialGauge StretchToFit="True" 
                      MinimumHeightRequest="200" MinimumWidthRequest="200" 
                      Margin="4">
        <dxga:RadialScale .../>
    </dxga:RadialGauge>

</dx:DXStackLayout>
See Also