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

85 lines
5.0 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:local="clr-namespace:Views"
xmlns:model="clr-namespace:Model;assembly=Model"
x:Class="Views.MyProfil"
Title="MyProfil">
<ContentPage.Resources>
<local:EnumToValuesConverter x:Key="musicTypeToValueConverter"
x:TypeArguments="model:Priority"/>
</ContentPage.Resources>
<local:ContainerBase NeedReturn="True">
<local:ContainerBase.MyFlyoutContent>
<Grid RowDefinitions="Auto, *, *" VerticalOptions="Center">
<VerticalStackLayout Grid.Row="1">
<Button Text="Mes Recettes"
ImageSource="person_default.png"
Style="{StaticResource button1}"
Grid.Row="1"
Clicked="OnMyRecipeClicked"/>
<Button Text="Ajouter Recette"
ImageSource="settings_icon.png"
Style="{StaticResource button1}"
Grid.Row="2"
Clicked="OnAddRecipeClicked"/>
</VerticalStackLayout>
</Grid>
</local:ContainerBase.MyFlyoutContent>
<local:ContainerBase.MyContent>
<ScrollView>
<StackLayout >
<!--user's informations-->
<Label Text="Mon profil" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontAttributes="Bold"
FontSize="24" Padding="15, 15, 20, 5"/>
<HorizontalStackLayout>
<VerticalStackLayout >
<Label Text="Informations personnelles :" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="20" Padding="15"/>
<Label Text="Nom :"
Padding="50,0,0,0"
FontSize="18"/>
<Entry BackgroundColor="#D1E8E2"
Margin="50,10,0,20"
Text="{Binding CurrentUser.Name}"/>
<Label Text="Prénom :"
Padding="50,0,0,0"
FontSize="18"/>
<Entry BackgroundColor="#D1E8E2"
Margin="50,10,0,20"
Text="{Binding CurrentUser.Surname} "/>
<Label Text="Mail :"
Padding="50,0,0,0"
FontSize="18"/>
<Entry BackgroundColor="#D1E8E2"
Margin="50,10,0,20"
IsEnabled="False"
Text="{Binding CurrentUser.Mail}"/>
<!--liste drag and drop-->
</VerticalStackLayout>
<VerticalStackLayout Padding="100,0,0,0">
<Label Text="Priorités du compte : " TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="20" Padding="15"/>
<FlexLayout BindableLayout.ItemsSource="{Binding PriorityList}" MinimumHeightRequest="80"
BackgroundColor="{StaticResource Primary}" AlignItems="Center" Wrap="Wrap">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Border HorizontalOptions="Center" WidthRequest="190" HeightRequest="30" BackgroundColor="{StaticResource Secondary}" Margin="10,0,10,0">
<Border.GestureRecognizers>
<DragGestureRecognizer DragStarting="DragGestureRecognizer_DragStarting2"/>
<DropGestureRecognizer Drop="DropGestureRecognizer_Drop2" />
</Border.GestureRecognizers>
<Label Text="{Binding}" VerticalOptions="Center" HorizontalOptions="Center"/>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
</VerticalStackLayout>
</HorizontalStackLayout>
</StackLayout>
</ScrollView>
</local:ContainerBase.MyContent>
</local:ContainerBase>
</ContentPage>