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.
83 lines
3.8 KiB
83 lines
3.8 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:local="clr-namespace:Views"
|
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
x:Class="Views.ContainerFlyout"
|
|
x:Name="fl"
|
|
BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray600}}">
|
|
|
|
<Grid RowDefinitions="Auto, *, Auto">
|
|
<VerticalStackLayout Grid.Row="0">
|
|
|
|
<Grid RowDefinitions="Auto, *">
|
|
<!-- Return -->
|
|
<local:ReturnButton NeedReturn="{Binding NeedReturn, Source={x:Reference fl}}" Grid.Row="0"
|
|
HorizontalOptions="Start" Padding="10, 10, 0, 0"/>
|
|
<!-- Header -->
|
|
<ImageButton Source="{Binding CurrentConnected.ProfilePict}" HorizontalOptions="Center"
|
|
BackgroundColor="{StaticResource Secondary}"
|
|
WidthRequest="100" HeightRequest="100"
|
|
CornerRadius="50" Margin="0, 30, 0, 10"
|
|
BorderWidth="5" BorderColor="Black"
|
|
IsVisible="{Binding CurrentConnected, Converter={toolkit:IsNotNullConverter}}"
|
|
Grid.RowSpan="2"
|
|
Clicked="ProfileButton_Clicked">
|
|
<FlyoutBase.ContextFlyout>
|
|
<MenuFlyout>
|
|
<MenuFlyoutItem Text="Change profile picture"
|
|
Clicked="ChangeProfilePict_Clicked"/>
|
|
</MenuFlyout>
|
|
</FlyoutBase.ContextFlyout>
|
|
</ImageButton>
|
|
</Grid>
|
|
|
|
<!-- Connection button -->
|
|
<Button Text="Connection" ImageSource="login_icon.png"
|
|
Style="{StaticResource button2}"
|
|
Margin="15, 50"
|
|
IsVisible="{Binding CurrentConnected, Converter={toolkit:IsNullConverter}}"
|
|
Clicked="ConnectionButton_Clicked"/>
|
|
|
|
<!-- Display name -->
|
|
<FlexLayout
|
|
Margin="0, 10"
|
|
Wrap="Wrap"
|
|
AlignItems="Center"
|
|
HorizontalOptions="Center"
|
|
BindingContext="{Binding CurrentConnected}"
|
|
IsVisible="{Binding ., Converter={toolkit:IsNotNullConverter}}">
|
|
|
|
<Label Text="{Binding Name}"
|
|
HorizontalOptions="Center" Margin="2,0"
|
|
FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center"
|
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
|
|
|
|
<Label Text="{Binding Surname}"
|
|
HorizontalOptions="Center" Margin="2,0"
|
|
FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center"
|
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
|
|
</FlexLayout>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<!-- Content -->
|
|
<ContentView
|
|
VerticalOptions="Fill"
|
|
Grid.Row="1"
|
|
Margin="0, 30"
|
|
Content="{Binding MyFlyoutContent, Source={x:Reference fl}}"/>
|
|
|
|
|
|
<VerticalStackLayout Grid.Row="2"
|
|
Margin="0, 20">
|
|
<!-- Footer -->
|
|
<Button Text="Déconnection" ImageSource="logout_icon.png"
|
|
Style="{StaticResource button2}"
|
|
IsVisible="{Binding CurrentConnected, Converter={toolkit:IsNotNullConverter}}"
|
|
Clicked="Logout_Clicked"/>
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
|
|
</ContentView>
|