Skip to content

Instantly share code, notes, and snippets.

@rlingineni
Created April 6, 2017 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlingineni/ae2aac8f6752ead70bfb4a78d1507f1f to your computer and use it in GitHub Desktop.
Save rlingineni/ae2aac8f6752ead70bfb4a78d1507f1f to your computer and use it in GitHub Desktop.
Xaml Grid
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Sample.HelloWorldPage"
BackgroundColor= "Black">
<ContentPage.Content>
<ScrollView>
<Grid RowSpacing="5">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Image x:Name="Image1" Aspect="Fill" Source="http://placehold.it/350x150" Grid.Row="0" Grid.ColumnSpan="2"/>
<Image x:Name="Image2" Aspect="Fill" Source="http://placehold.it/350x150" Grid.Row="1" Grid.ColumnSpan="2" />
<StackLayout BackgroundColor="Transparent" Grid.Row="1" Grid.ColumnSpan="2">
<Label x:Name="score" Text="SCORE:5" TextColor="White" FontAttributes="Bold" VerticalOptions="EndAndExpand" HorizontalOptions="Center"/>
</StackLayout>
<Image Aspect="Fill" Source="http://placehold.it/350x150" Grid.Row="2" Grid.ColumnSpan="2" />
<Image Aspect="Fill" Source="http://placehold.it/350x150" Grid.Row="3" Grid.ColumnSpan="2" />
<Image Aspect="Fill" Source="http://placehold.it/150x150" Grid.Row="4" Grid.Column="0" />
<Image Aspect="Fill" Source="http://placehold.it/150x150" Grid.Row="4" Grid.Column="1"/>
</Grid>
</ScrollView>
<!-- Aspect "fill" fills the space between images !-->
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment