diff --git a/gitignore b/.gitignore
similarity index 100%
rename from gitignore
rename to .gitignore
diff --git a/XAM-MDM/MauiApp1/App.xaml b/XAM-MDM/MauiApp1/App.xaml
new file mode 100644
index 0000000..8fb5f38
--- /dev/null
+++ b/XAM-MDM/MauiApp1/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/XAM-MDM/MauiApp1/App.xaml.cs b/XAM-MDM/MauiApp1/App.xaml.cs
new file mode 100644
index 0000000..dfe7827
--- /dev/null
+++ b/XAM-MDM/MauiApp1/App.xaml.cs
@@ -0,0 +1,11 @@
+namespace MauiApp1;
+
+public partial class App : Application
+{
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+}
diff --git a/XAM-MDM/MauiApp1/AppShell.xaml b/XAM-MDM/MauiApp1/AppShell.xaml
new file mode 100644
index 0000000..b1bb675
--- /dev/null
+++ b/XAM-MDM/MauiApp1/AppShell.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/XAM-MDM/MauiApp1/AppShell.xaml.cs b/XAM-MDM/MauiApp1/AppShell.xaml.cs
new file mode 100644
index 0000000..831b83b
--- /dev/null
+++ b/XAM-MDM/MauiApp1/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace MauiApp1;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/XAM-MDM/MauiApp1/MainPage.xaml b/XAM-MDM/MauiApp1/MainPage.xaml
new file mode 100644
index 0000000..11fd689
--- /dev/null
+++ b/XAM-MDM/MauiApp1/MainPage.xaml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/XAM-MDM/MauiApp1/MainPage.xaml.cs b/XAM-MDM/MauiApp1/MainPage.xaml.cs
new file mode 100644
index 0000000..a0df991
--- /dev/null
+++ b/XAM-MDM/MauiApp1/MainPage.xaml.cs
@@ -0,0 +1,28 @@
+namespace MauiApp1;
+
+public partial class MainPage : ContentPage
+{
+ public const string MyMDMConfigKey = "MyMDMConfigKey";
+
+ private readonly ManagedConfigurationProvider managedConfigurationProvider;
+
+ public MainPage()
+ {
+ InitializeComponent();
+
+ this.managedConfigurationProvider = new ManagedConfigurationProvider();
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+
+ lblConfig.Text = managedConfigurationProvider.GetStringValue(MyMDMConfigKey);
+ }
+
+ private void OnBtnRefreshClicked(object sender, EventArgs e)
+ {
+ lblConfig.Text = managedConfigurationProvider.GetStringValue(MyMDMConfigKey);
+ }
+}
+
diff --git a/XAM-MDM/MauiApp1/ManagedConfigurationProvider.cs b/XAM-MDM/MauiApp1/ManagedConfigurationProvider.cs
new file mode 100644
index 0000000..58c6a97
--- /dev/null
+++ b/XAM-MDM/MauiApp1/ManagedConfigurationProvider.cs
@@ -0,0 +1,7 @@
+namespace MauiApp1
+{
+ public partial class ManagedConfigurationProvider
+ {
+ public partial string GetStringValue(string key);
+ }
+}
diff --git a/XAM-MDM/MauiApp1/MauiProgram.cs b/XAM-MDM/MauiApp1/MauiProgram.cs
new file mode 100644
index 0000000..e0bed60
--- /dev/null
+++ b/XAM-MDM/MauiApp1/MauiProgram.cs
@@ -0,0 +1,24 @@
+using Microsoft.Extensions.Logging;
+
+namespace MauiApp1;
+
+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/XAM-MDM/MauiApp1/Platforms/Android/AndroidManifest.xml b/XAM-MDM/MauiApp1/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..d0ef0c1
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Platforms/Android/MainActivity.cs b/XAM-MDM/MauiApp1/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..1a01a5f
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/MainActivity.cs
@@ -0,0 +1,10 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace MauiApp1;
+
+[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/XAM-MDM/MauiApp1/Platforms/Android/MainApplication.cs b/XAM-MDM/MauiApp1/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..562eeb5
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace MauiApp1;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/XAM-MDM/MauiApp1/Platforms/Android/ManagedConfigurationProvider.cs b/XAM-MDM/MauiApp1/Platforms/Android/ManagedConfigurationProvider.cs
new file mode 100644
index 0000000..f1dc802
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/ManagedConfigurationProvider.cs
@@ -0,0 +1,23 @@
+using Android.Content;
+
+namespace MauiApp1
+{
+ public partial class ManagedConfigurationProvider
+ {
+ public partial string GetStringValue(string key)
+ {
+ var manager = (RestrictionsManager)Platform.AppContext.GetSystemService(Context.RestrictionsService);
+ var bundle = manager.ApplicationRestrictions;
+
+ if (bundle != null)
+ {
+ if (bundle.ContainsKey(key))
+ return bundle.GetString(key);
+ else
+ return null;
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/colors.xml b/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..c04d749
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/strings.xml b/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/strings.xml
new file mode 100644
index 0000000..5d96e31
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/Resources/values/strings.xml
@@ -0,0 +1,4 @@
+
+
+ MyMDMConfigKey
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Platforms/Android/Resources/xml/app_restrictions.xml b/XAM-MDM/MauiApp1/Platforms/Android/Resources/xml/app_restrictions.xml
new file mode 100644
index 0000000..707159a
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Android/Resources/xml/app_restrictions.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Platforms/Windows/App.xaml b/XAM-MDM/MauiApp1/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..4cf2244
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/XAM-MDM/MauiApp1/Platforms/Windows/App.xaml.cs b/XAM-MDM/MauiApp1/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..952f9b1
--- /dev/null
+++ b/XAM-MDM/MauiApp1/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 MauiApp1.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/XAM-MDM/MauiApp1/Platforms/Windows/ManagedConfigurationProvider.cs b/XAM-MDM/MauiApp1/Platforms/Windows/ManagedConfigurationProvider.cs
new file mode 100644
index 0000000..c0f6469
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Windows/ManagedConfigurationProvider.cs
@@ -0,0 +1,22 @@
+using Windows.Storage;
+
+namespace MauiApp1
+{
+ public partial class ManagedConfigurationProvider
+ {
+ public const string MangedConfigurationKey = "Managed.App.Settings";
+
+ public partial string GetStringValue(string key)
+ {
+ ApplicationDataContainer container = null;
+ if (ApplicationData.Current.LocalSettings.Containers.TryGetValue(MangedConfigurationKey, out container))
+ {
+ object value = null;
+ if (container.Values.TryGetValue(key, out value) && value != null)
+ return value.ToString();
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/XAM-MDM/MauiApp1/Platforms/Windows/Package.appxmanifest b/XAM-MDM/MauiApp1/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..4712bad
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/XAM-MDM/MauiApp1/Platforms/Windows/app.manifest b/XAM-MDM/MauiApp1/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..2da12c4
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/XAM-MDM/MauiApp1/Platforms/iOS/AppDelegate.cs b/XAM-MDM/MauiApp1/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..386ebbf
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,9 @@
+using Foundation;
+
+namespace MauiApp1;
+
+[Register("AppDelegate")]
+public class AppDelegate : MauiUIApplicationDelegate
+{
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/XAM-MDM/MauiApp1/Platforms/iOS/Info.plist b/XAM-MDM/MauiApp1/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..0004a4f
--- /dev/null
+++ b/XAM-MDM/MauiApp1/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/XAM-MDM/MauiApp1/Platforms/iOS/ManagedConfigurationProvider.cs b/XAM-MDM/MauiApp1/Platforms/iOS/ManagedConfigurationProvider.cs
new file mode 100644
index 0000000..79fd3bb
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/iOS/ManagedConfigurationProvider.cs
@@ -0,0 +1,22 @@
+using Foundation;
+
+namespace MauiApp1
+{
+ public partial class ManagedConfigurationProvider
+ {
+ public const string MangedConfigurationKey = "com.apple.configuration.managed";
+
+ public partial string GetStringValue(string key)
+ {
+ var dic = NSUserDefaults.StandardUserDefaults.DictionaryForKey(MangedConfigurationKey);
+ if (dic != null)
+ {
+ NSObject value = null;
+ if (dic.TryGetValue(new NSString(key), out value) && value != null)
+ return value.ToString();
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/XAM-MDM/MauiApp1/Platforms/iOS/Program.cs b/XAM-MDM/MauiApp1/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..1355767
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Platforms/iOS/Program.cs
@@ -0,0 +1,15 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace MauiApp1;
+
+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/XAM-MDM/MauiApp1/Properties/launchSettings.json b/XAM-MDM/MauiApp1/Properties/launchSettings.json
new file mode 100644
index 0000000..edf8aad
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Resources/AppIcon/appicon.svg b/XAM-MDM/MauiApp1/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..9d63b65
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Resources/AppIcon/appiconfg.svg b/XAM-MDM/MauiApp1/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Regular.ttf b/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..e248a95
Binary files /dev/null and b/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Semibold.ttf b/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..dbc9572
Binary files /dev/null and b/XAM-MDM/MauiApp1/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/XAM-MDM/MauiApp1/Resources/Images/intune.png b/XAM-MDM/MauiApp1/Resources/Images/intune.png
new file mode 100644
index 0000000..bd7398c
Binary files /dev/null and b/XAM-MDM/MauiApp1/Resources/Images/intune.png differ
diff --git a/XAM-MDM/MauiApp1/Resources/Raw/AboutAssets.txt b/XAM-MDM/MauiApp1/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..15d6244
--- /dev/null
+++ b/XAM-MDM/MauiApp1/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/XAM-MDM/MauiApp1/Resources/Splash/splash.svg b/XAM-MDM/MauiApp1/Resources/Splash/splash.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Resources/Styles/Colors.xaml b/XAM-MDM/MauiApp1/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..245758b
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Resources/Styles/Colors.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+ #512BD4
+ #DFD8F7
+ #2B0B98
+ White
+ Black
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #F7B548
+ #FFD590
+ #FFE5B9
+ #28C2D1
+ #7BDDEF
+ #C3F2F4
+ #3E8EED
+ #72ACF1
+ #A7CBF6
+
+
\ No newline at end of file
diff --git a/XAM-MDM/MauiApp1/Resources/Styles/Styles.xaml b/XAM-MDM/MauiApp1/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..dc4a034
--- /dev/null
+++ b/XAM-MDM/MauiApp1/Resources/Styles/Styles.xaml
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/XAM-MDM/MauiApp1/XAM-MDM.csproj b/XAM-MDM/MauiApp1/XAM-MDM.csproj
new file mode 100644
index 0000000..1c885a1
--- /dev/null
+++ b/XAM-MDM/MauiApp1/XAM-MDM.csproj
@@ -0,0 +1,65 @@
+
+
+
+ net7.0-android;net7.0-ios;
+ $(TargetFrameworks);net7.0-windows10.0.19041.0
+
+
+ Exe
+ MauiApp1
+ true
+ true
+ enable
+
+
+ XAM-MDM
+
+
+ com.pavlodatsiuk.xammdm
+ 97b4efa6-d7f5-44ac-8d94-875044e3a2de
+
+
+ 1.0
+ 1
+
+ 11.0
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
diff --git a/XAM-MDM/XAM-MDM.sln b/XAM-MDM/XAM-MDM.sln
new file mode 100644
index 0000000..cf31035
--- /dev/null
+++ b/XAM-MDM/XAM-MDM.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31611.283
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XAM-MDM", "MauiApp1\XAM-MDM.csproj", "{E68B4F46-1A14-4241-A266-F9617225402E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E68B4F46-1A14-4241-A266-F9617225402E}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
+ EndGlobalSection
+EndGlobal