affichage centré depart arrivée

This commit is contained in:
leroyv 2025-04-08 11:45:28 +02:00
parent 7af121748b
commit e3f8514824

View File

@ -10,89 +10,126 @@
<StackLayout> <StackLayout>
<StackLayout> <StackLayout>
<StackLayout Padding="20" Orientation="Horizontal"> <StackLayout Padding="20" Orientation="Vertical">
<StackLayout Padding="20" Orientation="Horizontal">
<BoxView HeightRequest="5" Color="MediumPurple"/> <BoxView HeightRequest="5" Color="MediumPurple"/>
<Label Text="Arrivée(s)" <Label Text="Arrivée(s)"
FontSize="24" FontSize="24"
FontAttributes="Bold" FontAttributes="Bold"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
</StackLayout>
<ListView x:Name="GestionArriveListView" HasUnevenRows="True"> <ListView x:Name="GestionArriveListView" HasUnevenRows="True">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
<ViewCell> <ViewCell>
<StackLayout> <StackLayout Orientation="Vertical" Padding="5" HorizontalOptions="FillAndExpand">
<Label Text="ID chambre :" <!-- Première ligne : ID chambre et Nombre de personnes -->
VerticalOptions="Center" <StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
WidthRequest="50"/> <Label Text="ID chambre :"
<Label Text="{Binding ChambreId}" VerticalOptions="Center"
VerticalOptions="Center" WidthRequest="120"/>
WidthRequest="50"/> <Label Text="{Binding ChambreId}"
<Label Text="Nombres de personnes :" VerticalOptions="Center"
VerticalOptions="Center" WidthRequest="50"/>
WidthRequest="50"/>
<Label Text="{Binding NbPersonnes}" <Label Text="Nombres de personnes :"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="50"/> WidthRequest="160"/>
<Label Text="Date d'arrivée : aujourd'hui" <Label Text="{Binding NbPersonnes}"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="100"/> WidthRequest="50"/>
<Label Text="Date de départ :" </StackLayout>
VerticalOptions="Center"
WidthRequest="100"/> <!-- Deuxième ligne : Date d'arrivée -->
<Label Text="{Binding DateFin, StringFormat='{0:dd/MM/yyyy}'}" <StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
VerticalOptions="Center" <Label Text="Date d'arrivée :"
WidthRequest="100"/> VerticalOptions="Center"
WidthRequest="150"/>
<Label Text="{Binding DateDebut, StringFormat='{0:dd/MM/yyyy}'}"
VerticalOptions="Center"
WidthRequest="100"/>
</StackLayout>
<!-- Troisième ligne : Date de départ -->
<StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
<Label Text="Date de départ :"
VerticalOptions="Center"
WidthRequest="150"/>
<Label Text="Aujourd'hui"
VerticalOptions="Center"
WidthRequest="100"/>
</StackLayout>
</StackLayout> </StackLayout>
</ViewCell> </ViewCell>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
</StackLayout> </StackLayout>
</StackLayout>
<StackLayout>
<StackLayout Padding="20" Orientation="Horizontal">
<BoxView HeightRequest="5" Color="MediumPurple"/> <StackLayout Padding="20" Orientation="Vertical">
<Label Text="Départ(s)" <StackLayout Padding="20" Orientation="Horizontal">
FontSize="24" <BoxView HeightRequest="5" Color="MediumPurple"/>
FontAttributes="Bold" <Label Text="Départ(s)"
HorizontalOptions="Center" /> FontSize="24"
FontAttributes="Bold"
HorizontalOptions="Center" />
</StackLayout>
</StackLayout> <ListView x:Name="GestionDepartListView" HasUnevenRows="True">
<ListView x:Name="GestionDepartListView" HasUnevenRows="True"> <ListView.ItemTemplate>
<ListView.ItemTemplate> <DataTemplate>
<DataTemplate> <ViewCell>
<ViewCell> <!-- StackLayout principal avec orientation verticale -->
<StackLayout> <StackLayout Orientation="Vertical" Padding="5" HorizontalOptions="FillAndExpand">
<Label Text="ID chambre :" <!-- Première ligne : ID chambre et Nombre de personnes -->
VerticalOptions="Center" <StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
WidthRequest="50"/> <Label Text="ID chambre :"
<Label Text="{Binding ChambreId}" VerticalOptions="Center"
VerticalOptions="Center" WidthRequest="120"/>
WidthRequest="50"/> <Label Text="{Binding ChambreId}"
<Label Text="Nombres de personnes :" VerticalOptions="Center"
VerticalOptions="Center" WidthRequest="50"/>
WidthRequest="50"/>
<Label Text="{Binding NbPersonnes}" <Label Text="Nombres de personnes :"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="50"/> WidthRequest="160"/>
<Label Text="Date d'arrivée :" <Label Text="{Binding NbPersonnes}"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="100"/> WidthRequest="50"/>
</StackLayout>
<!-- Deuxième ligne : Date d'arrivée -->
<StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
<Label Text="Date d'arrivée :"
VerticalOptions="Center"
WidthRequest="150"/>
<Label Text="{Binding DateDebut, StringFormat='{0:dd/MM/yyyy}'}" <Label Text="{Binding DateDebut, StringFormat='{0:dd/MM/yyyy}'}"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="100"/> WidthRequest="100"/>
<Label Text="Date de départ : aujourd'hui" </StackLayout>
VerticalOptions="Center"
WidthRequest="100"/> <!-- Troisième ligne : Date de départ -->
</StackLayout> <StackLayout Orientation="Horizontal" Padding="5" HorizontalOptions="FillAndExpand">
</ViewCell> <Label Text="Date de départ :"
</DataTemplate> VerticalOptions="Center"
</ListView.ItemTemplate> WidthRequest="150"/>
</ListView> <Label Text="Aujourd'hui"
</StackLayout> VerticalOptions="Center"
WidthRequest="100"/>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>