diff --git a/Sources/MauiApp1.sln b/Sources/MauiApp1.sln
index 479437a..47efaef 100644
--- a/Sources/MauiApp1.sln
+++ b/Sources/MauiApp1.sln
@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp1", "MauiApp1\MauiApp1.csproj", "{7657E17E-5DF9-42C5-89F0-6F1A3F3D5241}"
+ ProjectSection(ProjectDependencies) = postProject
+ {54AA1F79-DA85-4E12-8D6E-94A9C57E36DD} = {54AA1F79-DA85-4E12-8D6E-94A9C57E36DD}
+ EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{54AA1F79-DA85-4E12-8D6E-94A9C57E36DD}"
EndProject
diff --git a/Sources/MauiApp1/MainPage.xaml b/Sources/MauiApp1/MainPage.xaml
index 727041d..a4c0868 100644
--- a/Sources/MauiApp1/MainPage.xaml
+++ b/Sources/MauiApp1/MainPage.xaml
@@ -3,39 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Sources/MauiApp1/MainPage.xaml.cs b/Sources/MauiApp1/MainPage.xaml.cs
index f076af5..f1a8dc4 100644
--- a/Sources/MauiApp1/MainPage.xaml.cs
+++ b/Sources/MauiApp1/MainPage.xaml.cs
@@ -1,24 +1,25 @@
-namespace MauiApp1;
+using Model;
+using System.Diagnostics;
+
+namespace MauiApp1;
public partial class MainPage : ContentPage
{
- int count = 0;
-
- public MainPage()
- {
- InitializeComponent();
- }
-
- private void OnCounterClicked(object sender, EventArgs e)
- {
- count++;
+ public Carte MaCarte { get; private set; }
+ = new Carte("Villageois", "Il peut voter", "Soit attentif", null, "image", "Le villageois n'est pas une carte très aprécié");
- if (count == 1)
- CounterBtn.Text = $"Clicked {count} time";
- else
- CounterBtn.Text = $"Clicked {count} times";
+ public MainPage()
+ {
+ InitializeComponent();
+ BindingContext = MaCarte;
+ }
- SemanticScreenReader.Announce(CounterBtn.Text);
- }
+ void Button_Clicked(object sender, EventArgs e)
+ {
+ Debug.WriteLine($"Just before MaCarte modification: {MaCarte}");
+ MaCarte.Note = 5;
+ MaCarte.Description = "Une super carte !";
+ Debug.WriteLine($"Just after MaCarte modification: {MaCarte}");
+ }
}
diff --git a/Sources/MauiApp1/MauiApp1.csproj b/Sources/MauiApp1/MauiApp1.csproj
index cd5cfc5..50dd9d6 100644
--- a/Sources/MauiApp1/MauiApp1.csproj
+++ b/Sources/MauiApp1/MauiApp1.csproj
@@ -51,4 +51,8 @@
+
+
+
+
diff --git a/Sources/MauiApp1/Platforms/Android/MainActivity.cs b/Sources/MauiApp1/Platforms/Android/MainActivity.cs
index e668e47..0088824 100644
--- a/Sources/MauiApp1/Platforms/Android/MainActivity.cs
+++ b/Sources/MauiApp1/Platforms/Android/MainActivity.cs
@@ -2,7 +2,7 @@
using Android.Content.PM;
using Android.OS;
-namespace MauiApp1;
+namespace MauiApp1.Platforms.Android;
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
diff --git a/Sources/MauiApp1/Platforms/Android/MainApplication.cs b/Sources/MauiApp1/Platforms/Android/MainApplication.cs
index b6a685a..0cf2c25 100644
--- a/Sources/MauiApp1/Platforms/Android/MainApplication.cs
+++ b/Sources/MauiApp1/Platforms/Android/MainApplication.cs
@@ -1,15 +1,15 @@
using Android.App;
using Android.Runtime;
-namespace MauiApp1;
+namespace MauiApp1.Platforms.Android;
[Application]
public class MainApplication : MauiApplication
{
- public MainApplication(IntPtr handle, JniHandleOwnership ownership)
- : base(handle, ownership)
- {
- }
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
- protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
diff --git a/Sources/MauiApp1/Resources/Images/Thumbs.db b/Sources/MauiApp1/Resources/Images/Thumbs.db
deleted file mode 100644
index 1027a80..0000000
Binary files a/Sources/MauiApp1/Resources/Images/Thumbs.db and /dev/null differ
diff --git a/Sources/MauiApp1/Resources/Images/notFound.jpg b/Sources/MauiApp1/Resources/Images/notFound.jpg
deleted file mode 100644
index bdb7931..0000000
Binary files a/Sources/MauiApp1/Resources/Images/notFound.jpg and /dev/null differ