diff --git a/Samples.sln b/Samples.sln
index ffedb54..6012216 100644
--- a/Samples.sln
+++ b/Samples.sln
@@ -29,6 +29,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ch04_Navigation", "ch04_Nav
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_ShellRoutes", "ch04_Navigation\ex_ShellRoutes\ex_ShellRoutes.csproj", "{1559C59B-727D-402D-A140-30B111DBF224}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_CustomThemes", "ch02_DesigningViews\ex_CustomThemes\ex_CustomThemes.csproj", "{E1F1F0CA-6E77-414E-B6D0-3302D850121C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ch06_Others", "ch06_Others", "{CD52E1B3-6246-4940-88A1-1313E1273839}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_Preferences", "ch06_Others\ex_Preferences\ex_Preferences.csproj", "{1D959883-1D6E-4E29-A575-69173C9BBC97}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_Localization", "ch06_Others\ex_Localization\ex_Localization.csproj", "{9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_Localization2", "ch06_Others\ex_Localization2\ex_Localization2.csproj", "{17CBE4C6-9579-4B76-9520-F902C932C535}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_Localization3", "ch06_Others\ex_Localization3\ex_Localization3.csproj", "{94DB81BA-1FCB-4E65-B1AD-BA68B445C457}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,6 +93,26 @@ Global
{1559C59B-727D-402D-A140-30B111DBF224}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1559C59B-727D-402D-A140-30B111DBF224}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1559C59B-727D-402D-A140-30B111DBF224}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E1F1F0CA-6E77-414E-B6D0-3302D850121C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E1F1F0CA-6E77-414E-B6D0-3302D850121C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E1F1F0CA-6E77-414E-B6D0-3302D850121C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E1F1F0CA-6E77-414E-B6D0-3302D850121C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1D959883-1D6E-4E29-A575-69173C9BBC97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1D959883-1D6E-4E29-A575-69173C9BBC97}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1D959883-1D6E-4E29-A575-69173C9BBC97}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1D959883-1D6E-4E29-A575-69173C9BBC97}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {17CBE4C6-9579-4B76-9520-F902C932C535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {17CBE4C6-9579-4B76-9520-F902C932C535}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {17CBE4C6-9579-4B76-9520-F902C932C535}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {17CBE4C6-9579-4B76-9520-F902C932C535}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94DB81BA-1FCB-4E65-B1AD-BA68B445C457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94DB81BA-1FCB-4E65-B1AD-BA68B445C457}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94DB81BA-1FCB-4E65-B1AD-BA68B445C457}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94DB81BA-1FCB-4E65-B1AD-BA68B445C457}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -96,5 +128,10 @@ Global
{5F26E535-4541-4C99-BD92-2DDB4EB65705} = {E9273679-4D52-465F-8C23-8096DD8C2A7B}
{CE13BDA5-D5E5-42A2-BF2B-17942919E7E6} = {E9273679-4D52-465F-8C23-8096DD8C2A7B}
{1559C59B-727D-402D-A140-30B111DBF224} = {0E6296E1-F020-4A0D-9F98-4284F38FD68B}
+ {E1F1F0CA-6E77-414E-B6D0-3302D850121C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9}
+ {1D959883-1D6E-4E29-A575-69173C9BBC97} = {CD52E1B3-6246-4940-88A1-1313E1273839}
+ {9F174F30-18D0-4B6B-A8E0-A4D0EB12FBEE} = {CD52E1B3-6246-4940-88A1-1313E1273839}
+ {17CBE4C6-9579-4B76-9520-F902C932C535} = {CD52E1B3-6246-4940-88A1-1313E1273839}
+ {94DB81BA-1FCB-4E65-B1AD-BA68B445C457} = {CD52E1B3-6246-4940-88A1-1313E1273839}
EndGlobalSection
EndGlobal
diff --git a/ch02_DesigningViews/ex_CustomThemes/App.xaml b/ch02_DesigningViews/ex_CustomThemes/App.xaml
new file mode 100644
index 0000000..15cc82a
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/App.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/App.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/App.xaml.cs
new file mode 100644
index 0000000..7c27b93
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace ex_CustomThemes;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml b/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml
new file mode 100644
index 0000000..55b9b3b
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml.cs
new file mode 100644
index 0000000..4989883
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_CustomThemes;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml b/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml
new file mode 100644
index 0000000..007e219
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dark
+ Light
+ Color Blind
+
+
+
+
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml.cs
new file mode 100644
index 0000000..7dcd57f
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/MainPage.xaml.cs
@@ -0,0 +1,95 @@
+namespace ex_CustomThemes;
+using System.Linq;
+
+public partial class MainPage : ContentPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+
+ // Application.Current.RequestedThemeChanged += (s, a) =>
+ // {
+ // if(Preferences.Default.Get("Theme", null) != "System")
+ // {
+ // return;
+ // }
+ // ResourceDictionary chosenTheme = Application.Current.RequestedTheme switch
+ // {
+ // AppTheme.Light => new LightTheme(),
+ // AppTheme.Dark => new DarkTheme(),
+ // _ => new LightTheme()
+ // };
+
+ // ICollection mergedDictionaries = Application.Current.Resources.MergedDictionaries;
+ // if (mergedDictionaries != null)
+ // {
+ // foreach(var dico in mergedDictionaries.Where(d => d is ICustomThemes).ToList())
+ // {
+ // mergedDictionaries.Remove(dico);
+ // }
+ // mergedDictionaries.Add(chosenTheme);
+ // }
+ // };
+
+ }
+
+ void picker_SelectedIndexChanged(object source, EventArgs args)
+ {
+ string? chosenThemeString = picker.SelectedItem as string;
+
+ ResourceDictionary chosenTheme = chosenThemeString switch
+ {
+ "Dark" => new DarkTheme(),
+ "Light" => new LightTheme(),
+ "Color Blind" => new ColorBlindTheme(),
+ _ => new LightTheme()
+ };
+
+ ICollection mergedDictionaries = Application.Current.Resources.MergedDictionaries;
+ if (mergedDictionaries != null)
+ {
+ foreach(var dico in mergedDictionaries.Where(d => d is ICustomTheme).ToList())
+ {
+ mergedDictionaries.Remove(dico);
+ }
+ mergedDictionaries.Add(chosenTheme);
+ }
+
+ // ResourceDictionary chosenTheme;
+ // switch(chosenThemeString)
+ // {
+ // case "Dark":
+ // chosenTheme = new DarkTheme();
+ // Preferences.Default.Set("Theme", "Dark");
+ // break;
+ // case "Light":
+ // chosenTheme = new LightTheme();
+ // Preferences.Default.Set("Theme", "Light");
+ // break;
+ // case "Color Blind":
+ // chosenTheme = new ColorBlindTheme();
+ // Preferences.Default.Set("Theme", "Color Blind");
+ // break;
+ // default:
+ // Preferences.Default.Set("Theme", "System");
+ // chosenTheme = Application.Current.RequestedTheme switch
+ // {
+ // AppTheme.Light => new LightTheme(),
+ // AppTheme.Dark => new DarkTheme(),
+ // _ => new LightTheme()
+ // };
+ // break;
+ // };
+
+ // ICollection mergedDictionaries = Application.Current.Resources.MergedDictionaries;
+ // if (mergedDictionaries != null)
+ // {
+ // foreach(var dico in mergedDictionaries.Where(d => d is ICustomThemes).ToList())
+ // {
+ // mergedDictionaries.Remove(dico);
+ // }
+ // mergedDictionaries.Add(chosenTheme);
+ // }
+ }
+}
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/MauiProgram.cs b/ch02_DesigningViews/ex_CustomThemes/MauiProgram.cs
new file mode 100644
index 0000000..5e55331
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace ex_CustomThemes;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/AndroidManifest.xml b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..bdec9b5
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainActivity.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..b810a24
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace ex_CustomThemes;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainApplication.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..2bd1577
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace ex_CustomThemes;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/Resources/values/colors.xml b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..5cd1604
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/AppDelegate.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..9131d5f
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_CustomThemes;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Entitlements.plist b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..8e87c0c
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Info.plist b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..f24aacc
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Program.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..2062b9c
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_CustomThemes;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/Main.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..d4a6954
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/Main.cs
@@ -0,0 +1,16 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace ex_CustomThemes;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/tizen-manifest.xml b/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..2739aa6
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..4017a3e
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..20e1c29
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace ex_CustomThemes.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/Package.appxmanifest b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..8c3cd67
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/app.manifest b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..9b92bb6
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/AppDelegate.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..9131d5f
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_CustomThemes;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Info.plist b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..358337b
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Program.cs b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..2062b9c
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_CustomThemes;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Properties/launchSettings.json b/ch02_DesigningViews/ex_CustomThemes/Properties/launchSettings.json
new file mode 100644
index 0000000..c16206a
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appicon.svg b/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..5f04fcf
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appiconfg.svg b/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Regular.ttf b/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..d2887c8
Binary files /dev/null and b/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Semibold.ttf b/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..20060c4
Binary files /dev/null and b/ch02_DesigningViews/ex_CustomThemes/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Images/dotnet_bot.png b/ch02_DesigningViews/ex_CustomThemes/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/ch02_DesigningViews/ex_CustomThemes/Resources/Images/dotnet_bot.png differ
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Raw/AboutAssets.txt b/ch02_DesigningViews/ex_CustomThemes/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..f22d3bf
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Splash/splash.svg b/ch02_DesigningViews/ex_CustomThemes/Resources/Splash/splash.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Colors.xaml b/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..22f0a67
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Styles.xaml b/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..d600a7f
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Styles/Styles.xaml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml
new file mode 100644
index 0000000..717ca14
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml
@@ -0,0 +1,10 @@
+
+
+ #92CCDC
+ #E1C2CE
+
+ #163D42
+ #446E77
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml.cs
new file mode 100644
index 0000000..8a645b2
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ColorBlindTheme.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_CustomThemes;
+
+public partial class ColorBlindTheme : ResourceDictionary, ICustomTheme
+{
+ public ColorBlindTheme()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml
new file mode 100644
index 0000000..adea402
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml
@@ -0,0 +1,12 @@
+
+
+
+ #2F2883
+ #36743B
+
+ #96CBEA
+ #DBCB82
+
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml.cs
new file mode 100644
index 0000000..37ce1cd
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/DarkTheme.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_CustomThemes;
+
+public partial class DarkTheme : ResourceDictionary, ICustomTheme
+{
+ public DarkTheme()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ICustomTheme.cs b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ICustomTheme.cs
new file mode 100644
index 0000000..a200793
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/ICustomTheme.cs
@@ -0,0 +1,6 @@
+namespace ex_CustomThemes;
+
+public interface ICustomTheme
+{
+
+}
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml
new file mode 100644
index 0000000..f3fa816
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml
@@ -0,0 +1,10 @@
+
+
+ #96CBEA
+ #DBCB82
+
+ #2F2883
+ #36743B
+
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml.cs b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml.cs
new file mode 100644
index 0000000..3b1c799
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/Resources/Themes/LightTheme.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_CustomThemes;
+
+public partial class LightTheme : ResourceDictionary, ICustomTheme
+{
+ public LightTheme()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/ch02_DesigningViews/ex_CustomThemes/ex_CustomThemes.csproj b/ch02_DesigningViews/ex_CustomThemes/ex_CustomThemes.csproj
new file mode 100644
index 0000000..856c33b
--- /dev/null
+++ b/ch02_DesigningViews/ex_CustomThemes/ex_CustomThemes.csproj
@@ -0,0 +1,65 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ ex_CustomThemes
+ true
+ true
+ enable
+ enable
+
+
+ ex_CustomThemes
+
+
+ fr.uca.iut.ex_customthemes
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/App.xaml b/ch06_Others/ex_Localization/App.xaml
new file mode 100644
index 0000000..9be977c
--- /dev/null
+++ b/ch06_Others/ex_Localization/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/App.xaml.cs b/ch06_Others/ex_Localization/App.xaml.cs
new file mode 100644
index 0000000..c3adbda
--- /dev/null
+++ b/ch06_Others/ex_Localization/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace ex_Localization;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/ch06_Others/ex_Localization/AppShell.xaml b/ch06_Others/ex_Localization/AppShell.xaml
new file mode 100644
index 0000000..f57f1a9
--- /dev/null
+++ b/ch06_Others/ex_Localization/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/AppShell.xaml.cs b/ch06_Others/ex_Localization/AppShell.xaml.cs
new file mode 100644
index 0000000..fb97895
--- /dev/null
+++ b/ch06_Others/ex_Localization/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_Localization;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/ch06_Others/ex_Localization/MainPage.xaml b/ch06_Others/ex_Localization/MainPage.xaml
new file mode 100644
index 0000000..a4fbe4f
--- /dev/null
+++ b/ch06_Others/ex_Localization/MainPage.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+ en
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/MainPage.xaml.cs b/ch06_Others/ex_Localization/MainPage.xaml.cs
new file mode 100644
index 0000000..f3d3473
--- /dev/null
+++ b/ch06_Others/ex_Localization/MainPage.xaml.cs
@@ -0,0 +1,30 @@
+using System.Globalization;
+using ex_Localization.Resources.Localization;
+
+namespace ex_Localization;
+
+public partial class MainPage : ContentPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ void picker_SelectedIndexChanged(object source, EventArgs args)
+ {
+ string? chosenCultureString = picker.SelectedItem as string;
+
+ CultureInfo chosenCulture = chosenCultureString switch
+ {
+ "fr-FR" => new CultureInfo("fr-FR"),
+ "en" => new CultureInfo("en"),
+ "ca-ES" => new CultureInfo("ca-ES"),
+ "es-ES" => new CultureInfo("es-ES"),
+ "it" => new CultureInfo("it"),
+ _ => new CultureInfo("en")
+ };
+
+ AppResources.Culture = chosenCulture;
+ }
+}
+
diff --git a/ch06_Others/ex_Localization/MauiProgram.cs b/ch06_Others/ex_Localization/MauiProgram.cs
new file mode 100644
index 0000000..6d73a82
--- /dev/null
+++ b/ch06_Others/ex_Localization/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace ex_Localization;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+}
diff --git a/ch06_Others/ex_Localization/Platforms/Android/AndroidManifest.xml b/ch06_Others/ex_Localization/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..bdec9b5
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Platforms/Android/MainActivity.cs b/ch06_Others/ex_Localization/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..060aa92
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace ex_Localization;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+}
diff --git a/ch06_Others/ex_Localization/Platforms/Android/MainApplication.cs b/ch06_Others/ex_Localization/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..0429269
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace ex_Localization;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization/Platforms/Android/Resources/values/colors.xml b/ch06_Others/ex_Localization/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..5cd1604
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Platforms/MacCatalyst/AppDelegate.cs b/ch06_Others/ex_Localization/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..4258c1f
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization/Platforms/MacCatalyst/Entitlements.plist b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..8e87c0c
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/MacCatalyst/Info.plist b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..678ab83
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/MacCatalyst/Program.cs b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..d27a01c
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization/Platforms/Tizen/Main.cs b/ch06_Others/ex_Localization/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..9c1579c
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Tizen/Main.cs
@@ -0,0 +1,16 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace ex_Localization;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+}
diff --git a/ch06_Others/ex_Localization/Platforms/Tizen/tizen-manifest.xml b/ch06_Others/ex_Localization/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..3251a6c
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Platforms/Windows/App.xaml b/ch06_Others/ex_Localization/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..d75949f
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/Windows/App.xaml.cs b/ch06_Others/ex_Localization/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..2c241ed
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace ex_Localization.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
+
diff --git a/ch06_Others/ex_Localization/Platforms/Windows/Package.appxmanifest b/ch06_Others/ex_Localization/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..45cdcd7
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/Windows/app.manifest b/ch06_Others/ex_Localization/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..4008d0e
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/iOS/AppDelegate.cs b/ch06_Others/ex_Localization/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..4258c1f
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization/Platforms/iOS/Info.plist b/ch06_Others/ex_Localization/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..7c6c5ec
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/iOS/Info.plist
@@ -0,0 +1,42 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
+
diff --git a/ch06_Others/ex_Localization/Platforms/iOS/Program.cs b/ch06_Others/ex_Localization/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..d27a01c
--- /dev/null
+++ b/ch06_Others/ex_Localization/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization/Properties/launchSettings.json b/ch06_Others/ex_Localization/Properties/launchSettings.json
new file mode 100644
index 0000000..c16206a
--- /dev/null
+++ b/ch06_Others/ex_Localization/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/AppIcon/appicon.svg b/ch06_Others/ex_Localization/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..5f04fcf
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/AppIcon/appiconfg.svg b/ch06_Others/ex_Localization/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Regular.ttf b/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..d2887c8
Binary files /dev/null and b/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Semibold.ttf b/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..20060c4
Binary files /dev/null and b/ch06_Others/ex_Localization/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/ch06_Others/ex_Localization/Resources/Images/dotnet_bot.png b/ch06_Others/ex_Localization/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/ch06_Others/ex_Localization/Resources/Images/dotnet_bot.png differ
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.Designer.cs b/ch06_Others/ex_Localization/Resources/Localization/AppResources.Designer.cs
new file mode 100644
index 0000000..cdd9c72
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.Designer.cs
@@ -0,0 +1,70 @@
+namespace ex_Localization.Resources.Localization {
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class AppResources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal AppResources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ex_Localization.Resources.Localization.AppResources", typeof(AppResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static string ButtonText {
+ get {
+ return ResourceManager.GetString("ButtonText", resourceCulture);
+ }
+ }
+
+ internal static string EntryPlaceholder {
+ get {
+ return ResourceManager.GetString("EntryPlaceholder", resourceCulture);
+ }
+ }
+
+ internal static string LabelText {
+ get {
+ return ResourceManager.GetString("LabelText", resourceCulture);
+ }
+ }
+
+ internal static string PickerText {
+ get {
+ return ResourceManager.GetString("PickerText", resourceCulture);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.ca-ES.resx b/ch06_Others/ex_Localization/Resources/Localization/AppResources.ca-ES.resx
new file mode 100644
index 0000000..e8190f6
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.ca-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Fes clic a mi!
+
+
+
+ Introdueix el teu text aquí
+
+
+
+ Has introduït:
+
+
+
+ Tria la teva cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.es-ES.resx b/ch06_Others/ex_Localization/Resources/Localization/AppResources.es-ES.resx
new file mode 100644
index 0000000..0ad0325
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.es-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Hazme clic!
+
+
+
+ Introduzca aquí su texto
+
+
+
+ Ha entrado en:
+
+
+
+ Elija su cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.fr-FR.resx b/ch06_Others/ex_Localization/Resources/Localization/AppResources.fr-FR.resx
new file mode 100644
index 0000000..3d4bf05
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.fr-FR.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Clique moi !
+
+
+
+ Entre ton texte ici
+
+
+
+ Tu as entré :
+
+
+
+ Choisis ta culture :
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.it.resx b/ch06_Others/ex_Localization/Resources/Localization/AppResources.it.resx
new file mode 100644
index 0000000..fea68f0
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.it.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Cliccami!
+
+
+
+ Inserire il testo qui:
+
+
+
+ Hai scritto:
+
+
+
+ Scegliere la cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Localization/AppResources.resx b/ch06_Others/ex_Localization/Resources/Localization/AppResources.resx
new file mode 100644
index 0000000..6be617a
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Localization/AppResources.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Click Me!
+
+
+
+ Enter your text here
+
+
+
+ You have entered:
+
+
+
+ Select a culture:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Raw/AboutAssets.txt b/ch06_Others/ex_Localization/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..f22d3bf
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/ch06_Others/ex_Localization/Resources/Splash/splash.svg b/ch06_Others/ex_Localization/Resources/Splash/splash.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Styles/Colors.xaml b/ch06_Others/ex_Localization/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..22f0a67
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization/Resources/Styles/Styles.xaml b/ch06_Others/ex_Localization/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..d600a7f
--- /dev/null
+++ b/ch06_Others/ex_Localization/Resources/Styles/Styles.xaml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization/ex_Localization.csproj b/ch06_Others/ex_Localization/ex_Localization.csproj
new file mode 100644
index 0000000..dde77e8
--- /dev/null
+++ b/ch06_Others/ex_Localization/ex_Localization.csproj
@@ -0,0 +1,82 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ ex_Localization
+ true
+ true
+ enable
+ enable
+
+
+ ex_Localization
+
+
+ fr.uca.iut.ex_localization
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/App.xaml b/ch06_Others/ex_Localization2/App.xaml
new file mode 100644
index 0000000..9951863
--- /dev/null
+++ b/ch06_Others/ex_Localization2/App.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/App.xaml.cs b/ch06_Others/ex_Localization2/App.xaml.cs
new file mode 100644
index 0000000..91bc457
--- /dev/null
+++ b/ch06_Others/ex_Localization2/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace ex_Localization2;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/ch06_Others/ex_Localization2/AppShell.xaml b/ch06_Others/ex_Localization2/AppShell.xaml
new file mode 100644
index 0000000..950bf14
--- /dev/null
+++ b/ch06_Others/ex_Localization2/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/AppShell.xaml.cs b/ch06_Others/ex_Localization2/AppShell.xaml.cs
new file mode 100644
index 0000000..b49dd94
--- /dev/null
+++ b/ch06_Others/ex_Localization2/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_Localization2;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/ch06_Others/ex_Localization2/MainPage.xaml b/ch06_Others/ex_Localization2/MainPage.xaml
new file mode 100644
index 0000000..357ae19
--- /dev/null
+++ b/ch06_Others/ex_Localization2/MainPage.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+ en
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/MainPage.xaml.cs b/ch06_Others/ex_Localization2/MainPage.xaml.cs
new file mode 100644
index 0000000..23f1f57
--- /dev/null
+++ b/ch06_Others/ex_Localization2/MainPage.xaml.cs
@@ -0,0 +1,10 @@
+namespace ex_Localization2;
+
+public partial class MainPage : ContentPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+}
+
diff --git a/ch06_Others/ex_Localization2/MauiProgram.cs b/ch06_Others/ex_Localization2/MauiProgram.cs
new file mode 100644
index 0000000..9daba96
--- /dev/null
+++ b/ch06_Others/ex_Localization2/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace ex_Localization2;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/Android/AndroidManifest.xml b/ch06_Others/ex_Localization2/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..bdec9b5
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Platforms/Android/MainActivity.cs b/ch06_Others/ex_Localization2/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..d0f508b
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace ex_Localization2;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/Android/MainApplication.cs b/ch06_Others/ex_Localization2/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..a9eb154
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace ex_Localization2;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/Android/Resources/values/colors.xml b/ch06_Others/ex_Localization2/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..5cd1604
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Platforms/MacCatalyst/AppDelegate.cs b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..d7af7ea
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization2;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Entitlements.plist b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..8e87c0c
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Info.plist b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..678ab83
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Program.cs b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..67511bf
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization2;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/Tizen/Main.cs b/ch06_Others/ex_Localization2/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..3055a2e
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Tizen/Main.cs
@@ -0,0 +1,16 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace ex_Localization2;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/Tizen/tizen-manifest.xml b/ch06_Others/ex_Localization2/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..f4f1efc
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml b/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..3b83db1
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml.cs b/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..2a856f4
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace ex_Localization2.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
+
diff --git a/ch06_Others/ex_Localization2/Platforms/Windows/Package.appxmanifest b/ch06_Others/ex_Localization2/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..04c6d85
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/Windows/app.manifest b/ch06_Others/ex_Localization2/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..af66573
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/iOS/AppDelegate.cs b/ch06_Others/ex_Localization2/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..d7af7ea
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization2;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization2/Platforms/iOS/Info.plist b/ch06_Others/ex_Localization2/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..8e83bbc
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/iOS/Info.plist
@@ -0,0 +1,41 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
diff --git a/ch06_Others/ex_Localization2/Platforms/iOS/Program.cs b/ch06_Others/ex_Localization2/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..67511bf
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization2;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization2/Properties/launchSettings.json b/ch06_Others/ex_Localization2/Properties/launchSettings.json
new file mode 100644
index 0000000..c16206a
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/AppIcon/appicon.svg b/ch06_Others/ex_Localization2/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..5f04fcf
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/AppIcon/appiconfg.svg b/ch06_Others/ex_Localization2/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Converters/CultureInfo2StringConverter.cs b/ch06_Others/ex_Localization2/Resources/Converters/CultureInfo2StringConverter.cs
new file mode 100644
index 0000000..cc5674d
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Converters/CultureInfo2StringConverter.cs
@@ -0,0 +1,30 @@
+using System.Globalization;
+
+namespace ex_Localization2.Resources.Converters;
+
+public class CultureInfo2StringConverter : IValueConverter
+{
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ CultureInfo? cultureInfo = value as CultureInfo;
+
+ if(cultureInfo == null) return "";
+
+ return cultureInfo.Name;
+ }
+
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ if(value == null) return CultureInfo.CurrentUICulture;
+
+ string? chosenCulture = value as string;
+
+ if(string.IsNullOrWhiteSpace(chosenCulture)) return CultureInfo.CurrentUICulture;
+
+ CultureInfo newCulture = new CultureInfo(chosenCulture);
+
+ if(newCulture == null) return CultureInfo.CurrentUICulture;
+
+ return newCulture;
+ }
+}
diff --git a/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Regular.ttf b/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..d2887c8
Binary files /dev/null and b/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Semibold.ttf b/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..20060c4
Binary files /dev/null and b/ch06_Others/ex_Localization2/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/ch06_Others/ex_Localization2/Resources/Images/dotnet_bot.png b/ch06_Others/ex_Localization2/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/ch06_Others/ex_Localization2/Resources/Images/dotnet_bot.png differ
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.Designer.cs b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.Designer.cs
new file mode 100644
index 0000000..04a8dfb
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.Designer.cs
@@ -0,0 +1,70 @@
+namespace ex_Localization2.Resources.Localization {
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class AppResources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal AppResources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ex_Localization2.Resources.Localization.AppResources", typeof(AppResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static string ButtonText {
+ get {
+ return ResourceManager.GetString("ButtonText", resourceCulture);
+ }
+ }
+
+ internal static string EntryPlaceholder {
+ get {
+ return ResourceManager.GetString("EntryPlaceholder", resourceCulture);
+ }
+ }
+
+ internal static string LabelText {
+ get {
+ return ResourceManager.GetString("LabelText", resourceCulture);
+ }
+ }
+
+ internal static string PickerText {
+ get {
+ return ResourceManager.GetString("PickerText", resourceCulture);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.ca-ES.resx b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.ca-ES.resx
new file mode 100644
index 0000000..e8190f6
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.ca-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Fes clic a mi!
+
+
+
+ Introdueix el teu text aquí
+
+
+
+ Has introduït:
+
+
+
+ Tria la teva cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.es-ES.resx b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.es-ES.resx
new file mode 100644
index 0000000..0ad0325
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.es-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Hazme clic!
+
+
+
+ Introduzca aquí su texto
+
+
+
+ Ha entrado en:
+
+
+
+ Elija su cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.fr-FR.resx b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.fr-FR.resx
new file mode 100644
index 0000000..3d4bf05
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.fr-FR.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Clique moi !
+
+
+
+ Entre ton texte ici
+
+
+
+ Tu as entré :
+
+
+
+ Choisis ta culture :
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.it.resx b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.it.resx
new file mode 100644
index 0000000..fea68f0
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.it.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Cliccami!
+
+
+
+ Inserire il testo qui:
+
+
+
+ Hai scritto:
+
+
+
+ Scegliere la cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResources.resx b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.resx
new file mode 100644
index 0000000..6be617a
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResources.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Click Me!
+
+
+
+ Enter your text here
+
+
+
+ You have entered:
+
+
+
+ Select a culture:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/AppResourcesVM.cs b/ch06_Others/ex_Localization2/Resources/Localization/AppResourcesVM.cs
new file mode 100644
index 0000000..c59a685
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/AppResourcesVM.cs
@@ -0,0 +1,34 @@
+using System.ComponentModel;
+namespace ex_Localization2.Resources.Localization;
+
+public class AppResourcesVM : INotifyPropertyChanged
+{
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+ void OnPropertyChanged(string propertyName)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+
+ public System.Globalization.CultureInfo Culture
+ {
+ get => AppResources.Culture;
+ set
+ {
+ if(AppResources.Culture == value) return;
+
+ AppResources.Culture = value;
+ OnPropertyChanged("Culture");
+ OnPropertyChanged("ButtonText");
+ OnPropertyChanged("EntryPlaceholder");
+ OnPropertyChanged("LabelText");
+ OnPropertyChanged("PickerText");
+ }
+ }
+
+ public string ButtonText => AppResources.ButtonText;
+
+ public string EntryPlaceholder => AppResources.EntryPlaceholder;
+
+ public string LabelText => AppResources.LabelText;
+
+ public string PickerText => AppResources.PickerText;
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Localization/LocalizationDictionary.xaml b/ch06_Others/ex_Localization2/Resources/Localization/LocalizationDictionary.xaml
new file mode 100644
index 0000000..01f212f
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Localization/LocalizationDictionary.xaml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Raw/AboutAssets.txt b/ch06_Others/ex_Localization2/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..f22d3bf
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/ch06_Others/ex_Localization2/Resources/Splash/splash.svg b/ch06_Others/ex_Localization2/Resources/Splash/splash.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Styles/Colors.xaml b/ch06_Others/ex_Localization2/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..22f0a67
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization2/Resources/Styles/Styles.xaml b/ch06_Others/ex_Localization2/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..d600a7f
--- /dev/null
+++ b/ch06_Others/ex_Localization2/Resources/Styles/Styles.xaml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization2/ex_Localization2.csproj b/ch06_Others/ex_Localization2/ex_Localization2.csproj
new file mode 100644
index 0000000..b2a2a26
--- /dev/null
+++ b/ch06_Others/ex_Localization2/ex_Localization2.csproj
@@ -0,0 +1,71 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ ex_Localization2
+ true
+ true
+ enable
+ enable
+
+
+ ex_Localization2
+
+
+ fr.uca.iut.ex_localization2
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/App.xaml b/ch06_Others/ex_Localization3/App.xaml
new file mode 100644
index 0000000..8670b04
--- /dev/null
+++ b/ch06_Others/ex_Localization3/App.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/App.xaml.cs b/ch06_Others/ex_Localization3/App.xaml.cs
new file mode 100644
index 0000000..9279f32
--- /dev/null
+++ b/ch06_Others/ex_Localization3/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace ex_Localization3;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/ch06_Others/ex_Localization3/AppShell.xaml b/ch06_Others/ex_Localization3/AppShell.xaml
new file mode 100644
index 0000000..6a068f3
--- /dev/null
+++ b/ch06_Others/ex_Localization3/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/AppShell.xaml.cs b/ch06_Others/ex_Localization3/AppShell.xaml.cs
new file mode 100644
index 0000000..bb451a2
--- /dev/null
+++ b/ch06_Others/ex_Localization3/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_Localization3;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/ch06_Others/ex_Localization3/MainPage.xaml b/ch06_Others/ex_Localization3/MainPage.xaml
new file mode 100644
index 0000000..0480c67
--- /dev/null
+++ b/ch06_Others/ex_Localization3/MainPage.xaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+ en
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/MainPage.xaml.cs b/ch06_Others/ex_Localization3/MainPage.xaml.cs
new file mode 100644
index 0000000..a31a8e6
--- /dev/null
+++ b/ch06_Others/ex_Localization3/MainPage.xaml.cs
@@ -0,0 +1,13 @@
+namespace ex_Localization3;
+
+using System.Globalization;
+using ex_Localization3.Resources.Localization;
+
+public partial class MainPage : ContentPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+}
+
diff --git a/ch06_Others/ex_Localization3/MauiProgram.cs b/ch06_Others/ex_Localization3/MauiProgram.cs
new file mode 100644
index 0000000..a8a53ce
--- /dev/null
+++ b/ch06_Others/ex_Localization3/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace ex_Localization3;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/Android/AndroidManifest.xml b/ch06_Others/ex_Localization3/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..bdec9b5
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Platforms/Android/MainActivity.cs b/ch06_Others/ex_Localization3/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..0acf487
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace ex_Localization3;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/Android/MainApplication.cs b/ch06_Others/ex_Localization3/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..4ab9fca
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace ex_Localization3;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/Android/Resources/values/colors.xml b/ch06_Others/ex_Localization3/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..5cd1604
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Platforms/MacCatalyst/AppDelegate.cs b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..276d8e5
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization3;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Entitlements.plist b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..8e87c0c
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Info.plist b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..678ab83
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Program.cs b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..7897b3e
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization3;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/Tizen/Main.cs b/ch06_Others/ex_Localization3/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..6dfe9df
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Tizen/Main.cs
@@ -0,0 +1,16 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace ex_Localization3;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/Tizen/tizen-manifest.xml b/ch06_Others/ex_Localization3/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..b1801b7
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml b/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..ee313b8
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml.cs b/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..4cda78f
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace ex_Localization3.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
+
diff --git a/ch06_Others/ex_Localization3/Platforms/Windows/Package.appxmanifest b/ch06_Others/ex_Localization3/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..fbf9abd
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/Windows/app.manifest b/ch06_Others/ex_Localization3/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..71079f6
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/iOS/AppDelegate.cs b/ch06_Others/ex_Localization3/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..276d8e5
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Localization3;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Localization3/Platforms/iOS/Info.plist b/ch06_Others/ex_Localization3/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..8e83bbc
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/iOS/Info.plist
@@ -0,0 +1,41 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+ CFBundleLocalizations
+
+ fr-FR
+ ca-ES
+ es-ES
+ it
+
+ CFBundleDevelopmentRegion
+ en
+
+
diff --git a/ch06_Others/ex_Localization3/Platforms/iOS/Program.cs b/ch06_Others/ex_Localization3/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..7897b3e
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Localization3;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Properties/launchSettings.json b/ch06_Others/ex_Localization3/Properties/launchSettings.json
new file mode 100644
index 0000000..c16206a
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/AppIcon/appicon.svg b/ch06_Others/ex_Localization3/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..5f04fcf
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/AppIcon/appiconfg.svg b/ch06_Others/ex_Localization3/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Converters/CultureInfo2StringConverter.cs b/ch06_Others/ex_Localization3/Resources/Converters/CultureInfo2StringConverter.cs
new file mode 100644
index 0000000..48db695
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Converters/CultureInfo2StringConverter.cs
@@ -0,0 +1,30 @@
+using System.Globalization;
+
+namespace ex_Localization3.Resources.Converters;
+
+public class CultureInfo2StringConverter : IValueConverter
+{
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ CultureInfo? cultureInfo = value as CultureInfo;
+
+ if(cultureInfo == null) return "";
+
+ return cultureInfo.Name;
+ }
+
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ if(value == null) return CultureInfo.CurrentUICulture;
+
+ string? chosenCulture = value as string;
+
+ if(string.IsNullOrWhiteSpace(chosenCulture)) return CultureInfo.CurrentUICulture;
+
+ CultureInfo newCulture = new CultureInfo(chosenCulture);
+
+ if(newCulture == null) return CultureInfo.CurrentUICulture;
+
+ return newCulture;
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Regular.ttf b/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..d2887c8
Binary files /dev/null and b/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Semibold.ttf b/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..20060c4
Binary files /dev/null and b/ch06_Others/ex_Localization3/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/ch06_Others/ex_Localization3/Resources/Images/dotnet_bot.png b/ch06_Others/ex_Localization3/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/ch06_Others/ex_Localization3/Resources/Images/dotnet_bot.png differ
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.Designer.cs b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.Designer.cs
new file mode 100644
index 0000000..f489b34
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.Designer.cs
@@ -0,0 +1,70 @@
+namespace ex_Localization3.Resources.Localization {
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class AppResources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal AppResources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ex_Localization3.Resources.Localization.AppResources", typeof(AppResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static string ButtonText {
+ get {
+ return ResourceManager.GetString("ButtonText", resourceCulture);
+ }
+ }
+
+ internal static string EntryPlaceholder {
+ get {
+ return ResourceManager.GetString("EntryPlaceholder", resourceCulture);
+ }
+ }
+
+ internal static string LabelText {
+ get {
+ return ResourceManager.GetString("LabelText", resourceCulture);
+ }
+ }
+
+ internal static string PickerText {
+ get {
+ return ResourceManager.GetString("PickerText", resourceCulture);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.ca-ES.resx b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.ca-ES.resx
new file mode 100644
index 0000000..e8190f6
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.ca-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Fes clic a mi!
+
+
+
+ Introdueix el teu text aquí
+
+
+
+ Has introduït:
+
+
+
+ Tria la teva cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.es-ES.resx b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.es-ES.resx
new file mode 100644
index 0000000..0ad0325
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.es-ES.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Hazme clic!
+
+
+
+ Introduzca aquí su texto
+
+
+
+ Ha entrado en:
+
+
+
+ Elija su cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.fr-FR.resx b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.fr-FR.resx
new file mode 100644
index 0000000..3d4bf05
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.fr-FR.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Clique moi !
+
+
+
+ Entre ton texte ici
+
+
+
+ Tu as entré :
+
+
+
+ Choisis ta culture :
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.it.resx b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.it.resx
new file mode 100644
index 0000000..fea68f0
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.it.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Cliccami!
+
+
+
+ Inserire il testo qui:
+
+
+
+ Hai scritto:
+
+
+
+ Scegliere la cultura:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResources.resx b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.resx
new file mode 100644
index 0000000..6be617a
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResources.resx
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Click Me!
+
+
+
+ Enter your text here
+
+
+
+ You have entered:
+
+
+
+ Select a culture:
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/AppResourcesVM.cs b/ch06_Others/ex_Localization3/Resources/Localization/AppResourcesVM.cs
new file mode 100644
index 0000000..988d729
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/AppResourcesVM.cs
@@ -0,0 +1,34 @@
+using System.ComponentModel;
+namespace ex_Localization3.Resources.Localization;
+
+public class AppResourcesVM : INotifyPropertyChanged
+{
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+ void OnPropertyChanged(string propertyName)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+
+ public System.Globalization.CultureInfo Culture
+ {
+ get => AppResources.Culture;
+ set
+ {
+ if(AppResources.Culture == value) return;
+
+ AppResources.Culture = value;
+ OnPropertyChanged("Culture");
+ OnPropertyChanged("ButtonText");
+ OnPropertyChanged("EntryPlaceholder");
+ OnPropertyChanged("LabelText");
+ OnPropertyChanged("PickerText");
+ }
+ }
+
+ public string ButtonText => AppResources.ButtonText;
+
+ public string EntryPlaceholder => AppResources.EntryPlaceholder;
+
+ public string LabelText => AppResources.LabelText;
+
+ public string PickerText => AppResources.PickerText;
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/LocalizationDictionary.xaml b/ch06_Others/ex_Localization3/Resources/Localization/LocalizationDictionary.xaml
new file mode 100644
index 0000000..1ae7362
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/LocalizationDictionary.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Localization/LocalizedStringExtension.cs b/ch06_Others/ex_Localization3/Resources/Localization/LocalizedStringExtension.cs
new file mode 100644
index 0000000..bf0c849
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Localization/LocalizedStringExtension.cs
@@ -0,0 +1,56 @@
+using System.ComponentModel;
+using System.Globalization;
+
+namespace ex_Localization3.Resources.Localization;
+
+public class Localization
+{
+ public string Culture
+ {
+ get => culture;
+ set
+ {
+ if(string.IsNullOrWhiteSpace(value)) return;
+ culture = value;
+ LocalizedStringExtension.Culture = culture;
+ }
+ }
+ private string culture = "en";
+}
+
+public class LocalizedStringExtension : IMarkupExtension
+{
+ public string Key { get; set; }
+ public static string Culture
+ {
+ get => culture;
+ set
+ {
+ if(culture == value) return;
+ culture = value;
+ AppRes.Culture = new CultureInfo(Culture);
+ CultureChanged?.Invoke(null, EventArgs.Empty);
+ }
+ }
+ private static string culture = "en";
+
+ public static AppResourcesVM AppRes { get; set; } = new AppResourcesVM();
+
+ public static event EventHandler? CultureChanged;
+
+ public string ProvideValue(IServiceProvider serviceProvider)
+ {
+ IProvideValueTarget? provideValueTarget = serviceProvider.GetService(typeof(IProvideValueTarget)) as IProvideValueTarget;
+ CultureChanged += (src, args) =>
+ {
+ (provideValueTarget?.TargetObject as BindableObject)?.SetValue((provideValueTarget?.TargetProperty as BindableProperty), typeof(AppResourcesVM).GetProperty(Key)?.GetValue(AppRes) as string ?? "");
+ };
+
+ return typeof(AppResourcesVM).GetProperty(Key)?.GetValue(AppRes) as string ?? "";
+ }
+
+ object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
+ {
+ return (this as IMarkupExtension).ProvideValue(serviceProvider);
+ }
+}
diff --git a/ch06_Others/ex_Localization3/Resources/Raw/AboutAssets.txt b/ch06_Others/ex_Localization3/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..f22d3bf
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/ch06_Others/ex_Localization3/Resources/Splash/splash.svg b/ch06_Others/ex_Localization3/Resources/Splash/splash.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Styles/Colors.xaml b/ch06_Others/ex_Localization3/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..22f0a67
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Localization3/Resources/Styles/Styles.xaml b/ch06_Others/ex_Localization3/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..d600a7f
--- /dev/null
+++ b/ch06_Others/ex_Localization3/Resources/Styles/Styles.xaml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Localization3/ex_Localization3.csproj b/ch06_Others/ex_Localization3/ex_Localization3.csproj
new file mode 100644
index 0000000..4a0edb1
--- /dev/null
+++ b/ch06_Others/ex_Localization3/ex_Localization3.csproj
@@ -0,0 +1,67 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ ex_Localization3
+ true
+ true
+ enable
+ enable
+
+
+ ex_Localization3
+
+
+ fr.uca.iut.ex_localization3
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/App.xaml b/ch06_Others/ex_Preferences/App.xaml
new file mode 100644
index 0000000..022544c
--- /dev/null
+++ b/ch06_Others/ex_Preferences/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/App.xaml.cs b/ch06_Others/ex_Preferences/App.xaml.cs
new file mode 100644
index 0000000..297359d
--- /dev/null
+++ b/ch06_Others/ex_Preferences/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace ex_Preferences;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/ch06_Others/ex_Preferences/AppShell.xaml b/ch06_Others/ex_Preferences/AppShell.xaml
new file mode 100644
index 0000000..65a4e87
--- /dev/null
+++ b/ch06_Others/ex_Preferences/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/AppShell.xaml.cs b/ch06_Others/ex_Preferences/AppShell.xaml.cs
new file mode 100644
index 0000000..0ed44c7
--- /dev/null
+++ b/ch06_Others/ex_Preferences/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace ex_Preferences;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/ch06_Others/ex_Preferences/MainPage.xaml b/ch06_Others/ex_Preferences/MainPage.xaml
new file mode 100644
index 0000000..d545900
--- /dev/null
+++ b/ch06_Others/ex_Preferences/MainPage.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/MainPage.xaml.cs b/ch06_Others/ex_Preferences/MainPage.xaml.cs
new file mode 100644
index 0000000..e5a3607
--- /dev/null
+++ b/ch06_Others/ex_Preferences/MainPage.xaml.cs
@@ -0,0 +1,31 @@
+namespace ex_Preferences;
+
+public partial class MainPage : ContentPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void ContentPage_Loaded(object sender, EventArgs e)
+ {
+ if(Preferences.Default.ContainsKey("one_setting"))
+ {
+ entry.Text = Preferences.Default.Get("one_setting", "nothing");
+ }
+ }
+
+ private void Entry_TextChanged(object sender, EventArgs e)
+ {
+ Preferences.Default.Set("one_setting", entry.Text);
+ }
+
+ private void Button_Clicked(object sender, EventArgs e)
+ {
+ entry.Text = "";
+ Preferences.Default.Clear();
+ }
+
+
+}
+
diff --git a/ch06_Others/ex_Preferences/MauiProgram.cs b/ch06_Others/ex_Preferences/MauiProgram.cs
new file mode 100644
index 0000000..18ac414
--- /dev/null
+++ b/ch06_Others/ex_Preferences/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace ex_Preferences;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/Android/AndroidManifest.xml b/ch06_Others/ex_Preferences/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..bdec9b5
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Platforms/Android/MainActivity.cs b/ch06_Others/ex_Preferences/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..271dce5
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace ex_Preferences;
+
+[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+public class MainActivity : MauiAppCompatActivity
+{
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/Android/MainApplication.cs b/ch06_Others/ex_Preferences/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..1f0deff
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace ex_Preferences;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/Android/Resources/values/colors.xml b/ch06_Others/ex_Preferences/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..5cd1604
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Platforms/MacCatalyst/AppDelegate.cs b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..8ab0a0f
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Preferences;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Entitlements.plist b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..8e87c0c
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Info.plist b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..f24aacc
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Program.cs b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..abac5e3
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Preferences;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/Tizen/Main.cs b/ch06_Others/ex_Preferences/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..d74efcf
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Tizen/Main.cs
@@ -0,0 +1,16 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace ex_Preferences;
+
+class Program : MauiApplication
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/Tizen/tizen-manifest.xml b/ch06_Others/ex_Preferences/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..597e73d
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml b/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..d493511
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml.cs b/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..92fb6f4
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,24 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace ex_Preferences.WinUI;
+
+///
+/// Provides application-specific behavior to supplement the default Application class.
+///
+public partial class App : MauiWinUIApplication
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
+
diff --git a/ch06_Others/ex_Preferences/Platforms/Windows/Package.appxmanifest b/ch06_Others/ex_Preferences/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..d7ab268
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/Windows/app.manifest b/ch06_Others/ex_Preferences/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..3e8a6fd
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/iOS/AppDelegate.cs b/ch06_Others/ex_Preferences/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..8ab0a0f
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace ex_Preferences;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/ch06_Others/ex_Preferences/Platforms/iOS/Info.plist b/ch06_Others/ex_Preferences/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..358337b
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/ch06_Others/ex_Preferences/Platforms/iOS/Program.cs b/ch06_Others/ex_Preferences/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..abac5e3
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace ex_Preferences;
+
+public class Program
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/ch06_Others/ex_Preferences/Properties/launchSettings.json b/ch06_Others/ex_Preferences/Properties/launchSettings.json
new file mode 100644
index 0000000..c16206a
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Resources/AppIcon/appicon.svg b/ch06_Others/ex_Preferences/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..5f04fcf
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Resources/AppIcon/appiconfg.svg b/ch06_Others/ex_Preferences/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Regular.ttf b/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..d2887c8
Binary files /dev/null and b/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Semibold.ttf b/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..20060c4
Binary files /dev/null and b/ch06_Others/ex_Preferences/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/ch06_Others/ex_Preferences/Resources/Images/dotnet_bot.png b/ch06_Others/ex_Preferences/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/ch06_Others/ex_Preferences/Resources/Images/dotnet_bot.png differ
diff --git a/ch06_Others/ex_Preferences/Resources/Raw/AboutAssets.txt b/ch06_Others/ex_Preferences/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..f22d3bf
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/ch06_Others/ex_Preferences/Resources/Splash/splash.svg b/ch06_Others/ex_Preferences/Resources/Splash/splash.svg
new file mode 100644
index 0000000..62d66d7
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Resources/Styles/Colors.xaml b/ch06_Others/ex_Preferences/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..22f0a67
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06_Others/ex_Preferences/Resources/Styles/Styles.xaml b/ch06_Others/ex_Preferences/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..d600a7f
--- /dev/null
+++ b/ch06_Others/ex_Preferences/Resources/Styles/Styles.xaml
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ch06_Others/ex_Preferences/ex_Preferences.csproj b/ch06_Others/ex_Preferences/ex_Preferences.csproj
new file mode 100644
index 0000000..32be3c1
--- /dev/null
+++ b/ch06_Others/ex_Preferences/ex_Preferences.csproj
@@ -0,0 +1,65 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ ex_Preferences
+ true
+ true
+ enable
+ enable
+
+
+ ex_Preferences
+
+
+ fr.uca.iut.ex_preferences
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+