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

Image over grid.row/grid.column doesn't work

$
0
0

I did this:

<Image Source="my_image.png" Grid.Row="0" Grid.Column="0" ></Image>

when i run my app doesn't appear. I'm having many issues with to load image in my App. That image is at root of app(PCL Project). My complete code(xaml)

<ContentPage.Content>
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <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 Color="Red" Grid.Row="0" Grid.Column="0" />
                        <BoxView Color="Green" Grid.Row="0" Grid.Column="1" />
                        <BoxView Color="Green" Grid.Row="1" Grid.Column="0" />
                        <BoxView Color="Green" Grid.Row="1" Grid.Column="1" />

                        <BoxView Color="Green" Grid.Row="2" Grid.Column="0" />
                        <BoxView Color="Green" Grid.Row="2" Grid.Column="1" />
                        <BoxView Color="Yellow" Grid.Row="3" Grid.Column="0" />

            <Image Source="my_image.png" Grid.Row="0" Grid.Column="0" ></Image>

                        <Label Text="Desvio" Grid.Row="0" Grid.Column="0" TextColor="White" FontAttributes="Bold"/>
                        <Label Text="Faturamento" Grid.Row="0" Grid.Column="0" VerticalOptions="EndAndExpand" HorizontalOptions="Center" TextColor="White" FontAttributes="Bold"/>
                    </Grid>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ContentPage.Content>

Viewing all articles
Browse latest Browse all 89864

Trending Articles