Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Simplest Cross-Platform way of drawing a coloured bar

$
0
0

I need to draw a coloured bar, with its length indicating a percentage, and to be able to change its length programmatically.
I thought I might simply be able to use Boxview and set the Height and Width as I require:




The resultant rectangle is 30 pixels high, but the WidthRequest seems to be ignored and is always the maximum width of the encompassing

and
redBox.WidthRequest=5;

has no effect either.

What is the correct way to do this x-platform (Android/iOS)?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>