From 1bd34b3b62f43c60f11c492c9007d4d33ad5c6b5 Mon Sep 17 00:00:00 2001 From: marcchevaldonne Date: Fri, 26 Apr 2024 01:39:38 +0200 Subject: [PATCH 1/4] :construction: custom toolbar --- Samples.sln | 7 + ch02_DesigningViews/ex_CustomToolbar/App.xaml | 14 + .../ex_CustomToolbar/App.xaml.cs | 11 + .../ex_CustomToolbar/AppShell.xaml | 46 ++ .../ex_CustomToolbar/AppShell.xaml.cs | 9 + .../ex_CustomToolbar/MainPage.xaml | 74 +++ .../ex_CustomToolbar/MainPage.xaml.cs | 29 ++ .../ex_CustomToolbar/MauiProgram.cs | 26 ++ .../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_CustomToolbar/Platforms/Tizen/Main.cs | 16 + .../Platforms/Tizen/tizen-manifest.xml | 15 + .../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_CustomToolbar/Platforms/iOS/Info.plist | 32 ++ .../ex_CustomToolbar/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/Images/ellipsis_vert.png | Bin 0 -> 1041 bytes .../Resources/Images/hare.png | Bin 0 -> 1116 bytes .../Resources/Images/info_circle.png | Bin 0 -> 903 bytes .../Resources/Images/vinyl.png | Bin 0 -> 140956 bytes .../Resources/Raw/AboutAssets.txt | 15 + .../Resources/Splash/splash.svg | 8 + .../Resources/Styles/Colors.xaml | 45 ++ .../Resources/Styles/Styles.xaml | 426 ++++++++++++++++++ .../ex_CustomToolbar/ex_CustomToolbar.csproj | 67 +++ 40 files changed, 1090 insertions(+) create mode 100644 ch02_DesigningViews/ex_CustomToolbar/App.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/App.xaml.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/MauiProgram.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Android/AndroidManifest.xml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Android/MainActivity.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Android/MainApplication.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Android/Resources/values/colors.xml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/MacCatalyst/AppDelegate.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/MacCatalyst/Entitlements.plist create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/MacCatalyst/Info.plist create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/MacCatalyst/Program.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Tizen/Main.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Tizen/tizen-manifest.xml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Windows/App.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Windows/App.xaml.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Windows/Package.appxmanifest create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/Windows/app.manifest create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/iOS/AppDelegate.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/iOS/Info.plist create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Platforms/iOS/Program.cs create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Properties/launchSettings.json create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/AppIcon/appicon.svg create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/AppIcon/appiconfg.svg create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Fonts/OpenSans-Regular.ttf create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Fonts/OpenSans-Semibold.ttf create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Images/dotnet_bot.png create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Images/ellipsis_vert.png create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Images/hare.png create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Images/info_circle.png create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Images/vinyl.png create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Raw/AboutAssets.txt create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Splash/splash.svg create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Styles/Colors.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/Resources/Styles/Styles.xaml create mode 100644 ch02_DesigningViews/ex_CustomToolbar/ex_CustomToolbar.csproj diff --git a/Samples.sln b/Samples.sln index b5e1c34..1040897 100644 --- a/Samples.sln +++ b/Samples.sln @@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_OutlineText", "ch02_Desi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_Toolbar", "ch02_DesigningViews\ex_Toolbar\ex_Toolbar.csproj", "{0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_CustomToolbar", "ch02_DesigningViews\ex_CustomToolbar\ex_CustomToolbar.csproj", "{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -54,6 +56,10 @@ Global {0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}.Release|Any CPU.Build.0 = Release|Any CPU + {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -65,5 +71,6 @@ Global {62F4D4C2-7C79-4090-BB4B-20F848322113} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} {EAD02985-9DBA-459D-B12E-32A89D2C95C5} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} {0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} + {5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C} = {1E07D063-F377-413B-B9A0-FB94AF14B1A9} EndGlobalSection EndGlobal diff --git a/ch02_DesigningViews/ex_CustomToolbar/App.xaml b/ch02_DesigningViews/ex_CustomToolbar/App.xaml new file mode 100644 index 0000000..4eaeefe --- /dev/null +++ b/ch02_DesigningViews/ex_CustomToolbar/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ch02_DesigningViews/ex_CustomToolbar/App.xaml.cs b/ch02_DesigningViews/ex_CustomToolbar/App.xaml.cs new file mode 100644 index 0000000..48718f8 --- /dev/null +++ b/ch02_DesigningViews/ex_CustomToolbar/App.xaml.cs @@ -0,0 +1,11 @@ +namespace ex_CustomToolbar; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} diff --git a/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml new file mode 100644 index 0000000..1cfb84a --- /dev/null +++ b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml.cs b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml.cs new file mode 100644 index 0000000..f2777b7 --- /dev/null +++ b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml.cs @@ -0,0 +1,9 @@ +namespace ex_CustomToolbar; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + } +} diff --git a/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml b/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml new file mode 100644 index 0000000..9ed0cd6 --- /dev/null +++ b/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + +