fix bug navigation (fleche back en haut de la mainpage) + ajout d'une scrollview pour les petits écrans

Popup_qui_marche_pas
Anthony RICHARD 2 years ago
parent 0b97741f7c
commit 83fbe2c23b

@ -3,41 +3,45 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Stim.LoginPage" x:Class="Stim.LoginPage"
Title="LoginPage"> Title="LoginPage">
<Grid BackgroundColor="{StaticResource Tertiary}" ColumnDefinitions="*, 5*, *" RowDefinitions="auto, *"> <ScrollView>
<VerticalStackLayout BackgroundColor="Black" Grid.Column="0"/> <Grid BackgroundColor="{StaticResource Tertiary}" ColumnDefinitions="*, 5*, *" RowDefinitions="auto, *">
<VerticalStackLayout BackgroundColor="Black" Grid.Column="2"/> <VerticalStackLayout BackgroundColor="Black" Grid.Column="0"/>
<VerticalStackLayout BackgroundColor="Black" Grid.Column="0" Grid.Row="1"/> <VerticalStackLayout BackgroundColor="Black" Grid.Column="2"/>
<VerticalStackLayout BackgroundColor="Black" Grid.Column="2" Grid.Row="1"/> <VerticalStackLayout BackgroundColor="Black" Grid.Column="0" Grid.Row="1"/>
<Grid Grid.Column="1" RowDefinitions="500, auto, auto"> <VerticalStackLayout BackgroundColor="Black" Grid.Column="2" Grid.Row="1"/>
<Image Source="no_cover.png" HeightRequest="490" Margin="0,10,0,0"/> <Grid Grid.Column="1" RowDefinitions="500, auto, auto">
<Grid Grid.Row="1" RowDefinitions="auto, auto, auto"> <Image Source="no_cover.png" HeightRequest="490" Margin="0,10,0,0"/>
<Entry Placeholder="Username" PlaceholderColor="{StaticResource Primary}" <Grid Grid.Row="1" RowDefinitions="auto, auto, auto">
IsPassword="False" <Entry Placeholder="Username" PlaceholderColor="{StaticResource Primary}"
x:Name="Username" IsPassword="False"
HeightRequest="50" x:Name="Username"
ClearButtonVisibility="WhileEditing"/>
<Entry Placeholder="Mot de passe"
PlaceholderColor="{StaticResource Primary}"
IsPassword="True" x:Name="Pswd"
HeightRequest="50"
Grid.Row="1"
ClearButtonVisibility="WhileEditing"/>
<Grid Grid.Row="2"
Margin="10,0,0,10" ColumnDefinitions="3*, *">
<Button Text="Se connecter"
Clicked="Se_connecter"
HeightRequest="50" HeightRequest="50"
BackgroundColor="{StaticResource Gray500}"/> ClearButtonVisibility="WhileEditing"
<Button Text="Créer un compte" Text="anthony"/>
Clicked="Creer_un_compte" <Entry Placeholder="Mot de passe"
PlaceholderColor="{StaticResource Primary}"
IsPassword="True" x:Name="Pswd"
HeightRequest="50" HeightRequest="50"
BackgroundColor="{StaticResource Gray500}" Grid.Row="1"
Grid.Column="1"/> ClearButtonVisibility="WhileEditing"
Text="anthony5"/>
<Grid Grid.Row="2"
Margin="10,0,0,10" ColumnDefinitions="3*, *">
<Button Text="Se connecter"
Clicked="Se_connecter"
HeightRequest="50"
BackgroundColor="{StaticResource Gray500}"/>
<Button Text="Créer un compte"
Clicked="Creer_un_compte"
HeightRequest="50"
BackgroundColor="{StaticResource Gray500}"
Grid.Column="1"/>
</Grid>
</Grid> </Grid>
<HorizontalStackLayout x:Name="Error" Grid.Row="2" HorizontalOptions="Center">
</HorizontalStackLayout>
</Grid> </Grid>
<HorizontalStackLayout x:Name="Error" Grid.Row="2" HorizontalOptions="Center">
</HorizontalStackLayout>
</Grid> </Grid>
</Grid> </ScrollView>
</ContentPage> </ContentPage>

@ -22,7 +22,7 @@ public partial class LoginPage : ContentPage
{ {
((App)App.Current).Manager.CurrentUser = user; ((App)App.Current).Manager.CurrentUser = user;
Application.Current.MainPage = new AppShell(); Application.Current.MainPage = new AppShell();
await Shell.Current.GoToAsync("//MainPage"); await Navigation.PushModalAsync(new MainPage());//Shell.Current.GoToAsync("//MainPage");
} }
else Error.Children.Add(new Label { Text = "Mot de passe incorrect", else Error.Children.Add(new Label { Text = "Mot de passe incorrect",
TextColor = Colors.Red, TextColor = Colors.Red,

Loading…
Cancel
Save