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

66 lines
2.8 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">
<ScrollView>
<VerticalStackLayout BindingContext="{Binding Recipe}">
<local:MiniHeader
BindingContext="{Binding Recipe, Source={x:Reference nrecipe}}"
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,100"
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"
SelectionMode="None"
ItemsSource="{Binding PreparationSteps}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Order, StringFormat='Etape {0}'}"
Detail="{Binding Description}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</VerticalStackLayout>
</ScrollView>
</ContentPage>