From f8d1c3554e43753ce9337d8fafee37d78a7fb8e3 Mon Sep 17 00:00:00 2001 From: SingletonSean Date: Fri, 28 Jun 2024 21:39:54 -0400 Subject: [PATCH] Initialize state binding demo --- MauiTutorials.sln | 10 +- StateBinding/App.xaml | 14 + StateBinding/App.xaml.cs | 12 + StateBinding/AppShell.xaml | 13 + StateBinding/AppShell.xaml.cs | 10 + StateBinding/MauiProgram.cs | 25 + StateBinding/Pages/MainView.xaml | 39 ++ StateBinding/Pages/MainView.xaml.cs | 11 + StateBinding/Pages/MainViewModel.cs | 105 +++++ .../Platforms/Android/AndroidManifest.xml | 6 + .../Platforms/Android/MainActivity.cs | 11 + .../Platforms/Android/MainApplication.cs | 16 + .../Android/Resources/values/colors.xml | 6 + .../Platforms/MacCatalyst/AppDelegate.cs | 10 + .../Platforms/MacCatalyst/Entitlements.plist | 14 + StateBinding/Platforms/MacCatalyst/Info.plist | 38 ++ StateBinding/Platforms/MacCatalyst/Program.cs | 16 + StateBinding/Platforms/Tizen/Main.cs | 17 + .../Platforms/Tizen/tizen-manifest.xml | 15 + StateBinding/Platforms/Windows/App.xaml | 8 + StateBinding/Platforms/Windows/App.xaml.cs | 25 + .../Platforms/Windows/Package.appxmanifest | 46 ++ StateBinding/Platforms/Windows/app.manifest | 15 + StateBinding/Platforms/iOS/AppDelegate.cs | 10 + StateBinding/Platforms/iOS/Info.plist | 32 ++ StateBinding/Platforms/iOS/Program.cs | 16 + StateBinding/Properties/launchSettings.json | 8 + StateBinding/Resources/AppIcon/appicon.svg | 4 + StateBinding/Resources/AppIcon/appiconfg.svg | 8 + .../Resources/Fonts/OpenSans-Regular.ttf | Bin 0 -> 107184 bytes .../Resources/Fonts/OpenSans-Semibold.ttf | Bin 0 -> 111056 bytes StateBinding/Resources/Images/dotnet_bot.png | Bin 0 -> 69811 bytes StateBinding/Resources/Raw/AboutAssets.txt | 15 + StateBinding/Resources/Splash/splash.svg | 8 + StateBinding/Resources/Styles/Colors.xaml | 45 ++ StateBinding/Resources/Styles/Styles.xaml | 426 ++++++++++++++++++ StateBinding/StateBinding.csproj | 72 +++ StateBinding/StateBinding.csproj.user | 33 ++ 38 files changed, 1158 insertions(+), 1 deletion(-) create mode 100644 StateBinding/App.xaml create mode 100644 StateBinding/App.xaml.cs create mode 100644 StateBinding/AppShell.xaml create mode 100644 StateBinding/AppShell.xaml.cs create mode 100644 StateBinding/MauiProgram.cs create mode 100644 StateBinding/Pages/MainView.xaml create mode 100644 StateBinding/Pages/MainView.xaml.cs create mode 100644 StateBinding/Pages/MainViewModel.cs create mode 100644 StateBinding/Platforms/Android/AndroidManifest.xml create mode 100644 StateBinding/Platforms/Android/MainActivity.cs create mode 100644 StateBinding/Platforms/Android/MainApplication.cs create mode 100644 StateBinding/Platforms/Android/Resources/values/colors.xml create mode 100644 StateBinding/Platforms/MacCatalyst/AppDelegate.cs create mode 100644 StateBinding/Platforms/MacCatalyst/Entitlements.plist create mode 100644 StateBinding/Platforms/MacCatalyst/Info.plist create mode 100644 StateBinding/Platforms/MacCatalyst/Program.cs create mode 100644 StateBinding/Platforms/Tizen/Main.cs create mode 100644 StateBinding/Platforms/Tizen/tizen-manifest.xml create mode 100644 StateBinding/Platforms/Windows/App.xaml create mode 100644 StateBinding/Platforms/Windows/App.xaml.cs create mode 100644 StateBinding/Platforms/Windows/Package.appxmanifest create mode 100644 StateBinding/Platforms/Windows/app.manifest create mode 100644 StateBinding/Platforms/iOS/AppDelegate.cs create mode 100644 StateBinding/Platforms/iOS/Info.plist create mode 100644 StateBinding/Platforms/iOS/Program.cs create mode 100644 StateBinding/Properties/launchSettings.json create mode 100644 StateBinding/Resources/AppIcon/appicon.svg create mode 100644 StateBinding/Resources/AppIcon/appiconfg.svg create mode 100644 StateBinding/Resources/Fonts/OpenSans-Regular.ttf create mode 100644 StateBinding/Resources/Fonts/OpenSans-Semibold.ttf create mode 100644 StateBinding/Resources/Images/dotnet_bot.png create mode 100644 StateBinding/Resources/Raw/AboutAssets.txt create mode 100644 StateBinding/Resources/Splash/splash.svg create mode 100644 StateBinding/Resources/Styles/Colors.xaml create mode 100644 StateBinding/Resources/Styles/Styles.xaml create mode 100644 StateBinding/StateBinding.csproj create mode 100644 StateBinding/StateBinding.csproj.user diff --git a/MauiTutorials.sln b/MauiTutorials.sln index 8b7c3b0..5fa76f4 100644 --- a/MauiTutorials.sln +++ b/MauiTutorials.sln @@ -27,7 +27,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsOverStyles", "Com EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComplexBindings", "ComplexBindings\ComplexBindings.csproj", "{23D58DA4-DF6B-45FF-B428-662C45A41C25}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrudDemo", "CrudDemo\CrudDemo.csproj", "{3BF0982C-8A50-4912-8228-A49536A9A4AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrudDemo", "CrudDemo\CrudDemo.csproj", "{3BF0982C-8A50-4912-8228-A49536A9A4AE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StateBinding", "StateBinding\StateBinding.csproj", "{231F06C7-9BDE-41EC-8CB2-145995D195EA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -113,6 +115,12 @@ Global {3BF0982C-8A50-4912-8228-A49536A9A4AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {3BF0982C-8A50-4912-8228-A49536A9A4AE}.Release|Any CPU.Build.0 = Release|Any CPU {3BF0982C-8A50-4912-8228-A49536A9A4AE}.Release|Any CPU.Deploy.0 = Release|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Release|Any CPU.Build.0 = Release|Any CPU + {231F06C7-9BDE-41EC-8CB2-145995D195EA}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/StateBinding/App.xaml b/StateBinding/App.xaml new file mode 100644 index 0000000..8f94a19 --- /dev/null +++ b/StateBinding/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/StateBinding/App.xaml.cs b/StateBinding/App.xaml.cs new file mode 100644 index 0000000..857f622 --- /dev/null +++ b/StateBinding/App.xaml.cs @@ -0,0 +1,12 @@ +namespace StateBinding +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} diff --git a/StateBinding/AppShell.xaml b/StateBinding/AppShell.xaml new file mode 100644 index 0000000..7011be2 --- /dev/null +++ b/StateBinding/AppShell.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/StateBinding/AppShell.xaml.cs b/StateBinding/AppShell.xaml.cs new file mode 100644 index 0000000..dad6c3b --- /dev/null +++ b/StateBinding/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace StateBinding +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/StateBinding/MauiProgram.cs b/StateBinding/MauiProgram.cs new file mode 100644 index 0000000..cd9269b --- /dev/null +++ b/StateBinding/MauiProgram.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.Logging; + +namespace StateBinding +{ + 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/StateBinding/Pages/MainView.xaml b/StateBinding/Pages/MainView.xaml new file mode 100644 index 0000000..c8cff8d --- /dev/null +++ b/StateBinding/Pages/MainView.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + +