Forum Xamarin.Forms


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Adding image in grid, left some empty space

DhruvGohilDhruvGohil USMember ✭✭✭
edited August 2020 in Xamarin.Forms

I want to put some labels on the image, so I have put image in grid but putting image in grid left some empty space below where as in stacklayout it is displaying fine.
Here is my code:
<StackLayout> <Grid BackgroundColor="Yellow" Margin="10"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Image Source="bg_with_border_1"/> </Grid> <StackLayout BackgroundColor="Pink" Margin="10"> <Image Source="bg_with_border_1"/> </StackLayout> </StackLayout>

Best Answer


Sign In or Register to comment.