vue victoire

master
Pauline PRADY 1 year ago
parent f05a0f997d
commit 0157d26db1

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

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

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

@ -3,17 +3,33 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiSpark.Pages.Victoire" x:Class="MauiSpark.Pages.Victoire"
xmlns:pages="clr-namespace:MauiSpark.Pages" xmlns:pages="clr-namespace:MauiSpark.Pages"
xmlns:vues="clr-namespace:MauiSpark.Vues"
Title="Victoire"> Title="Victoire">
<VerticalStackLayout>
<Grid WidthRequest="80" Margin="20"></Grid> <Grid
<FlexLayout Direction="Row" JustifyContent="SpaceAround" AlignContent="Center" VerticalOptions="Center" Margin="10" > ColumnDefinitions="*"
<Image Source="trophy.jpg" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="0" /> RowDefinitions="*, auto, *">
<Label Text="{Binding [0]}" Style="{StaticResource TexteTitre}" Margin="0" />
<Image Source="trophy.jpg" Grid.Row="1" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="0" /> <Grid
</FlexLayout> ColumnDefinitions="*, *, *"
<Frame Margin="40" > RowDefinitions="*">
<Label HorizontalOptions="Center" Text="{Binding [1]}" Style="{StaticResource TexteFrame}"/>
<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> </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> </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 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 public string Texte
{ {
get => (string)GetValue(TextePropriete); get => (string)GetValue(TexteProperty);
set => SetValue(TextePropriete, value.ToUpper()); set => SetValue(TexteProperty, value.ToUpper());
} }
public TitreVue() public TitreVue()

Loading…
Cancel
Save