How to load more than one image into a grid layout xamarin

0

I'm trying to load more than one image into rows / columns. Only the image for row = 0 and column = 0 is loaded. The others do not. I made several attempts, inside stacklayout, outside, at the beginning, in the middle and at the end of the grid, after each BoxView, before, finally, I did not get anything yet.

<ContentPage.Content>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <BoxView BackgroundColor="Red" Grid.Row="0" Grid.Column="0" />
        <Label Text="(-1M)" Grid.Row="0" Grid.Column="0" TextColor="White" FontAttributes="Bold" />
        <Label Text="Desvio de Faturamento" Grid.Row="0" Grid.Column="0" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <BoxView BackgroundColor="Green" Grid.Row="0" Grid.Column="1" />
        <Label Text="80%" Grid.Row="0" Grid.Column="1" TextColor="White" FontAttributes="Bold" />
        <Label Text="Ocupação" Grid.Row="0" Grid.Column="1" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <BoxView BackgroundColor="Green" Grid.Row="1" Grid.Column="0" />
        <Label Text="75" Grid.Row="1" Grid.Column="0" TextColor="White" FontAttributes="Bold" />
        <Label Text="Tickets Cancelados" Grid.Row="1" Grid.Column="0" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <BoxView BackgroundColor="Green" Grid.Row="1" Grid.Column="1" />
        <Label Text="956" Grid.Row="1" Grid.Column="1" TextColor="White" FontAttributes="Bold" />
        <Label Text="Pendências" Grid.Row="1" Grid.Column="1" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <BoxView BackgroundColor="Green" Grid.Row="2" Grid.Column="0" />
        <Label Text="56" Grid.Row="2" Grid.Column="0" TextColor="White" FontAttributes="Bold" />
        <Label Text="Limpeza de Pátio" Grid.Row="2" Grid.Column="0" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <BoxView BackgroundColor="Yellow" Grid.Row="2" Grid.Column="1" />
        <Label Text="(-15)/30" Grid.Row="2" Grid.Column="1" TextColor="Black" FontAttributes="Bold" />
        <Label Text="Check List" Grid.Row="2" Grid.Column="1" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="Black" FontAttributes="Bold" />
        <BoxView BackgroundColor="Green" Grid.Row="3" Grid.Column="0" />
        <Label Text="37%" Grid.Row="3" Grid.Column="0" TextColor="White" FontAttributes="Bold" />
        <Label Text="Prestação de Contas" Grid.Row="3" Grid.Column="0" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold" />
        <StackLayout Spacing="10" Padding="10" VerticalOptions="Center">
            <Image Source="{local:ImageResource My_namespace.Images.ico-cobranca-mensalista.png}" Grid.Row="0" Grid.Column="0">
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="OnTapGestureReconizerTapped" NumberOfTapsRequired="1"></TapGestureRecognizer>
                </Image.GestureRecognizers>
            </Image>
        </StackLayout>
        <StackLayout Spacing="10" Padding="10" VerticalOptions="Center">
            <Image Source="{local:ImageResource My_namespace.Images.ico-contrato.png}" Grid.Row="0" Grid.Column="1">
                <Image.GestureRecognizers>
                    <!--<TapGestureRecognizer Tapped="OnTapGestureReconizerTapped" NumberOfTapsRequired="1"></TapGestureRecognizer>-->
                </Image.GestureRecognizers>
            </Image>
        </StackLayout>
    </Grid>
</ContentPage.Content>
    
asked by anonymous 17.01.2018 / 20:41

0 answers