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