diff --git a/MAUI/AvatarView/NuGet.config b/MAUI/AvatarView/NuGet.config new file mode 100644 index 00000000..2e1f0efd --- /dev/null +++ b/MAUI/AvatarView/NuGet.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView.sln b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView.sln new file mode 100644 index 00000000..91fa273a --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView.sln @@ -0,0 +1,31 @@ + +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}") = "SampleBrowser.Maui.AvatarView", "SampleBrowser.Maui.AvatarView\SampleBrowser.Maui.AvatarView.csproj", "{FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Release-Xml|Any CPU = Release-Xml|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release|Any CPU.Build.0 = Release|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release|Any CPU.Deploy.0 = Release|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release-Xml|Any CPU.ActiveCfg = Release-Xml|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release-Xml|Any CPU.Build.0 = Release-Xml|Any CPU + {FFF8474B-FAB6-4FF2-BE38-C0405027F4D5}.Release-Xml|Any CPU.Deploy.0 = Release-Xml|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml new file mode 100644 index 00000000..f526793a --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml.cs new file mode 100644 index 00000000..f5bdd1d9 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/App.xaml.cs @@ -0,0 +1,24 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using System.Reflection; + +namespace SampleBrowser.Maui.AvatarView; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + //MainPage = new AppShell(); + + var appInfo = typeof(App).GetTypeInfo().Assembly; + SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true; + MainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(appInfo); + } +} diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/AvatarViewSamplesList.xml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/AvatarViewSamplesList.xml new file mode 100644 index 00000000..d9366d5b --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/AvatarViewSamplesList.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlConfig.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlConfig.cs new file mode 100644 index 00000000..09f428f6 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlConfig.cs @@ -0,0 +1,14 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +namespace SampleBrowser.Maui.AvatarView +{ + // All the code in this file is included in all platforms. + public class ControlConfig + { + } +} \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlList.xml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlList.xml new file mode 100644 index 00000000..41ea1b67 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/ControlList.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/MauiProgram.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/MauiProgram.cs new file mode 100644 index 00000000..a0712d1b --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/MauiProgram.cs @@ -0,0 +1,30 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +namespace SampleBrowser.Maui.AvatarView; + +using Syncfusion.Maui.Core.Hosting; +using SampleBrowser.Maui.Base.Hosting; + +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"); + }); + builder.ConfigureSampleBrowserBase(); + + return builder.Build(); + } +} diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/AndroidManifest.xml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/AndroidManifest.xml new file mode 100644 index 00000000..e9937ad7 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainActivity.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainActivity.cs new file mode 100644 index 00000000..44e70fd5 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainActivity.cs @@ -0,0 +1,17 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace SampleBrowser.Maui.AvatarView; + +[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/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainApplication.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainApplication.cs new file mode 100644 index 00000000..5de304d6 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/MainApplication.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Android.App; +using Android.Runtime; + +namespace SampleBrowser.Maui.AvatarView; + +[Application] +public class MainApplication : MauiApplication +{ + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/Resources/values/colors.xml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 00000000..c04d7492 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/AppDelegate.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 00000000..21cdb0a1 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,16 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Foundation; + +namespace SampleBrowser.Maui.AvatarView; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Info.plist b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Info.plist new file mode 100644 index 00000000..c96dd0a2 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,30 @@ + + + + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Program.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Program.cs new file mode 100644 index 00000000..e2ee9806 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using ObjCRuntime; +using UIKit; + +namespace SampleBrowser.Maui.AvatarView; + +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/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml new file mode 100644 index 00000000..643d390a --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml.cs new file mode 100644 index 00000000..50f8b9ad --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/App.xaml.cs @@ -0,0 +1,51 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Microsoft.Maui; +using Microsoft.Maui.Hosting; +using Microsoft.UI; +using Microsoft.UI.Windowing; +using Microsoft.UI.Xaml; +using WinRT.Interop; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace SampleBrowser.Maui.AvatarView.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(); + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + base.OnLaunched(args); + foreach (var item in Application.Windows) + { + var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window); + + if (platformWindow != null) + { + platformWindow.ExtendsContentIntoTitleBar = false; + platformWindow.Title = ".NET MAUI Avatar View Demo"; + } + } + } +} + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/Package.appxmanifest b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/Package.appxmanifest new file mode 100644 index 00000000..2bcb11ed --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/app.manifest b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/app.manifest new file mode 100644 index 00000000..3aa8d300 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/AppDelegate.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/AppDelegate.cs new file mode 100644 index 00000000..21cdb0a1 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,16 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Foundation; + +namespace SampleBrowser.Maui.AvatarView; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/Info.plist b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/Info.plist new file mode 100644 index 00000000..0004a4fd --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/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/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/Program.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/Program.cs new file mode 100644 index 00000000..e2ee9806 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Platforms/iOS/Program.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using ObjCRuntime; +using UIKit; + +namespace SampleBrowser.Maui.AvatarView; + +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/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Properties/launchSettings.json b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Properties/launchSettings.json new file mode 100644 index 00000000..edf8aadc --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appicon.svg b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appicon.svg new file mode 100644 index 00000000..e42a9f05 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appiconfg.svg b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appiconfg.svg new file mode 100644 index 00000000..208b00c3 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Regular.ttf b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 00000000..2c944137 Binary files /dev/null and b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Semibold.ttf b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 00000000..3c54fa71 Binary files /dev/null and b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Raw/AboutAssets.txt b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Raw/AboutAssets.txt new file mode 100644 index 00000000..15d62448 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/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/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Splash/splash.svg b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Splash/splash.svg new file mode 100644 index 00000000..7427b2d1 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Resources/Splash/splash.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.csproj b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.csproj new file mode 100644 index 00000000..74adaf21 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.csproj @@ -0,0 +1,87 @@ + + + + net6.0-android;net6.0-ios;net6.0-maccatalyst + $(TargetFrameworks);net6.0-windows10.0.19041.0 + Exe + SampleBrowser.Maui.AvatarView + true + true + enable + true + true + latest + latest-recommended + true + enable + $(NoWarn);NU1803 + + + SampleBrowser.Maui.AvatarView + + + com.syncfusion.samplebrowser.maui.avatarview + 98983B4D-24C6-44A2-9D3F-15EFE7ABD3D0 + + + 1.0 + 1 + + 14.2 + 14.0 + 21.0 + 10.0.18362.0 + 10.0.18362.0 + Debug;Release;Release-Xml + + + + TRACE;DEBUG; + true + 5 + + + + TRACE;RELEASE; + true + 5 + + + + TRACE;RELEASE; + true + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.nuspec b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.nuspec new file mode 100644 index 00000000..e85f06e3 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.nuspec @@ -0,0 +1,32 @@ + + + + SampleBrowser.Maui.AvatarView + 20.1.0.1 + Syncfusion Inc. + Syncfusion Inc. + true + http://www.syncfusion.com/nuget/license + http://www.syncfusion.com/ + http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png + AvatarView component for Syncfusion .NET MAUI + Copyright 2001 - 2019 Syncfusion Inc. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.props b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.props new file mode 100644 index 00000000..860fda1e --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SampleBrowser.Maui.AvatarView.props @@ -0,0 +1,41 @@ + + + + + Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml.cs + AvatarViewGettingStarted.xaml + + + + Samples\AvatarView\GroupView\GroupView.xaml.cs + GroupView.xaml + + + + Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml.cs + VisualStyleSample.xaml + + + + + + AvatarViewSamplesList.xml + + + + + + Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml + + + + + Samples\AvatarView\GroupView\GroupView.xaml + + + + + Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml + + + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml new file mode 100644 index 00000000..0871d8c4 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml.cs new file mode 100644 index 00000000..2e60fe83 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/AvatarViewGettingStarted/AvatarViewGettingStarted.xaml.cs @@ -0,0 +1,499 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion + +using SampleBrowser.Maui.Base; +using Syncfusion.Maui.Core; +using System.Collections.ObjectModel; + +namespace SampleBrowser.Maui.AvatarView.SfAvatarView; +public partial class AvatarViewGettingStarted : SampleView +{ + + private bool usedoublecharacter = false; + public bool UseDoubleCharacter + { + get + { + return usedoublecharacter; + } + set + { + usedoublecharacter = value; + if (value) + { + usedoublecharacter = true; + InitialsType = InitialsType.DoubleCharacter; + //SetAvatarName(); + } + else + { + usedoublecharacter = false; + InitialsType = InitialsType.SingleCharacter; + //SetAvatarName(); + + } + + this.OnPropertyChanged(); + } + } + + private InitialsType initials; + + public InitialsType InitialsType + { + get + { + return initials; + + } + set + { + initials = value; + this.OnPropertyChanged(); + } + } + + private GradientBrush? gradientBrush; + + public GradientBrush? GradientBrush + { + get + { + return gradientBrush; + } + set + { + gradientBrush = value; + this.OnPropertyChanged(); + } + } + + private bool useCustomAvatar = false; + + public bool UseCustomAvatar + { + get + { + return useCustomAvatar; + } + set + { + useCustomAvatar = value; + + if (value) + { + UseInitialAvatar = false; + ContentType = ContentType.Custom; + } + else + { + ContentType = ContentType.Initials; + UseInitialAvatar = true; + } + + this.OnPropertyChanged(); + } + } + + private ContentType contentType = ContentType.Initials; + + public ContentType ContentType + { + get + { + return contentType; + } + set + { + contentType = value; + this.OnPropertyChanged(); + } + } + + private bool editionIsVisible = true; + + public bool EditionIsVisible + { + get + { + return editionIsVisible; + } + set + { + editionIsVisible = value; + this.OnPropertyChanged(); + } + } + + private bool useInitialAvatar = true; + + public bool UseInitialAvatar + { + get + { + return useInitialAvatar; + } + set + { + useInitialAvatar = value; + if (value) + ColorPickerOpacity = 1; + else + ColorPickerOpacity = 0.3; + this.OnPropertyChanged(); + } + } + + private bool useGradients; + + public bool UseGradients + { + get + { + return useGradients; + } + set + { + useGradients = value; + if (useGradients) + { + SetGradients(); + SetColorToAvatar(); + } + else + { + SetGradients(); + PopulateColorCollection(); + SetColorToAvatar(); + + } + this.OnPropertyChanged(); + } + } + + private String firstName = "Ellana"; + + public String FirstName + { + get + { + return firstName; + } + set + { + firstName = value; + UserName = FirstName + " " + LastName; + this.OnPropertyChanged(); + } + } + + private String? lastName; + + public String? LastName + { + get + { + return lastName; + } + set + { + lastName = value; + UserName = FirstName + " " + LastName; + this.OnPropertyChanged(); + } + } + + private String? userName; + + public String? UserName + { + get + { + return userName; + } + set + { + userName = value; + TitleText = value; + this.OnPropertyChanged(); + } + } + + private String? titleText; + + public String? TitleText + { + get + { + if (UserName == String.Empty || UserName == " ") + return String.Empty; + return "Hi " + titleText; + } + set + { + titleText = value; + this.OnPropertyChanged(); + } + } + + private Color? profileColor; + + public Color? ProfileColor + { + get + { + return profileColor; + } + set + { + profileColor = value; + this.OnPropertyChanged(); + } + } + + private Color? textColor; + + public Color? TextColor + { + get + { + return textColor; + } + set + { + textColor = value; + this.OnPropertyChanged(); + } + } + + private double colorPickerOpacity = 1; + + public double ColorPickerOpacity + { + get + { + return colorPickerOpacity; + } + set + { + colorPickerOpacity = value; + this.OnPropertyChanged(); + } + } + + + private ObservableCollection colorItemCollection = new ObservableCollection(); + + public ObservableCollection ColorItemCollection + { + get + { + return colorItemCollection; + } + set + { + colorItemCollection = value; + this.OnPropertyChanged(); + } + } + + public AvatarViewGettingStarted() + { + InitializeComponent(); + this.StatusIndicatorCheck.CheckedChanged += StatusIndicatorSwitch_Toggled; + + PopulateColorCollection(); + + tappedAvatar = ColorItemCollection[0]; + + UseGradients = true; + this.BindingContext = this; + } + + private void StatusIndicatorSwitch_Toggled(object? sender, CheckedChangedEventArgs e) + { + if (this.StatusIndicatorCheck.IsChecked) + { + this.StatusBadge.BadgeSettings!.Icon = BadgeIcon.Available; + } + else + { + this.StatusBadge.BadgeSettings!.Type = BadgeType.None; + this.StatusBadge.BadgeSettings.Icon = BadgeIcon.None; + } + } + + private void SetAvatarName() + { + if (tappedAvatar == null) + { return; } + if (InitialsType == InitialsType.DoubleCharacter) + { + if (UserName != null) + { + tappedAvatar.AvatarName = UserName; + tappedAvatar.InitialsType = InitialsType; + } + } + else + { + if (UserName != null) + { + tappedAvatar.AvatarName = UserName; + tappedAvatar.InitialsType = InitialsType; + } + + } + UserName = tappedAvatar.AvatarName; + InitialsType = tappedAvatar.InitialsType; + } + + private void PopulateColorCollection() + { + ColorItemCollection.Clear(); + + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#976F0C"), Color.FromArgb("#58B7C6"), Color.FromArgb("#7FB3E8"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#740A1C"), Color.FromArgb("#95479B"), Color.FromArgb("#FF8F8F"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#5C2E91"), Color.FromArgb("#3C7F91"), Color.FromArgb("#71B280"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#004E8C"), Color.FromArgb("#525CE5"), Color.FromArgb("#9437C3"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#B73EAA"), Color.FromArgb("#80C6CF"), Color.FromArgb("#87DFAC"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#90DDFE"), Color.FromArgb("#E7A8FA"), Color.FromArgb("#F3DED6"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#9FCC69"), Color.FromArgb("#FFDBC7"), Color.FromArgb("#FC9F9F"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#FCCE65"), Color.FromArgb("#A6F0FF"), Color.FromArgb("#BCC1FF"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#FE9B90"), Color.FromArgb("#BCC2F4"), Color.FromArgb("#E8BEF7"))); + ColorItemCollection.Add(GetColorPickerItem(Color.FromArgb("#9AA8F5"), Color.FromArgb("#96E6A1"), Color.FromArgb("#DCFA97"))); + + } + + private ColorBackgroundAvatar GetColorPickerItem(Color backgroundColor, Color startcolor, Color stopcolor) + { + ColorBackgroundAvatar colorAvatar = new ColorBackgroundAvatar(); + colorAvatar.BackgroundColor = backgroundColor; + colorAvatar.Stroke = Color.FromArgb("#9E9E9E"); + colorAvatar.InitialsColor = Colors.Transparent; + colorAvatar.AvatarShape = AvatarShape.Circle; + colorAvatar.AvatarSize = AvatarSize.Medium; + colorAvatar.VerticalOptions = LayoutOptions.Center; + colorAvatar.HorizontalOptions = LayoutOptions.Center; + colorAvatar.AvatarName = ""; + TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer(); + tapGestureRecognizer.Tapped += ColorTapGestureRecognizer_Tapped; + colorAvatar.GestureRecognizers.Add(tapGestureRecognizer); + colorAvatar.StartColor = startcolor; + colorAvatar.StopColor = stopcolor; + return colorAvatar; + } + + private void SetGradients() + { + foreach (var item in ColorItemCollection) + { + if (this.UseGradients) + if (ColorItemCollection.IndexOf(item) < 5) + item.Background = GetGradients(item.StartColor!, item.StopColor!); + else + item.Background = GetGradients(item.StartColor!, item.StopColor!); + } + } + + private LinearGradientBrush GetGradients(Color startColor, Color endColor) + { + LinearGradientBrush linearGradientBrush = new LinearGradientBrush(); + linearGradientBrush.GradientStops = new GradientStopCollection() + { + new GradientStop(){Color = startColor, Offset=0.0f}, + new GradientStop(){Color = endColor, Offset=1.0f}, + }; + + return linearGradientBrush; + } + + ColorBackgroundAvatar tappedAvatar; + + private void ColorTapGestureRecognizer_Tapped(object? sender, EventArgs e) + { + if (this.UseCustomAvatar) + return; + + var colorBackgroundAvatar = sender as ColorBackgroundAvatar; + if (colorBackgroundAvatar != null) + { + tappedAvatar = colorBackgroundAvatar; + } + SetColorToAvatar(); + } + + private void SetColorToAvatar() + { + if (tappedAvatar == null) + return; + + foreach (var item in ColorItemCollection) + { + item.InitialsColor = Colors.Transparent; + item.Stroke = Color.FromArgb("#9E9E9E"); + item.StrokeThickness = 1; + } + + tappedAvatar.Stroke = Color.FromArgb("#6200EE"); + tappedAvatar.StrokeThickness = 2; + + if (ColorItemCollection.IndexOf(tappedAvatar) < 5) + { + tappedAvatar.InitialsColor = Colors.White; + } + else + { + tappedAvatar.InitialsColor = Colors.Black; + } + ProfileColor = tappedAvatar.BackgroundColor; + TextColor = tappedAvatar.InitialsColor; + if (UseGradients) + { + GradientBrush = (GradientBrush)tappedAvatar.Background; + } + else + { + GradientBrush = null; + } + } + + public class ColorBackgroundAvatar : Syncfusion.Maui.Core.SfAvatarView + { + private Color? startColor; + + public Color? StartColor + { + get + { + return startColor; + } + set + { + startColor = value; + this.OnPropertyChanged(); + } + } + + private Color? stopcolor; + + public Color? StopColor + { + get + { + return stopcolor; + } + set + { + stopcolor = value; + this.OnPropertyChanged(); + } + } + } +} + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml new file mode 100644 index 00000000..a0cf0af8 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml.cs new file mode 100644 index 00000000..36bc320c --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/GroupView/GroupView.xaml.cs @@ -0,0 +1,191 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using System.Collections.ObjectModel; +using SampleBrowser.Maui.Base; +using SampleBrowser.Maui.Base.Converters; +using System.Reflection; +namespace SampleBrowser.Maui.AvatarView.SfAvatarView; + +public partial class GroupView : SampleView +{ + private ObservableCollection groupCollection = new ObservableCollection(); + + public ObservableCollection GroupCollection + { + get + { + return groupCollection; + } + set + { + groupCollection = value; + this.OnPropertyChanged(); + } + } + + public GroupView() + { + InitializeComponent(); + + this.GroupCollection.Add(new GroupModel(5) { GroupName = "Marketing Managers" }); + this.GroupCollection.Add(new GroupModel(10) { GroupName = "Marketing Representative" }); + this.GroupCollection.Add(new GroupModel(3) { GroupName = "Marketing Heads" }); + this.GroupCollection.Add(new GroupModel(4) { GroupName = "Sales Managers" }); + this.GroupCollection.Add(new GroupModel(9) { GroupName = "Sales Representative" }); + this.GroupCollection.Add(new GroupModel(2) { GroupName = "Sales Heads" }); + this.GroupCollection.Add(new GroupModel(5) { GroupName = "Process Managers" }); + this.GroupCollection.Add(new GroupModel(10) { GroupName = "Process Representative" }); + this.GroupCollection.Add(new GroupModel(2) { GroupName = "Process Heads" }); + this.GroupCollection.Add(new GroupModel(3) { GroupName = "Coordinaters" }); + this.GroupCollection.Add(new GroupModel(3) { GroupName = "Desinger" }); + this.GroupCollection.Add(new GroupModel(2) { GroupName = "Field Managers" }); + this.GroupCollection.Add(new GroupModel(2) { GroupName = "Server Team" }); + this.BindingContext = this; + } +} + +public class GroupModel +{ + + public String? GroupName { get; set; } + + public ObservableCollection? PeopleCollection { get; set; } + + private ObservableCollection? TotalPeople { get; set; } + + public String? TotalParticipants { get; set; } + + private Syncfusion.Maui.Core.AvatarShape avatarshape; + public Syncfusion.Maui.Core.AvatarShape AvatarShape + { + get + { + return avatarshape; + } + set + { + avatarshape = value; + + } + } + + public GroupModel(int peopleCount) + { + if (DeviceInfo.Platform == DevicePlatform.Android || DeviceInfo.Platform == DevicePlatform.WinUI) + avatarshape = Syncfusion.Maui.Core.AvatarShape.Circle; + else + avatarshape = Syncfusion.Maui.Core.AvatarShape.Square; + + this.TotalParticipants = peopleCount.ToString() + " Participants"; + + this.PopulateAllPeople(); + + this.PopulatePeopleBasedOnCount(peopleCount); + } + + private void PopulateAllPeople() + { + this.TotalPeople = new ObservableCollection(); + this.TotalPeople.Add(new People() { Name = "Kyle", Backgroundcolor = Color.FromArgb("#90DDFE") }); + this.TotalPeople.Add(new People() { Name = "Gina", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Michael", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Oscar", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "William", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Bill", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Daniel", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Frank", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Howard", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Jack", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Holly", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Steve", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Vince", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Zeke", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Aiden", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Jackson", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Mason", Backgroundcolor = Colors.BlanchedAlmond }); + this.TotalPeople.Add(new People() { Name = "Liam", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Jacob", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Jayden", Backgroundcolor = Colors.Red }); + this.TotalPeople.Add(new People() { Name = "Ethan", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Alexander", Backgroundcolor = Colors.Red }); + this.TotalPeople.Add(new People() { Name = "Sebastian", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Clara", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Victoriya", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Ellie", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Gabriella", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Arianna", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Sarah", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Kaylee", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Adriana", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Finley", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Daleyza", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Leila", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Mckenna", Backgroundcolor = Colors.Blue }); + this.TotalPeople.Add(new People() { Name = "Jacqueline", Backgroundcolor = Color.FromArgb("#9AA8F5") }); + this.TotalPeople.Add(new People() { Name = "Brynn", Backgroundcolor = Color.FromArgb("#FCCE65") }); + this.TotalPeople.Add(new People() { Name = "Sawyer", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Rosalie", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Maci", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Miranda", Backgroundcolor = Color.FromArgb("#90DDFE") }); + this.TotalPeople.Add(new People() { Name = "Talia", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Shelby", Backgroundcolor = Color.FromArgb("#9FEFC5") }); + this.TotalPeople.Add(new People() { Name = "Haven", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Brynn", Backgroundcolor = Color.FromArgb("#E79AF5") }); + this.TotalPeople.Add(new People() { Name = "Yaretzi", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Zariah", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Karla", Backgroundcolor = Color.FromArgb("#D7E99C") }); + this.TotalPeople.Add(new People() { Name = "Cassandra", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Pearl", Backgroundcolor = Color.FromArgb("#FBBC93") }); + this.TotalPeople.Add(new People() { Name = "Irene", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Zelda", Backgroundcolor = Color.FromArgb("#F5EF9A") }); + this.TotalPeople.Add(new People() { Name = "Wren", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Yamileth", Backgroundcolor = Color.FromArgb("#9AA8F5") }); + this.TotalPeople.Add(new People() { Name = "Belen", Backgroundcolor = Color.FromArgb("#9AA8F5") }); + this.TotalPeople.Add(new People() { Name = "Briley", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "Jada", Backgroundcolor = Color.FromArgb("#9FCC69") }); + this.TotalPeople.Add(new People() { Name = "Jaden", Backgroundcolor = Color.FromArgb("#FE9B90") }); + this.TotalPeople.Add(new People() { Name = "George", Backgroundcolor = Color.FromArgb("#FCCE65") }); + this.TotalPeople.Add(new People() { Name = "Ellanaa", Backgroundcolor = Color.FromArgb("#9AA8F5") }); + this.TotalPeople.Add(new People() { Name = "James", Backgroundcolor = Color.FromArgb("#9FCC69") }); + + } + + //Random random = new Random(); + static int count = 0; + private void PopulatePeopleBasedOnCount(int peopleCount) + { + this.PeopleCollection = new ObservableCollection(); + for (int i = 0; i < peopleCount; i++) + { + while (true) + { + if(TotalPeople!=null) + { + if (this.TotalPeople.Count <= count) + count = 0; + + var person = (this.TotalPeople?[count++]); + if (person != null && !this.PeopleCollection.Contains(person)) + { + this.PeopleCollection.Add(person); + break; + } + } + } + } + } +} + +public class People +{ + public string? Name { get; set; } + + public ImageSource? Image { get; set; } + + public Color? Backgroundcolor { get; set; } +} \ No newline at end of file diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml new file mode 100644 index 00000000..b4804e26 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml.cs b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml.cs new file mode 100644 index 00000000..21201c64 --- /dev/null +++ b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/Samples/AvatarView/VisualStyleSample/VisualStyleSample.xaml.cs @@ -0,0 +1,63 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using SampleBrowser.Maui.Base; +using Syncfusion.Maui.Core; +using System.Collections.ObjectModel; +using Avatar = Syncfusion.Maui.Core; + +namespace SampleBrowser.Maui.AvatarView.SfAvatarView; + +public partial class VisualStyleSample : SampleView +{ + private ContentType avatarType = ContentType.Initials; + + public ContentType AvatarType + { + get + { + return avatarType; + } + set + { + avatarType = value; + + this.OnPropertyChanged(); + } + } + + public ObservableCollection TotalPeople { get; set; } + + #region Constructor + public VisualStyleSample() + { + InitializeComponent(); + + + this.TotalPeople = new ObservableCollection(); + this.TotalPeople.Add(new People() { Name = "Michael", Image = "SampleBrowser.Maui.Base.Resources.Images.people.png" }); + this.TotalPeople.Add(new People() { Name = "Kyle", Image = "SampleBrowser.Maui.Base.Resources.Images.people.png" }); + this.TotalPeople.Add(new People() { Name = "Nora" }); + + this.BindingContext = this; + + } + + #endregion + + + + public class People + { + public String? Name { get; set; } + + public String? Image { get; set; } + + public Color? Backgroundcolor { get; set; } + } +} + diff --git a/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SyncfusionLicense.txt b/MAUI/AvatarView/SampleBrowser.Maui.AvatarView/SyncfusionLicense.txt new file mode 100644 index 00000000..e69de29b diff --git a/MAUI/Backdrop/NuGet.config b/MAUI/Backdrop/NuGet.config new file mode 100644 index 00000000..2e1f0efd --- /dev/null +++ b/MAUI/Backdrop/NuGet.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop.sln b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop.sln new file mode 100644 index 00000000..95372b64 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop.sln @@ -0,0 +1,31 @@ + +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}") = "SampleBrowser.Maui.Backdrop", "SampleBrowser.Maui.Backdrop\SampleBrowser.Maui.Backdrop.csproj", "{AE4746BD-AF2A-4C96-9B2E-D857529C557B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Release-Xml|Any CPU = Release-Xml|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release|Any CPU.Build.0 = Release|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release|Any CPU.Deploy.0 = Release|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release-Xml|Any CPU.ActiveCfg = Debug|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release-Xml|Any CPU.Build.0 = Debug|Any CPU + {AE4746BD-AF2A-4C96-9B2E-D857529C557B}.Release-Xml|Any CPU.Deploy.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml new file mode 100644 index 00000000..175ec62d --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml.cs new file mode 100644 index 00000000..d3eb2c19 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/App.xaml.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using System.Reflection; + +namespace SampleBrowser.Maui.Backdrop; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + var appInfo = typeof(App).GetTypeInfo().Assembly; + SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true; + MainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(appInfo); + } +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/BackdropSamplesList.xml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/BackdropSamplesList.xml new file mode 100644 index 00000000..5c8affd4 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/BackdropSamplesList.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlConfig.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlConfig.cs new file mode 100644 index 00000000..0d30af66 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlConfig.cs @@ -0,0 +1,14 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +namespace SampleBrowser.Maui.Backdrop +{ + // All the code in this file is included in all platforms. + public class ControlConfig + { + } +} \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlList.xml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlList.xml new file mode 100644 index 00000000..db872ab1 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/ControlList.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/MauiProgram.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/MauiProgram.cs new file mode 100644 index 00000000..bea11700 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/MauiProgram.cs @@ -0,0 +1,31 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +namespace SampleBrowser.Maui.Backdrop; + +using SampleBrowser.Maui.Base.Hosting; +using Syncfusion.Maui.Core.Hosting; + +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"); + fonts.AddFont("Sync FontIcons.ttf"); + }); + builder.ConfigureSampleBrowserBase(); + + return builder.Build(); + } +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/AndroidManifest.xml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/AndroidManifest.xml new file mode 100644 index 00000000..e9937ad7 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainActivity.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainActivity.cs new file mode 100644 index 00000000..863fc247 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainActivity.cs @@ -0,0 +1,17 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace SampleBrowser.Maui.Backdrop; + +[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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainApplication.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainApplication.cs new file mode 100644 index 00000000..c0322128 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/MainApplication.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Android.App; +using Android.Runtime; + +namespace SampleBrowser.Maui.Backdrop; + +[Application] +public class MainApplication : MauiApplication +{ + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/Resources/values/colors.xml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 00000000..c04d7492 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/AppDelegate.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 00000000..aef6d349 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,16 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Foundation; + +namespace SampleBrowser.Maui.Backdrop; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Info.plist b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Info.plist new file mode 100644 index 00000000..c96dd0a2 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,30 @@ + + + + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Program.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Program.cs new file mode 100644 index 00000000..9776cc03 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using ObjCRuntime; +using UIKit; + +namespace SampleBrowser.Maui.Backdrop; + +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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Tizen/Main.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Tizen/Main.cs new file mode 100644 index 00000000..632c96aa --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Tizen/Main.cs @@ -0,0 +1,23 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using System; +using Microsoft.Maui; +using Microsoft.Maui.Hosting; + +namespace SampleBrowser.Maui.Backdrop; + +class Program : MauiApplication +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Tizen/tizen-manifest.xml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 00000000..d4cc9c43 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml new file mode 100644 index 00000000..0376b176 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml.cs new file mode 100644 index 00000000..0934353b --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/App.xaml.cs @@ -0,0 +1,31 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +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 SampleBrowser.Maui.Backdrop.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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/Package.appxmanifest b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/Package.appxmanifest new file mode 100644 index 00000000..2bcb11ed --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/app.manifest b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/app.manifest new file mode 100644 index 00000000..c98b599c --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/AppDelegate.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/AppDelegate.cs new file mode 100644 index 00000000..aef6d349 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,16 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using Foundation; + +namespace SampleBrowser.Maui.Backdrop; + +[Register("AppDelegate")] +public class AppDelegate : MauiUIApplicationDelegate +{ + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); +} diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/Info.plist b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/Info.plist new file mode 100644 index 00000000..0004a4fd --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/Program.cs b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/Program.cs new file mode 100644 index 00000000..9776cc03 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Platforms/iOS/Program.cs @@ -0,0 +1,22 @@ +#region Copyright Syncfusion Inc. 2001-2023. +// Copyright Syncfusion Inc. 2001-2023. All rights reserved. +// Use of this code is subject to the terms of our license. +// A copy of the current license can be obtained at any time by e-mailing +// licensing@syncfusion.com. Any infringement will be prosecuted under +// applicable laws. +#endregion +using ObjCRuntime; +using UIKit; + +namespace SampleBrowser.Maui.Backdrop; + +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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Properties/launchSettings.json b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Properties/launchSettings.json new file mode 100644 index 00000000..edf8aadc --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appicon.svg b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appicon.svg new file mode 100644 index 00000000..e42a9f05 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appiconfg.svg b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appiconfg.svg new file mode 100644 index 00000000..208b00c3 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Regular.ttf b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 00000000..939e3482 Binary files /dev/null and b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Semibold.ttf b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 00000000..9589fe48 Binary files /dev/null and b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/Sync FontIcons.ttf b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/Sync FontIcons.ttf new file mode 100644 index 00000000..69f554fd Binary files /dev/null and b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Fonts/Sync FontIcons.ttf differ diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Raw/AboutAssets.txt b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Raw/AboutAssets.txt new file mode 100644 index 00000000..15d62448 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/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/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Splash/splash.svg b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Splash/splash.svg new file mode 100644 index 00000000..938dea9a --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Resources/Splash/splash.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.csproj b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.csproj new file mode 100644 index 00000000..f0b50924 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.csproj @@ -0,0 +1,83 @@ + + + + net6.0-android;net6.0-ios;net6.0-maccatalyst + $(TargetFrameworks);net6.0-windows10.0.19041.0 + Exe + SampleBrowser.Maui.Backdrop + true + true + enable + true + true + latest + latest-recommended + true + enable + $(NoWarn);NU1803 + + + SampleBrowser.Maui.Backdrop + + + com.companyname.samplebrowser.maui.backdrop + 87B8FCE7-897B-4179-B91D-FCE3A744FEC4 + + + 1.0 + 1 + + 14.2 + 14.0 + 21.0 + 10.0.18362.0 + 10.0.18362.0 + Debug;Release;Release-Xml + + + + TRACE;DEBUG; + true + 5 + + + + TRACE;RELEASE; + true + 5 + + + + TRACE;RELEASE; + true + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.nuspec b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.nuspec new file mode 100644 index 00000000..700b4e37 --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.nuspec @@ -0,0 +1,32 @@ + + + + SampleBrowser.Maui.Backdrop + 20.1.0.1 + Syncfusion Inc. + Syncfusion Inc. + true + http://www.syncfusion.com/nuget/license + http://www.syncfusion.com/ + http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png + Backdrop page for Syncfusion .NET MAUI + Copyright 2001 - 2019 Syncfusion Inc. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.props b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.props new file mode 100644 index 00000000..39a7b68e --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/SampleBrowser.Maui.Backdrop.props @@ -0,0 +1,31 @@ + + + + Samples\Backdrop\Backdrop.xaml.cs + Backdrop.xaml + + + Samples\Backdrop\InitialPage.xaml.cs + InitialPage.xaml + + + Samples\Backdrop\TitleConverter.cs + + + + + + BackdropSamplesList.xml + + + + + + Samples\Backdrop\Backdrop.xaml + + + Samples\Backdrop\InitialPage.xaml + + + + \ No newline at end of file diff --git a/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Samples/Backdrop/Backdrop.xaml b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Samples/Backdrop/Backdrop.xaml new file mode 100644 index 00000000..87e5844c --- /dev/null +++ b/MAUI/Backdrop/SampleBrowser.Maui.Backdrop/Samples/Backdrop/Backdrop.xaml @@ -0,0 +1,144 @@ + + + + + + + + #007DE6 + #FFFFFF + + + + + + + + + + + + + + +