Hi everyone,
I don't understand the view of my page.
I want that my boxview, listview, and buttons taking all my page.
Can you explain me where is the mistake ?
Thank you very much for your help,
Marie,
This is my code :
`<?xml version="1.0" encoding="utf-8" ?>
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<BoxView Grid.Row="0" x:Name="BoxViewCoder" Style="{StaticResource boxviewStyle}"/>
<Label Grid.Row="0" x:Name="TitleLabel" Style="{StaticResource labelStyle}" HorizontalOptions="Center" VerticalOptions="Center"/>
<Label Grid.Row="1" x:Name="KLabel" Text="A" Style="{StaticResource labelFondBlancStyle}" HorizontalOptions="End"/>
<Label Grid.Row="1" x:Name="CLabel" Text="B" Style="{StaticResource labelFondBlancStyle}" HorizontalOptions="Start" />
<ListView Grid.Row="2" x:Name="tableE" Style="{StaticResource listViewStyle}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<ListView.Header SeparatorVisibility="Default">
<Grid BackgroundColor="#00A0CE" ColumnSpacing="3" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="AUTO"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Text="N" Grid.Column="0" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center" Margin="3"/>
<Label x:Name="MLabel" Text="M" Grid.Column="1" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center" />
<Label x:Name="ELabel" Text="E" Grid.Column="2" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center" />
</Grid>
</ListView.Header>
<ListView.ItemTemplate SeparatorVisibility="Default">
<DataTemplate>
<ViewCell>
<Grid BackgroundColor="LightBlue" ColumnSpacing="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="AUTO"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text ="{Binding N}" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center" Margin="3"/>
<Label Grid.Column="1" Text ="{Binding Me}" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center"/>
<Label Grid.Column="2" Text ="{Binding MeRef}" Style="{StaticResource labellistViewStyle}" HorizontalOptions="Center"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Button Grid.Row="3" x:Name="ButtonZ" Text="Z" Style="{StaticResource buttonStyle}" HorizontalOptions="Fill" VerticalOptions="FillAndExpand"/>
<Button Grid.Row="4" x:Name="ButtonA" Text="A" Style="{StaticResource buttonStyle}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>
<Button Grid.Row="4" x:Name="ButtonE" Text="E" Style="{StaticResource buttonStyle}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>
<Button Grid.Row="5" x:Name="ButtonC" Text="C" Style="{StaticResource buttonStyle}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>
<!-- OK / Annuler -->
<Grid Grid.Row="6" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button x:Name="ButtonOK" Grid.Column="0" Text="{Translator:Translate OK}" Style="{StaticResource buttonStyle}" Clicked="onClickedOk"/>
<Button x:Name="ButtonCancel" Grid.Column="1" Text="{Translator:Translate Annuler}" Style="{StaticResource buttonStyle}" Clicked="onClickedCancel"/>
</Grid>
</Grid>
</ContentPage.Content>
`
And this is the view I have :