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/MyPosts.xaml

78 lines
3.1 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"
xmlns:model="clr-namespace:Model;assembly=Model"
xmlns:local="clr-namespace:Views"
x:Class="Views.MyPosts"
Title="MyPosts">
<local:ContainerBase
NeedReturn="True">
<!-- Flyout -->
<local:ContainerBase.MyFlyoutContent>
<Grid RowDefinitions="Auto, *, *" VerticalOptions="Center">
<VerticalStackLayout Grid.Row="1">
<Button Text="Mes informations"
ImageSource="person_default.png"
Style="{StaticResource button1}"
Grid.Row="1"
Clicked="MyInformations_Clicked"/>
<Button Text="Ajouter une recette"
ImageSource="add_icon.png"
Style="{StaticResource button1}"
Grid.Row="2"
Clicked="AddRecipe_Clicked"/>
</VerticalStackLayout>
</Grid>
</local:ContainerBase.MyFlyoutContent>
<!-- Master -->
<local:ContainerBase.MyContent>
<ScrollView>
<StackLayout MinimumWidthRequest="400">
<Label
Text="{Binding RecipesDisplayed.Description}"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="24"
Padding="15"/>
<FlexLayout
Margin="0, 15"
Wrap="Wrap"
JustifyContent="Start"
AlignItems="Center"
AlignContent="SpaceEvenly"
HorizontalOptions="Center"
BindableLayout.ItemsSource="{Binding RecipesDisplayed}">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="model:Recipe" x:Name="rc_case">
<local:RecipeCase
CaseImageSource="{Binding Image}"
RecipeTitle="{Binding Title}">
<FlyoutBase.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Export recipe"
Clicked="ExportRecipe_Clicked"/>
</MenuFlyout>
</FlyoutBase.ContextFlyout>
</local:RecipeCase>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
</StackLayout>
</ScrollView>
</local:ContainerBase.MyContent>
</local:ContainerBase>
</ContentPage>