From 238c40172b51aadc4d06ee2b61cac9847f61191c Mon Sep 17 00:00:00 2001 From: marcchevaldonne Date: Sun, 5 May 2024 00:57:14 +0200 Subject: [PATCH] :test_tube: :construction: test nav --- .vscode/launch.json | 1 + Samples.sln | 9 + .../ex_DataTemplateSelector/MainPage.xaml | 3 +- ch04_Navigation/ex_ShellRoutes/App.xaml | 14 + ch04_Navigation/ex_ShellRoutes/App.xaml.cs | 11 + ch04_Navigation/ex_ShellRoutes/AppShell.xaml | 15 + .../ex_ShellRoutes/AppShell.xaml.cs | 10 + ch04_Navigation/ex_ShellRoutes/MainPage.xaml | 39 ++ .../ex_ShellRoutes/MainPage.xaml.cs | 20 + ch04_Navigation/ex_ShellRoutes/MauiProgram.cs | 24 + ch04_Navigation/ex_ShellRoutes/NewPage1.xaml | 25 + .../ex_ShellRoutes/NewPage1.xaml.cs | 20 + ch04_Navigation/ex_ShellRoutes/NewPage2.xaml | 24 + .../ex_ShellRoutes/NewPage2.xaml.cs | 20 + .../Platforms/Android/AndroidManifest.xml | 6 + .../Platforms/Android/MainActivity.cs | 10 + .../Platforms/Android/MainApplication.cs | 15 + .../Android/Resources/values/colors.xml | 6 + .../Platforms/MacCatalyst/AppDelegate.cs | 9 + .../Platforms/MacCatalyst/Entitlements.plist | 14 + .../Platforms/MacCatalyst/Info.plist | 38 ++ .../Platforms/MacCatalyst/Program.cs | 15 + .../ex_ShellRoutes/Platforms/Tizen/Main.cs | 16 + .../Platforms/Tizen/tizen-manifest.xml | 15 + .../ex_ShellRoutes/Platforms/Windows/App.xaml | 8 + .../Platforms/Windows/App.xaml.cs | 24 + .../Platforms/Windows/Package.appxmanifest | 46 ++ .../Platforms/Windows/app.manifest | 15 + .../Platforms/iOS/AppDelegate.cs | 9 + .../ex_ShellRoutes/Platforms/iOS/Info.plist | 32 ++ .../ex_ShellRoutes/Platforms/iOS/Program.cs | 15 + .../Properties/launchSettings.json | 8 + .../Resources/AppIcon/appicon.svg | 4 + .../Resources/AppIcon/appiconfg.svg | 8 + .../Resources/Fonts/OpenSans-Regular.ttf | Bin 0 -> 107184 bytes .../Resources/Fonts/OpenSans-Semibold.ttf | Bin 0 -> 111072 bytes .../Resources/Images/dotnet_bot.png | Bin 0 -> 69811 bytes .../Resources/Raw/AboutAssets.txt | 15 + .../Resources/Splash/splash.svg | 8 + .../Resources/Styles/Colors.xaml | 45 ++ .../Resources/Styles/Styles.xaml | 426 ++++++++++++++++++ .../ex_ShellRoutes/ex_ShellRoutes.csproj | 65 +++ 42 files changed, 1105 insertions(+), 2 deletions(-) create mode 100644 ch04_Navigation/ex_ShellRoutes/App.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/App.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/AppShell.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/AppShell.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/MainPage.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/MainPage.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/MauiProgram.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/NewPage1.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/NewPage1.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/NewPage2.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/NewPage2.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Android/AndroidManifest.xml create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Android/MainActivity.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Android/MainApplication.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Android/Resources/values/colors.xml create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/MacCatalyst/AppDelegate.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/MacCatalyst/Entitlements.plist create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/MacCatalyst/Info.plist create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/MacCatalyst/Program.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Tizen/Main.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Tizen/tizen-manifest.xml create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Windows/App.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Windows/App.xaml.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Windows/Package.appxmanifest create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/Windows/app.manifest create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/iOS/AppDelegate.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/iOS/Info.plist create mode 100644 ch04_Navigation/ex_ShellRoutes/Platforms/iOS/Program.cs create mode 100644 ch04_Navigation/ex_ShellRoutes/Properties/launchSettings.json create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/AppIcon/appicon.svg create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/AppIcon/appiconfg.svg create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Fonts/OpenSans-Regular.ttf create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Fonts/OpenSans-Semibold.ttf create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Images/dotnet_bot.png create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Raw/AboutAssets.txt create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Splash/splash.svg create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Styles/Colors.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/Resources/Styles/Styles.xaml create mode 100644 ch04_Navigation/ex_ShellRoutes/ex_ShellRoutes.csproj diff --git a/.vscode/launch.json b/.vscode/launch.json index a1071ea..b2e5267 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,7 @@ // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { "name": ".NET MAUI", "type": "maui", diff --git a/Samples.sln b/Samples.sln index bc72ff4..ffedb54 100644 --- a/Samples.sln +++ b/Samples.sln @@ -25,6 +25,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_CustomContentView", "ch0 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_DataTemplateSelector", "ch03_DataBinding\ex_DataTemplateSelector\ex_DataTemplateSelector.csproj", "{CE13BDA5-D5E5-42A2-BF2B-17942919E7E6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ch04_Navigation", "ch04_Navigation", "{0E6296E1-F020-4A0D-9F98-4284F38FD68B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_ShellRoutes", "ch04_Navigation\ex_ShellRoutes\ex_ShellRoutes.csproj", "{1559C59B-727D-402D-A140-30B111DBF224}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +77,10 @@ Global {CE13BDA5-D5E5-42A2-BF2B-17942919E7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE13BDA5-D5E5-42A2-BF2B-17942919E7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE13BDA5-D5E5-42A2-BF2B-17942919E7E6}.Release|Any CPU.Build.0 = Release|Any CPU + {1559C59B-727D-402D-A140-30B111DBF224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -87,5 +95,6 @@ Global {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} {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} EndGlobalSection EndGlobal diff --git a/ch03_DataBinding/ex_DataTemplateSelector/MainPage.xaml b/ch03_DataBinding/ex_DataTemplateSelector/MainPage.xaml index 07b75bf..2495676 100644 --- a/ch03_DataBinding/ex_DataTemplateSelector/MainPage.xaml +++ b/ch03_DataBinding/ex_DataTemplateSelector/MainPage.xaml @@ -131,7 +131,6 @@ - + RowHeight="76" BackgroundColor="White"/> diff --git a/ch04_Navigation/ex_ShellRoutes/App.xaml b/ch04_Navigation/ex_ShellRoutes/App.xaml new file mode 100644 index 0000000..52a40f8 --- /dev/null +++ b/ch04_Navigation/ex_ShellRoutes/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ch04_Navigation/ex_ShellRoutes/App.xaml.cs b/ch04_Navigation/ex_ShellRoutes/App.xaml.cs new file mode 100644 index 0000000..9993ef0 --- /dev/null +++ b/ch04_Navigation/ex_ShellRoutes/App.xaml.cs @@ -0,0 +1,11 @@ +namespace ex_ShellRoutes; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} diff --git a/ch04_Navigation/ex_ShellRoutes/AppShell.xaml b/ch04_Navigation/ex_ShellRoutes/AppShell.xaml new file mode 100644 index 0000000..b9adf92 --- /dev/null +++ b/ch04_Navigation/ex_ShellRoutes/AppShell.xaml @@ -0,0 +1,15 @@ + + + + + + diff --git a/ch04_Navigation/ex_ShellRoutes/AppShell.xaml.cs b/ch04_Navigation/ex_ShellRoutes/AppShell.xaml.cs new file mode 100644 index 0000000..72ac629 --- /dev/null +++ b/ch04_Navigation/ex_ShellRoutes/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace ex_ShellRoutes; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + Routing.RegisterRoute("//newpage1", typeof(NewPage1)); + } +} diff --git a/ch04_Navigation/ex_ShellRoutes/MainPage.xaml b/ch04_Navigation/ex_ShellRoutes/MainPage.xaml new file mode 100644 index 0000000..060c822 --- /dev/null +++ b/ch04_Navigation/ex_ShellRoutes/MainPage.xaml @@ -0,0 +1,39 @@ + + + + + + + +