Création d'une page vide de connexion et quelques modifications du appshell

master
Céleste BARBOSA 1 year ago
parent 4b4ca3a308
commit d1e1e892b5

@ -4,12 +4,18 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:mastermind" xmlns:local="clr-namespace:mastermind"
xmlns:pages="clr-namespace:mastermind.Pages"
Shell.FlyoutBehavior="Disabled" Shell.FlyoutBehavior="Disabled"
Title="mastermind"> Title="mastermind">
<ShellContent <TabBar>
Title="Home" <Tab>
ContentTemplate="{DataTemplate local:MainPage}" <ShellContent Title="Connexion"
Route="MainPage" /> ContentTemplate="{DataTemplate local:Connexion}" />
<ShellContent
Title="NewPage1"
ContentTemplate="{DataTemplate pages:NewPage1}" />
</Tab>
</TabBar>
</Shell> </Shell>

@ -0,0 +1,7 @@
<?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="mastermind.Connexion">
</ContentPage>

@ -0,0 +1,10 @@
namespace mastermind
{
public partial class Connexion : ContentPage
{
public Connexion()
{
InitializeComponent();
}
}
}

@ -1,36 +0,0 @@
<?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="mastermind.MainPage">
<ScrollView>
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<Image
Source="dotnet_bot.png"
HeightRequest="185"
Aspect="AspectFit"
SemanticProperties.Description="dot net bot in a race car number eight" />
<Label
Text="Hello, World!"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
<Label
Text="Welcome to &#10;.NET Multi-platform App UI"
Style="{StaticResource SubHeadline}"
SemanticProperties.HeadingLevel="Level2"
SemanticProperties.Description="Welcome to dot net Multi platform App U I" />
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -1,25 +0,0 @@
namespace mastermind
{
public partial class MainPage : ContentPage
{
int count = 0;
public MainPage()
{
InitializeComponent();
}
private void OnCounterClicked(object sender, EventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
}
}
}

@ -0,0 +1,12 @@
<?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="mastermind.Pages.NewPage1"
Title="NewPage1">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace mastermind.Pages;
public partial class NewPage1 : ContentPage
{
public NewPage1()
{
InitializeComponent();
}
}

@ -62,4 +62,16 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="Connexion.xaml.cs">
<DependentUpon>Connexion.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Pages\NewPage1.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project> </Project>

Loading…
Cancel
Save