diff --git a/CheckBoxIntermediateState/App.xaml b/CheckBoxIntermediateState/App.xaml
new file mode 100644
index 0000000..565fed4
--- /dev/null
+++ b/CheckBoxIntermediateState/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/App.xaml.cs b/CheckBoxIntermediateState/App.xaml.cs
new file mode 100644
index 0000000..742045f
--- /dev/null
+++ b/CheckBoxIntermediateState/App.xaml.cs
@@ -0,0 +1,12 @@
+namespace CheckBoxIntermediateState
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+ }
+}
diff --git a/CheckBoxIntermediateState/AppShell.xaml b/CheckBoxIntermediateState/AppShell.xaml
new file mode 100644
index 0000000..c8e30e5
--- /dev/null
+++ b/CheckBoxIntermediateState/AppShell.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/AppShell.xaml.cs b/CheckBoxIntermediateState/AppShell.xaml.cs
new file mode 100644
index 0000000..20d9979
--- /dev/null
+++ b/CheckBoxIntermediateState/AppShell.xaml.cs
@@ -0,0 +1,10 @@
+namespace CheckBoxIntermediateState
+{
+ public partial class AppShell : Shell
+ {
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CheckBoxIntermediateState/CheckBoxIntermediateState.csproj b/CheckBoxIntermediateState/CheckBoxIntermediateState.csproj
new file mode 100644
index 0000000..3bc3837
--- /dev/null
+++ b/CheckBoxIntermediateState/CheckBoxIntermediateState.csproj
@@ -0,0 +1,66 @@
+
+
+
+ net8.0-android;net8.0-ios;net8.0-maccatalyst
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ CheckBoxIntermediateState
+ true
+ true
+ enable
+ enable
+
+
+ CheckBoxIntermediateState
+
+
+ com.companyname.checkboxintermediatestate
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/CheckBoxIntermediateState.sln b/CheckBoxIntermediateState/CheckBoxIntermediateState.sln
new file mode 100644
index 0000000..a7c3003
--- /dev/null
+++ b/CheckBoxIntermediateState/CheckBoxIntermediateState.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34723.18
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CheckBoxIntermediateState", "CheckBoxIntermediateState.csproj", "{9EE7D996-C9F7-490B-A269-1AF00836FD8D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9EE7D996-C9F7-490B-A269-1AF00836FD8D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BF16E86C-125A-4891-BF1B-AE4653829885}
+ EndGlobalSection
+EndGlobal
diff --git a/CheckBoxIntermediateState/MainPage.xaml b/CheckBoxIntermediateState/MainPage.xaml
new file mode 100644
index 0000000..1305f76
--- /dev/null
+++ b/CheckBoxIntermediateState/MainPage.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/MainPage.xaml.cs b/CheckBoxIntermediateState/MainPage.xaml.cs
new file mode 100644
index 0000000..b8ad002
--- /dev/null
+++ b/CheckBoxIntermediateState/MainPage.xaml.cs
@@ -0,0 +1,11 @@
+namespace CheckBoxIntermediateState
+{
+ public partial class MainPage : ContentPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+
+}
diff --git a/CheckBoxIntermediateState/MauiProgram.cs b/CheckBoxIntermediateState/MauiProgram.cs
new file mode 100644
index 0000000..df4a20a
--- /dev/null
+++ b/CheckBoxIntermediateState/MauiProgram.cs
@@ -0,0 +1,27 @@
+using Microsoft.Extensions.Logging;
+using Syncfusion.Maui.Core.Hosting;
+
+namespace CheckBoxIntermediateState
+{
+ public static class MauiProgram
+ {
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureSyncfusionCore()
+ .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/CheckBoxIntermediateState/Platforms/Android/AndroidManifest.xml b/CheckBoxIntermediateState/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..e9937ad
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Platforms/Android/MainActivity.cs b/CheckBoxIntermediateState/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..f4c79e4
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Android/MainActivity.cs
@@ -0,0 +1,11 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace CheckBoxIntermediateState
+{
+ [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+ public class MainActivity : MauiAppCompatActivity
+ {
+ }
+}
diff --git a/CheckBoxIntermediateState/Platforms/Android/MainApplication.cs b/CheckBoxIntermediateState/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..f61388c
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Android/MainApplication.cs
@@ -0,0 +1,16 @@
+using Android.App;
+using Android.Runtime;
+
+namespace CheckBoxIntermediateState
+{
+ [Application]
+ public class MainApplication : MauiApplication
+ {
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/CheckBoxIntermediateState/Platforms/Android/Resources/values/colors.xml b/CheckBoxIntermediateState/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..c04d749
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Platforms/MacCatalyst/AppDelegate.cs b/CheckBoxIntermediateState/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..5290373
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace CheckBoxIntermediateState
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/CheckBoxIntermediateState/Platforms/MacCatalyst/Entitlements.plist b/CheckBoxIntermediateState/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 0000000..de4adc9
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+ com.apple.security.network.client
+
+
+
+
diff --git a/CheckBoxIntermediateState/Platforms/MacCatalyst/Info.plist b/CheckBoxIntermediateState/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..7268977
--- /dev/null
+++ b/CheckBoxIntermediateState/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/CheckBoxIntermediateState/Platforms/MacCatalyst/Program.cs b/CheckBoxIntermediateState/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..21f0100
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace CheckBoxIntermediateState
+{
+ 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/CheckBoxIntermediateState/Platforms/Tizen/Main.cs b/CheckBoxIntermediateState/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..bbe67af
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Tizen/Main.cs
@@ -0,0 +1,17 @@
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+using System;
+
+namespace CheckBoxIntermediateState
+{
+ internal class Program : MauiApplication
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+ }
+}
diff --git a/CheckBoxIntermediateState/Platforms/Tizen/tizen-manifest.xml b/CheckBoxIntermediateState/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..fea8790
--- /dev/null
+++ b/CheckBoxIntermediateState/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/CheckBoxIntermediateState/Platforms/Windows/App.xaml b/CheckBoxIntermediateState/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..8cc0ae0
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/CheckBoxIntermediateState/Platforms/Windows/App.xaml.cs b/CheckBoxIntermediateState/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..fa3eb7d
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,25 @@
+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 CheckBoxIntermediateState.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/CheckBoxIntermediateState/Platforms/Windows/Package.appxmanifest b/CheckBoxIntermediateState/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..dff6064
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/Platforms/Windows/app.manifest b/CheckBoxIntermediateState/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..9e94f1a
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/CheckBoxIntermediateState/Platforms/iOS/AppDelegate.cs b/CheckBoxIntermediateState/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..5290373
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace CheckBoxIntermediateState
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/CheckBoxIntermediateState/Platforms/iOS/Info.plist b/CheckBoxIntermediateState/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..0004a4f
--- /dev/null
+++ b/CheckBoxIntermediateState/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/CheckBoxIntermediateState/Platforms/iOS/Program.cs b/CheckBoxIntermediateState/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..21f0100
--- /dev/null
+++ b/CheckBoxIntermediateState/Platforms/iOS/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace CheckBoxIntermediateState
+{
+ 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/CheckBoxIntermediateState/Properties/launchSettings.json b/CheckBoxIntermediateState/Properties/launchSettings.json
new file mode 100644
index 0000000..edf8aad
--- /dev/null
+++ b/CheckBoxIntermediateState/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Resources/AppIcon/appicon.svg b/CheckBoxIntermediateState/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..9d63b65
--- /dev/null
+++ b/CheckBoxIntermediateState/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Resources/AppIcon/appiconfg.svg b/CheckBoxIntermediateState/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/CheckBoxIntermediateState/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Regular.ttf b/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..2d1edf0
Binary files /dev/null and b/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Semibold.ttf b/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..fe13d06
Binary files /dev/null and b/CheckBoxIntermediateState/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/CheckBoxIntermediateState/Resources/Images/dotnet_bot.png b/CheckBoxIntermediateState/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..f93ce02
Binary files /dev/null and b/CheckBoxIntermediateState/Resources/Images/dotnet_bot.png differ
diff --git a/CheckBoxIntermediateState/Resources/Raw/AboutAssets.txt b/CheckBoxIntermediateState/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..15d6244
--- /dev/null
+++ b/CheckBoxIntermediateState/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 you 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/CheckBoxIntermediateState/Resources/Splash/splash.svg b/CheckBoxIntermediateState/Resources/Splash/splash.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/CheckBoxIntermediateState/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/CheckBoxIntermediateState/Resources/Styles/Colors.xaml b/CheckBoxIntermediateState/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..30307a5
--- /dev/null
+++ b/CheckBoxIntermediateState/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/CheckBoxIntermediateState/Resources/Styles/Styles.xaml b/CheckBoxIntermediateState/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..e0d36bb
--- /dev/null
+++ b/CheckBoxIntermediateState/Resources/Styles/Styles.xaml
@@ -0,0 +1,426 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CheckBoxIntermediateState/ViewModel/ViewModel.cs b/CheckBoxIntermediateState/ViewModel/ViewModel.cs
new file mode 100644
index 0000000..5448ad9
--- /dev/null
+++ b/CheckBoxIntermediateState/ViewModel/ViewModel.cs
@@ -0,0 +1,109 @@
+using System.ComponentModel;
+
+namespace CheckBoxIntermediateState
+{
+ public class ViewModel : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+ private void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ private bool skip = false;
+
+ // Properties for individual CheckBoxes
+ private bool isPepperoniChecked;
+ public bool IsPepperoniChecked
+ {
+ get => isPepperoniChecked;
+ set
+ {
+ isPepperoniChecked = value;
+ CheckIfSelectAll();
+ OnPropertyChanged(nameof(IsPepperoniChecked));
+ }
+ }
+
+ private bool isMushroomsChecked;
+ public bool IsMushroomsChecked
+ {
+ get => isMushroomsChecked;
+ set
+ {
+ isMushroomsChecked = value;
+ CheckIfSelectAll();
+ OnPropertyChanged(nameof(IsMushroomsChecked));
+ }
+ }
+
+ private bool isOnionsChecked;
+ public bool IsOnionsChecked
+ {
+ get => isOnionsChecked;
+ set
+ {
+ isOnionsChecked = value;
+ CheckIfSelectAll();
+ OnPropertyChanged(nameof(IsOnionsChecked));
+ }
+ }
+
+ // Property for the "Select All" CheckBox
+ private bool? isIntermediate;
+ public bool? IsIntermediate
+ {
+ get => isIntermediate;
+ set
+ {
+ isIntermediate = value;
+ IntermediateState();
+ OnPropertyChanged(nameof(IsIntermediate));
+ }
+ }
+
+ public ViewModel()
+ {
+ IsIntermediate = true;
+ }
+
+ private void CheckIfSelectAll()
+ {
+ if (!skip)
+ {
+ skip = true;
+ if (IsPepperoniChecked && IsMushroomsChecked && IsOnionsChecked)
+ {
+ IsIntermediate = true;
+ }
+ else if (!IsPepperoniChecked && !IsMushroomsChecked && !IsOnionsChecked)
+ {
+ IsIntermediate = false;
+ }
+ else
+ {
+ IsIntermediate = null;
+ }
+ skip = false;
+ }
+ }
+
+ private void IntermediateState()
+ {
+ if (!skip)
+ {
+ skip = true;
+ if (IsIntermediate == true)
+ {
+ IsPepperoniChecked = IsMushroomsChecked = IsOnionsChecked = true;
+ }
+ else
+ {
+ IsPepperoniChecked = IsMushroomsChecked = IsOnionsChecked = false;
+ }
+ skip = false;
+ }
+ }
+ }
+}