Skip to content


The BoxView is used to draw a solid colored rectangle. Xamarin does not have the other shapes out of the box. By default the size of the BoxView is 40x40 but you can use the WidthRequest and HeightRequest property to choose different sizes.


<BoxView Color="Orange" HorizontalOptions="Center" VerticalOptions="Center" />

In Code

var boxView = new BoxView
    HorizontalOptions = LayoutOptions.Center,
    VerticalOptions = LayoutOptions.CenterAndExpand,
    WidthRequest = 100,
    HeightRequest = 100