How to change height of progress bar in Xamarin Forms?

前端 未结 5 429
深忆病人
深忆病人 2021-01-05 11:05

How do I change the height of a Xamarin Forms ProgressBar in code? Am using Xamarin Forms V2.1.

.HeightRequest and .MinimumHeightRequ

5条回答
  •  春和景丽
    2021-01-05 12:04

    I faced the same need and on the latest version of Visual Studio, 16.5.2 I figured out that to get a bigger horizontal bar you just need to set ScaleY within the progressbar declaration inside the xml. To avoid glitches on Android and be sure that the progress bar is not overwhelming other elements I added a margin as you can see from the declaration here below.

            
    

提交回复
热议问题