Ajout de la loginPage et modification du code

pull/1/head
Matheo HERSAN 2 years ago
parent 021e09e2a9
commit 708a63c2cc

@ -1,4 +1,6 @@
namespace MangaMap;
using MangaMap.Views;
namespace MangaMap;
public partial class App : Application
{
@ -7,5 +9,6 @@ public partial class App : Application
InitializeComponent();
MainPage = new AppShell();
}
}

@ -4,13 +4,17 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MangaMap"
xmlns:Views="clr-namespace:MapManga.Views"
Shell.FlyoutBehavior="Disabled">
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
xmlns:Views="clr-namespace:MangaMap.Views">
<TabBar>
<Tab Title="HomePage">
<ShellContent
ContentTemplate="{DataTemplate Views:homePage}" />
</Tab>
<Tab Title="loginPage">
<ShellContent
ContentTemplate="{DataTemplate Views:loginPage}" />
</Tab>
</TabBar>
</Shell>

@ -3,70 +3,23 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MangaMap.MainPage">
<ScrollView
BackgroundColor="Black">
<ScrollView>
<VerticalStackLayout
Spacing="70"
Spacing="25"
Padding="30,0"
VerticalOptions="Center">
<SearchBar Placeholder="Recherche"
CancelButtonColor="Orange"
TextColor="Purple"
HorizontalTextAlignment="Center"
Margin="30"
/>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Red"
/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Orange"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Blue"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Purple"/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Purple"
/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Green"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Gray"/>
<Image
Source="dotnet_bot.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
HeightRequest="200"
HorizontalOptions="Center" />
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Yellow"/>
</HorizontalStackLayout>
<Label
Text="Hello, World!"
SemanticProperties.HeadingLevel="Level1"
FontSize="32"
HorizontalOptions="Center" />
<Label
Text="Welcome to .NET Multi-platform App UI"
@ -85,4 +38,5 @@
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -52,4 +52,19 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\loginPage.xaml.cs">
<DependentUpon>loginPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\homePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\loginPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

@ -0,0 +1,74 @@
<?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="MangaMap.Views.homePage"
Title="homePage">
<ScrollView
BackgroundColor="Black">
<VerticalStackLayout
Spacing="70"
VerticalOptions="Center">
<SearchBar Placeholder="Recherche"
CancelButtonColor="Orange"
TextColor="Purple"
HorizontalTextAlignment="Center"
Margin="30"
/>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Red"
/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Orange"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Blue"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Purple"/>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="100"
HorizontalOptions="Center">
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Purple"
/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Green"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Gray"/>
<Rectangle
WidthRequest="150"
HeightRequest="150"
Fill="Yellow"/>
</HorizontalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,10 @@
namespace MangaMap.Views;
public partial class homePage : ContentPage
{
public homePage()
{
InitializeComponent();
}
}

@ -0,0 +1,26 @@
<?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="MangaMap.Views.loginPage"
Title="loginPage">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="S'inscrire a MapManga" FontSize="Large" Margin="0,0,0,20"/>
<Entry Placeholder="Email" Margin="0,0,0,10" />
<Entry Placeholder="Nom d'utilisateur" Margin="0,0,0,10" />
<Entry Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,10" />
<Entry Placeholder="Confirmer le mot de passe" IsPassword="True" Margin="0,0,0,20" />
<Button Text="S'inscire" Clicked="OnLoginClicked" BackgroundColor="MediumPurple"/>
</StackLayout>
</ContentPage>

@ -0,0 +1,14 @@
namespace MangaMap.Views;
public partial class loginPage : ContentPage
{
public loginPage()
{
InitializeComponent();
}
private void OnLoginClicked(object sender, EventArgs e)
{
//
}
}
Loading…
Cancel
Save