vue victoire

master
Pauline PRADY 11 months ago
parent f05a0f997d
commit 0157d26db1

@ -8,7 +8,7 @@ namespace MauiSpark
{
InitializeComponent();
MainPage = new NavigationPage(new AccueilPage());
MainPage = new NavigationPage(new Victoire());
MainPage.Title = "Mastermind";
}
}

@ -112,6 +112,9 @@
<MauiXaml Update="Vues\BoutonReglesVue.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Vues\ImageResultatVue.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Vues\JetonVue.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -103,7 +103,6 @@
BindableLayout.ItemsSource="{Binding Code.Jetons}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<vues:JetonVue Couleur="{Binding Couleur, Converter={StaticResource conv:CouleurVersCouleurMAUI}}"/>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>

@ -3,17 +3,33 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiSpark.Pages.Victoire"
xmlns:pages="clr-namespace:MauiSpark.Pages"
xmlns:vues="clr-namespace:MauiSpark.Vues"
Title="Victoire">
<VerticalStackLayout>
<Grid WidthRequest="80" Margin="20"></Grid>
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" Margin="10" >
<Image Source="trophy.jpg" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="0" />
<Label Text="{Binding [0]}" Style="{StaticResource TexteTitre}" Margin="0" />
<Image Source="trophy.jpg" Grid.Row="1" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="0" />
</FlexLayout>
<Frame Margin="40" >
<Label HorizontalOptions="Center" Text="{Binding [1]}" Style="{StaticResource TexteFrame}"/>
<Grid
ColumnDefinitions="*"
RowDefinitions="*, auto, *">
<Grid
ColumnDefinitions="*, *, *"
RowDefinitions="*">
<vues:ImageResultatVue HorizontalOptions="Start"/>
<vues:TitreVue Texte="{Binding [0]}" Grid.Column="1"/>
<vues:ImageResultatVue Grid.Column="2" HorizontalOptions="End"/>
</Grid>
<Frame Grid.Row="1">
<Label HorizontalOptions="Center" Text="{Binding [1]}"/>
</Frame>
<Button Text="Menu" VerticalOptions="End" HorizontalOptions="Center" Clicked="QuandMenuPresse"/>
</VerticalStackLayout>
<Button
Grid.Row="2"
Text="Menu"
VerticalOptions="Center"
Margin="0, 50"
Clicked="QuandMenuPresse"/>
</Grid>
</ContentPage>

@ -0,0 +1,13 @@
<?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"
x:Class="MauiSpark.Vues.ImageResultatVue"
x:Name="ImageResultat">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentView>

@ -0,0 +1,18 @@
namespace MauiSpark.Vues;
public partial class ImageResultatVue : ContentView
{
public static readonly BindableProperty TexteProperty = BindableProperty.Create(nameof(Texte), typeof(string), typeof(TitreVue), default(string));
public string Image
{
get => (string)GetValue(TexteProperty);
set => SetValue(TexteProperty, value.ToUpper());
}
public ImageResultatVue()
{
InitializeComponent();
BindingContext = this;
}
}

@ -2,12 +2,12 @@ namespace MauiSpark.Vues;
public partial class TitreVue : ContentView
{
public static readonly BindableProperty TextePropriete = BindableProperty.Create(nameof(Texte), typeof(string), typeof(TitreVue), default(string));
public static readonly BindableProperty TexteProperty = BindableProperty.Create(nameof(Texte), typeof(string), typeof(TitreVue), default(string));
public string Texte
{
get => (string)GetValue(TextePropriete);
set => SetValue(TextePropriete, value.ToUpper());
get => (string)GetValue(TexteProperty);
set => SetValue(TexteProperty, value.ToUpper());
}
public TitreVue()

Loading…
Cancel
Save