Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How can i load two or more image in the grid

$
0
0

I have this layout

<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>

the first image is loaded correctly, but others images don't load. Only the first image is shown. I did many attempts and i didn't get success.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>