top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to draw rectangle in Xamarin.Forms?

0 votes
588 views
How to draw rectangle in Xamarin.Forms?
posted Oct 10, 2017 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Using BoxView you can draw a rectangle.Below is a Example of Rectangle whose background color is red.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="ImageSlider.Views.BoxView">
    <Grid>
        <BoxView BackgroundColor="Red" HeightRequest="120" VerticalOptions="Start" HorizontalOptions="Fill" Margin="10">

        </BoxView>
    </Grid>

</ContentPage>
answer Jul 25, 2019 by Rushabh Verma R.
...