You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE-2.01/MCTG/Views/ContentPages/ViewRecette.xaml

108 lines
4.4 KiB

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Views.ViewRecette"
xmlns:local="clr-namespace:Views"
Title="ViewRecette"
x:Name="nrecipe">
<VerticalStackLayout BindingContext="{Binding Recipe}">
<local:MiniHeader
TitleMini="{Binding Title}"
NeedReturn="True"
HeightRequest="100"/>
<Image
Source="{Binding Image}"
HeightRequest="150"
Aspect="AspectFill"/>
<Grid ColumnDefinitions="200,*">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Margin="10,20,0,0"
Text="Ingrédients :"
FontSize="Subtitle"
FontAttributes="Bold"/>
<ListView Margin="10,60,20,0"
Grid.RowSpan="4"
ItemsSource="{Binding Ingredients}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid ColumnDefinitions="auto,auto, auto"
RowDefinitions="auto">
<Label Text="{Binding QuantityI}" Grid.Column="0" Grid.Row="0"/>
<Label Text="{Binding Name}" Grid.Column=" 1" Grid.Row="0"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Label Margin="10,0,20,20"
Grid.Column="1"
Grid.Row="0"
Text="Préparation :"
FontSize="Subtitle"
FontAttributes="Bold"/>
<ListView Margin="10,30,0,0"
Grid.Column="1"
ItemsSource="{Binding PreparationSteps}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Order, StringFormat='Etape {0}'}"
Detail="{Binding Description}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
<Border VerticalOptions="End"
HorizontalOptions="FillAndExpand"
Stroke="#C49B33"
StrokeThickness="2"
StrokeShape="RoundRectangle 20,20,20,0"
Padding="20,10,80,20"
Margin="50,100,50,0"
MinimumHeightRequest="200">
<ListView ItemsSource="{Binding Reviews}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid ColumnDefinitions="600,*" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.ColumnSpan="2"
Grid.Row="0"
Text=" Meilleure revue : "
FontAttributes="Bold"/>
<Label
Background="#FFCB9A"
Grid.Column="0"
Grid.Row="1"
Grid.RowSpan="2"
Padding="10,10,10,10"
Text="{Binding Content}"
Margin="0,0,15,0"/>
<Button Grid.Column="1"
Grid.Row="2"
Background="#FFCB9A"
Text="Voir plus"
TextColor="Black"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Border>
</VerticalStackLayout>
</ContentPage>