Menu de navigation + Début page d'acceuil (Xaml)

devGuillaume
Yoan BRUGIÈRE 2 years ago
parent 4c6f19e3a7
commit a70d3003e7

Binary file not shown.

@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}

@ -4,45 +4,63 @@
x:Class="Ohara.MainPage"
BackgroundColor="#e2edf1">
<ScrollView>
<Grid
Margin="20,35,20,20">
<Grid.RowDefinitions>
<RowDefinition Height="300" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle WidthRequest="200" HeightRequest="300" HorizontalOptions="Start" BackgroundColor="#72a3b3">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Color="#cdffd8" Offset="0.0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<VerticalStackLayout BackgroundColor="#72a3b3" Grid.Row="0" Grid.Column="0" Spacing="10">
<Image Source="ohara2.png" HeightRequest="300" HorizontalOptions="Center">
<Image.Clip>
<EllipseGeometry Center="150,90" RadiusX="80" RadiusY="80"/>
</Image.Clip>
</Image>
<Button Style="{StaticResource buttonMenu}" Text="Acceuil"/>
<Button Style="{StaticResource buttonMenu}" Text="Carte"/>
<Button Style="{StaticResource buttonMenu}" Text="Personnages"/>
<Button Style="{StaticResource buttonMenu}" Text="Fruits du démon"/>
<Button Style="{StaticResource buttonMenu}" Text="Bateaux"/>
<Button Style="{StaticResource buttonMenu}" Text="Îles"/>
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/>
<Button Style="{StaticResource buttonMenu}" Text="Équipages"/>
</VerticalStackLayout>
<VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40" Margin="0,20,0,0">
<Frame CornerRadius="20" WidthRequest="600" HeightRequest="75">
<Label Text="Bienvenue dans Ohara !" FontAttributes="Bold" FontSize="30" HorizontalOptions="Center" TextColor="White"/>
<Frame.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#cdffd8" Offset="0.1" />
<GradientStop Color="#94b9ff" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Frame.Background>
</Frame>
<Frame CornerRadius="20" BorderColor="#72a3b3" BackgroundColor="#72a3b3" Padding="20" WidthRequest="600" HeightRequest="500" >
<Label Text="Présentation :" FontAttributes="Bold" FontSize="30" HorizontalOptions="Center" TextColor="White"/>
</Frame>
</VerticalStackLayout>
<Frame CornerRadius="20" BorderColor="#72a3b3" BackgroundColor="#72a3b3" Padding="20" WidthRequest="600" Grid.Row="1" Grid.Column="1"/>
<Label Text="Présentation :" FontAttributes="Bold" FontSize="30" HorizontalOptions="Center" TextColor="White" Grid.Row="1" Grid.Column="1"/>
<!--<Rectangle WidthRequest="200" HeightRequest="300" HorizontalOptions="Start" BackgroundColor="#72a3b3">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Color="#cdffd8" Offset="0.0" />-->
<!--<GradientStop Color="#94b9ff" Offset="1.0" /></LinearGradientBrush></Rectangle.Fill></Rectangle>-->
<Image
Source="ohara2.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
HeightRequest="400"
HorizontalOptions="Center"
Grid.Row="0"
Grid.Column="0"/>
</Grid>
</Grid>
</ScrollView>
</ContentPage>

@ -1,4 +1,6 @@
namespace Ohara;
using Microsoft.Maui.Platform;
namespace Ohara;
public partial class MainPage : ContentPage
{
@ -8,17 +10,5 @@ public partial class MainPage : ContentPage
{
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="Ohara.NewPage1"
Title="NewPage1">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

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

@ -52,4 +52,10 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="NewPage1.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>

@ -25,7 +25,7 @@
<Style TargetType="Button">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Primary}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="#bfe5ef"/>
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="CornerRadius" Value="8"/>
@ -402,4 +402,13 @@
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="Button" x:Key="buttonMenu">
<Setter Property="BackgroundColor" Value="#bfe5ef"/>
<Setter Property="FontFamily" Value="OpenSans"/>
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="FontSize" Value="20"/>
<Setter Property="CornerRadius" Value="0"/>
<Setter Property="WidthRequest" Value="250"/>
</Style>
</ResourceDictionary>

Loading…
Cancel
Save