This commit is contained in:
buildautomation@syncfusion.com 2023-05-05 10:46:03 +00:00
Родитель 104f6d2287
Коммит 526de0c7f9
2226 изменённых файлов: 128476 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,16 @@
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
</activePackageSource>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>

Просмотреть файл

@ -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

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.AvatarView"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.AvatarView.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

Просмотреть файл

@ -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);
}
}

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Miscellaneous">
<Control Title="Avatar View" ControlName="SfAvatarView" Description="Display the user's initials or images on mobile and desktop layouts. Users can customize the background, text, etc." Image="avatarview.png">
<Sample Title="Getting Started" SampleName="AvatarViewGettingStarted" SearchTags="getting started, avatar, avatarview, image, initials" CodeViewerPath="AvatarView/AvatarViewGettingStarted/" />
<Sample Title="Group View" SampleName="GroupView" SearchTags="avatar, avatarview, groupview, group, view" CodeViewerPath="AvatarView/GroupView/" />
<Sample Title="Visual Style" SampleName="VisualStyleSample" SearchTags="avatar, avatar view, visual style" CodeViewerPath="AvatarView/VisualStyleSample/" />
</Control>
</ControlCategory>
</SyncfusionControls>

Просмотреть файл

@ -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
{
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<SampleBrowser>
<Assemblies Prefix="SampleBrowser.Maui.AvatarView" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<Assembly Name="AvatarView" />
</Assemblies>
</SampleBrowser>

Просмотреть файл

@ -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<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.ConfigureSampleBrowserBase();
return builder.Build();
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

Просмотреть файл

@ -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
{
}

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -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));
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="SampleBrowser.Maui.AvatarView.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:SampleBrowser.Maui.AvatarView.WinUI">
</maui:MauiWinUIApplication>

Просмотреть файл

@ -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;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// 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().
/// </summary>
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";
}
}
}
}

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Properties>
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="SampleBrowser.Maui.AvatarView.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -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));
}
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
}
}
}

Просмотреть файл

@ -0,0 +1,3 @@
<svg width="456" height="456" viewBox="0 0 456 456" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M456 0H0V456H456V0Z" fill="#4822E3"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 154 B

Просмотреть файл

@ -0,0 +1,14 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M48 0H0V48H48V0Z" fill="#4822E3"/>
<g opacity="0.9">
<rect x="15" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect width="4.82131" height="4.82131" transform="matrix(0.709935 0.704267 -0.709935 0.704267 30.5234 15)" fill="white"/>
<rect x="25.8906" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="25.8906" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 893 B

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -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`.
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
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();
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Просмотреть файл

@ -0,0 +1,87 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.AvatarView</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisLevelSecurity>latest-recommended</AnalysisLevelSecurity>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU1803</NoWarn>
<!-- Display name -->
<ApplicationTitle>SampleBrowser.Maui.AvatarView</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.syncfusion.samplebrowser.maui.avatarview</ApplicationId>
<ApplicationIdGuid>98983B4D-24C6-44A2-9D3F-15EFE7ABD3D0</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</TargetPlatformMinVersion>
<Configurations>Debug;Release;Release-Xml</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Xml|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#4822E3" BaseSize="*,*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<None Remove="AvatarViewSamplesList.xml" />
<None Remove="ControlList.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ControlList.xml" />
<EmbeddedResource Include="AvatarViewSamplesList.xml" />
<EmbeddedResource Include="SyncfusionLicense.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="21.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="21.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="21.2.3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>SampleBrowser.Maui.AvatarView</id>
<version>20.1.0.1</version>
<authors>Syncfusion Inc.</authors>
<owners>Syncfusion Inc.</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>http://www.syncfusion.com/nuget/license</licenseUrl>
<projectUrl>http://www.syncfusion.com/</projectUrl>
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>AvatarView component for Syncfusion .NET MAUI</description>
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
<dependencies>
<group targetFramework="net6.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-windows10.0.19041.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>

Просмотреть файл

@ -0,0 +1,41 @@
<Project>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml.cs">
<Link>Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml.cs</Link>
<DependentUpon>AvatarViewGettingStarted.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\GroupView\GroupView.xaml.cs">
<Link>Samples\AvatarView\GroupView\GroupView.xaml.cs</Link>
<DependentUpon>GroupView.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml.cs">
<Link>Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml.cs</Link>
<DependentUpon> VisualStyleSample.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\AvatarViewSamplesList.xml" >
<Link>AvatarViewSamplesList.xml</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml">
<Link>Samples\AvatarView\AvatarViewGettingStarted\AvatarViewGettingStarted.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\GroupView\GroupView.xaml">
<Link>Samples\AvatarView\GroupView\GroupView.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml">
<Link>Samples\AvatarView\VisualStyleSample\VisualStyleSample.xaml</Link>
</MauiXaml>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<localCore:SampleView x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.AvatarViewGettingStarted"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
<localCore:SampleView.Resources>
<ResourceDictionary>
<Style x:Key="MainAvatarStyle" TargetType="syncfusion:SfAvatarView">
<Setter Property="AvatarShape" Value="Circle"/>
<Setter Property="AvatarSize" Value="ExtraLarge"/>
<Setter Property="InitialsType" Value="{Binding InitialsType}"/>
<Setter Property="ImageSource" Value="{imageExtension:SfImageResource people_circle1.png}"/>
<Setter Property="AvatarName" Value="{Binding UserName}"/>
<Setter Property="Stroke" Value="#9E9E9E"/>
<Setter Property="Background" Value="{Binding GradientBrush}"/>
<Setter Property="BackgroundColor" Value="{Binding ProfileColor}"/>
<Setter Property="InitialsColor" Value="{Binding TextColor}"/>
<Setter Property="ContentType" Value="{Binding ContentType}"/>
</Style>
<Style TargetType="Label">
<Setter Property="VerticalTextAlignment" Value="Center"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="TextColor" Value="Black"/>
</Style>
</ResourceDictionary>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<ScrollView VerticalScrollBarVisibility="Never" HorizontalScrollBarVisibility="Never">
<Grid RowSpacing="20"
Margin="10,15"
VerticalOptions="Fill"
HorizontalOptions="Fill">
<Grid.RowDefinitions>
<RowDefinition Height="105"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Text="{Binding TitleText}"
VerticalOptions="Start"
HorizontalOptions="Start"/>
<syncfusion:SfBadgeView x:Name="StatusBadge" Margin="0,30,0,0"
VerticalOptions="Center"
HorizontalOptions="Center"
HeightRequest="75"
WidthRequest="75">
<syncfusion:SfBadgeView.Content>
<syncfusion:SfAvatarView HorizontalOptions="Start" VerticalOptions="Start" Style="{StaticResource MainAvatarStyle}"/>
</syncfusion:SfBadgeView.Content>
<syncfusion:SfBadgeView.BadgeSettings>
<syncfusion:BadgeSettings Offset="-12,-12"
Animation="Scale"
Position="BottomRight"
Type="Success"
Icon="Available"/>
</syncfusion:SfBadgeView.BadgeSettings>
</syncfusion:SfBadgeView>
<Grid Grid.Row="1" >
<VerticalStackLayout Spacing="40" HorizontalOptions="Center" WidthRequest="{OnPlatform iOS='350',MacCatalyst='400',Android='350',WinUI='400'}">
<StackLayout IsVisible="{Binding EditionIsVisible}">
<Grid ColumnSpacing="20" RowSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Entry Text="{Binding FirstName}" Margin="2,0,0,0" VerticalOptions="End" VerticalTextAlignment="Center" Placeholder="Enter the First Name" TextColor="Black"/>
<Entry Text="{Binding LastName}" Margin="{OnPlatform Default='2,8,0,0', Android='2,0,0,0'}" Grid.Column="1" VerticalOptions="Center" VerticalTextAlignment="Center" Placeholder="Enter the Last Name" TextColor="Black" />
</Grid>
<Grid Margin="0,50,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show status indicator"/>
<CheckBox IsChecked="True" Grid.Column="1" Color="#6200EE" x:Name="StatusIndicatorCheck" HorizontalOptions="End"/>
</Grid>
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Use custom picture"/>
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseCustomAvatar}"/>
</Grid>
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show double character" />
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseDoubleCharacter}"/>
</Grid>
<Grid Margin="0,15,0,0" IsEnabled="{Binding UseInitialAvatar}" Opacity="{Binding ColorPickerOpacity}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="130"/>
</Grid.RowDefinitions>
<Label HorizontalOptions="Start" Text="Choose gradient background"/>
<FlexLayout Grid.Row="1" Wrap="Wrap" x:Name="gradientcollection" BindableLayout.ItemsSource="{Binding ColorItemCollection}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<ContentView Content="{Binding}" Margin="5"/>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
</Grid>
</StackLayout>
</VerticalStackLayout>
</Grid>
</Grid>
</ScrollView>
</localCore:SampleView.Content>
</localCore:SampleView>

Просмотреть файл

@ -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<ColorBackgroundAvatar> colorItemCollection = new ObservableCollection<ColorBackgroundAvatar>();
public ObservableCollection<ColorBackgroundAvatar> 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();
}
}
}
}

Просмотреть файл

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:avatar="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.GroupView"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
<localCore:SampleView.Content>
<Grid>
<Grid Margin="10">
<ListView ItemsSource="{Binding GroupCollection}" RowHeight="60"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<avatar:SfAvatarView GroupSource="{Binding PeopleCollection}"
Margin="5"
VerticalOptions="Center"
HorizontalOptions="Center"
ContentType="Group"
AvatarShape="{Binding AvatarShape}"
AvatarSize="Small"
StrokeThickness="1"
ImageSourceMemberPath="Image"
BackgroundColorMemberPath="Backgroundcolor"
InitialsMemberPath="Name"/>
<Grid Grid.Column="1" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Text="{Binding GroupName}"
VerticalOptions="Center"
VerticalTextAlignment="Center"
FontSize="14"
TextColor="Black"/>
<Label Grid.Row="1"
Text="{Binding TotalParticipants}"
VerticalOptions="Center"
VerticalTextAlignment="Center"
FontSize="11"
TextColor="Gray"/>
</Grid>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

Просмотреть файл

@ -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<GroupModel> groupCollection = new ObservableCollection<GroupModel>();
public ObservableCollection<GroupModel> 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<People>? PeopleCollection { get; set; }
private ObservableCollection<People>? 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<People>();
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<People>();
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; }
}

Просмотреть файл

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:avatar="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.VisualStyleSample"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
<localCore:SampleView.Resources>
<ResourceDictionary>
<Style x:Key="AvatarViewStyle" TargetType="avatar:SfAvatarView">
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Start"/>
<Setter Property="ImageSource" Value="{imageExtension:SfImageResource image5.png}"/>
<Setter Property="AvatarName" Value="SF"/>
<Setter Property="BackgroundColor" Value="#FF5490CC"/>
<Setter Property="InitialsColor" Value="White"/>
<Setter Property="ImageSourceMemberPath" Value="Image"/>
<Setter Property="InitialsMemberPath" Value="Name"/>
<Setter Property="ContentType" Value="{Binding AvatarType}"/>
<Setter Property="GroupSource" Value="{Binding TotalPeople}"/>
</Style>
<Style x:Key="MenuAvatarViewStyle" TargetType="avatar:SfAvatarView">
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Start"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="AvatarShape" Value="Square"/>
<Setter Property="AvatarSize" Value="Large"/>
</Style>
</ResourceDictionary>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<ScrollView Grid.Row="1" Margin="10">
<StackLayout x:Name="mainstack" Orientation="Horizontal">
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal" Spacing="10">
<avatar:SfAvatarView x:Name="customavatar"
AvatarShape="Custom"
Style="{StaticResource AvatarViewStyle}"
HorizontalOptions="Center"
WidthRequest="100"
HeightRequest="75"
Stroke="LightBlue"
StrokeThickness="5"
CornerRadius="0,20,0,20"/>
<avatar:SfAvatarView
x:Name="customavatar1"
AvatarShape="Custom"
Style="{StaticResource AvatarViewStyle}"
HorizontalOptions="Center"
WidthRequest="75"
HeightRequest="75"
Stroke="LightBlue"
StrokeThickness="5"
CornerRadius="0,0,37,37"/>
</StackLayout>
<Grid HeightRequest="10"/>
<Label Text="Default Visual Types" TextColor="Black"
FontSize="14"/>
<StackLayout Padding="0,10,0,0" Orientation="Horizontal">
<StackLayout Orientation="Vertical">
<avatar:SfAvatarView x:Name="ExtraLargeCircleAvatar"
AvatarShape="Circle"
AvatarSize="ExtraLarge"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Large Circle" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="LargeCircleAvatar"
AvatarShape="Circle"
AvatarSize="Large"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Large Circle" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="MediumCircleAvatar"
AvatarShape="Circle"
AvatarSize="Medium"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Medium Circle" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="SmallCircleAvatar"
AvatarShape="Circle"
AvatarSize="Small"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Small Circle" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="ExtraSmallCircleAvatar"
AvatarShape="Circle"
AvatarSize="ExtraSmall"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Small Circle" TextColor="Black"
FontSize="12"/>
</StackLayout>
<StackLayout Orientation="Vertical" Margin="20,0,0,0">
<avatar:SfAvatarView x:Name="ExtraLargeSquareAvatar"
AvatarShape="Square"
AvatarSize="ExtraLarge"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Large Square" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="LargeSquareAvatar"
AvatarShape="Square"
AvatarSize="Large"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Large Square" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="MediumSqaureAvatar"
AvatarShape="Square"
AvatarSize="Medium"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Medium Square" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="SmallSqaureAvatar"
AvatarShape="Square"
AvatarSize="Small"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Small Square" TextColor="Black"
FontSize="12"/>
<Grid HeightRequest="10"/>
<avatar:SfAvatarView x:Name="ExtraSmallSqaureAvatar"
AvatarShape="Square"
AvatarSize="ExtraSmall"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Small Square" TextColor="Black"
FontSize="12"/>
</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

Просмотреть файл

@ -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<People> TotalPeople { get; set; }
#region Constructor
public VisualStyleSample()
{
InitializeComponent();
this.TotalPeople = new ObservableCollection<People>();
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; }
}
}

Просмотреть файл

Просмотреть файл

@ -0,0 +1,16 @@
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
</activePackageSource>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>

Просмотреть файл

@ -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

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop"
x:Class="SampleBrowser.Maui.Backdrop.App"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

Просмотреть файл

@ -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);
}
}

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Layouts" >
<Control Title="Backdrop page" ControlName="SfBackdropPage" Image="backdrop.png" Description="A backdrop appears behind all the surfaces in an app, displaying contextual and actionable content.">
<Sample SampleName="InitialPage" Title="Features" CodeViewerPath="Backdrop/"/>
</Control>
</ControlCategory>
</SyncfusionControls>

Просмотреть файл

@ -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
{
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<SampleBrowser>
<Assemblies Prefix="SampleBrowser.Maui.Backdrop" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<Assembly Name="Backdrop" />
</Assemblies>
</SampleBrowser>

Просмотреть файл

@ -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<App>()
.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();
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

Просмотреть файл

@ -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
{
}

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -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));
}
}

Просмотреть файл

@ -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);
}
}

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="SampleBrowser.Maui.Backdrop.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
<icon>maui-appicon-placeholder</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>

Просмотреть файл

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="SampleBrowser.Maui.Backdrop.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:SampleBrowser.Maui.Backdrop.WinUI">
</maui:MauiWinUIApplication>

Просмотреть файл

@ -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;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// 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().
/// </summary>
public App()
{
this.InitializeComponent();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Properties>
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="SampleBrowser.Maui.Backdrop.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -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));
}
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
}
}
}

Просмотреть файл

@ -0,0 +1,3 @@
<svg width="456" height="456" viewBox="0 0 456 456" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M456 0H0V456H456V0Z" fill="#4822E3"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 154 B

Просмотреть файл

@ -0,0 +1,14 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M48 0H0V48H48V0Z" fill="#4822E3"/>
<g opacity="0.9">
<rect x="15" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect width="4.82131" height="4.82131" transform="matrix(0.709935 0.704267 -0.709935 0.704267 30.5234 15)" fill="white"/>
<rect x="25.8906" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="25.8906" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 893 B

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -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`.
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
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();
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Просмотреть файл

@ -0,0 +1,83 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Backdrop</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisLevelSecurity>latest-recommended</AnalysisLevelSecurity>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU1803</NoWarn>
<!-- Display name -->
<ApplicationTitle>SampleBrowser.Maui.Backdrop</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.samplebrowser.maui.backdrop</ApplicationId>
<ApplicationIdGuid>87B8FCE7-897B-4179-B91D-FCE3A744FEC4</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</TargetPlatformMinVersion>
<Configurations>Debug;Release;Release-Xml</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Xml|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#4822E3" BaseSize="*,*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ControlList.xml" />
<EmbeddedResource Include="BackdropSamplesList.xml" />
<EmbeddedResource Include="SyncfusionLicense.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="21.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="21.2.3" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="21.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="21.2.3" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="21.2.3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>SampleBrowser.Maui.Backdrop</id>
<version>20.1.0.1</version>
<authors>Syncfusion Inc.</authors>
<owners>Syncfusion Inc.</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>http://www.syncfusion.com/nuget/license</licenseUrl>
<projectUrl>http://www.syncfusion.com/</projectUrl>
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>Backdrop page for Syncfusion .NET MAUI</description>
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
<dependencies>
<group targetFramework="net6.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-windows10.0.19041.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>

Просмотреть файл

@ -0,0 +1,31 @@
<Project>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Backdrop\Backdrop.xaml.cs">
<Link>Samples\Backdrop\Backdrop.xaml.cs</Link>
<DependentUpon>Backdrop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Backdrop\InitialPage.xaml.cs">
<Link>Samples\Backdrop\InitialPage.xaml.cs</Link>
<DependentUpon>InitialPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Backdrop\TitleConverter.cs">
<Link>Samples\Backdrop\TitleConverter.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\BackdropSamplesList.xml" >
<Link>BackdropSamplesList.xml</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Backdrop\Backdrop.xaml">
<Link>Samples\Backdrop\Backdrop.xaml</Link>
</MauiXaml>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Backdrop\InitialPage.xaml">
<Link>Samples\Backdrop\InitialPage.xaml</Link>
</MauiXaml>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8" ?>
<backdrop:SfBackdropPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Backdrop.SfBackdropPage.Backdrop"
xmlns:backdrop="clr-namespace:Syncfusion.Maui.Backdrop;assembly=Syncfusion.Maui.Backdrop"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
x:Name="backdropPage"
BackLayerRevealOption="Auto"
NavigationPage.HasBackButton = "{OnPlatform Default=True, WinUI=False}"
>
<backdrop:SfBackdropPage.Resources>
<ResourceDictionary>
<local:TitleConverter x:Key="TitleConverter"/>
</ResourceDictionary>
<Color x:Key="primaryColor">#007DE6</Color>
<Color x:Key="primaryTextColor">#FFFFFF</Color>
<Style TargetType="Label">
<Setter Property="TextColor" Value="{StaticResource primaryTextColor}"/>
<Setter Property="FontSize" Value="16"/>
</Style>
<Style TargetType="Button">
<Setter Property="WidthRequest" Value="96"/>
<Setter Property="HeightRequest" Value="40"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Margin" Value="0,0,0,15"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Background" Value="#1F000000"/>
</Style>
</backdrop:SfBackdropPage.Resources>
<NavigationPage.TitleView>
<HorizontalStackLayout>
<Label Text="&#xe74a;"
IsVisible="{OnPlatform Default=False, WinUI=True}"
FontFamily="{OnPlatform iOS=Sync FontIcons, MacCatalyst=Sync FontIcons, Android=Sync FontIcons.ttf#, WinUI=Sync FontIcons.ttf#Sync FontIcons}"
VerticalOptions="Center"
FontSize="Title"
Margin="{OnPlatform WinUI='10,0,0,15'}">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="BackButtonLabel_Tapped"/>
</Label.GestureRecognizers>
</Label>
<Label Text="{Binding Source={x:Reference backdropPage},Path=IsBackLayerRevealed,Converter={StaticResource TitleConverter}}"
FontSize="Title"
VerticalTextAlignment="Center"
Margin="{OnPlatform WinUI='10,0,0,15'}"/>
</HorizontalStackLayout>
</NavigationPage.TitleView>
<backdrop:SfBackdropPage.BackLayer>
<backdrop:BackdropBackLayer >
<StackLayout Padding="20,16,20,16" Spacing="5">
<Label Text="Edge shape" TextColor="White"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="curveButton" Text="Curve" Clicked="curveButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="flatButton" Text="Flat" Clicked="flatButton_Clicked" Grid.Column="1"/>
</Grid>
<Label Text="Apply corner radius" TextColor="White"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="bothButton" Text="Both" Clicked="bothButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="leftButton" Text="Left" Clicked="leftButton_Clicked" Grid.Column="1"/>
<Button x:Name="rightButton" Text="Right" Clicked="rightButton_Clicked" Grid.Column="2"/>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Text="{Binding Source={x:Reference cornerRadiusSlider},Path=Value,StringFormat='Corner radius : {0:0}'}" TextColor="White"/>
<Label HorizontalTextAlignment="Start" Grid.Column="1" Text="" TextColor="White"/>
</Grid>
<sliders:SfSlider x:Name="cornerRadiusSlider"
Minimum="0"
Maximum="{OnPlatform WinUI=20, MacCatalyst=20, Default=40}"
WidthRequest="{OnPlatform WinUI=300, MacCatalyst=300}"
HorizontalOptions="{OnPlatform WinUI=Start, MacCatalyst=Start}"
Value="{Binding Source={x:Reference frontLayer},Path=LeftCornerRadius,Mode=OneTime}"
ValueChanged="cornerRadiusSlider_ValueChanged"
HeightRequest="40">
<sliders:SfSlider.TrackStyle>
<sliders:SliderTrackStyle ActiveFill="#FFFFFF"
InactiveFill="#3DFFFFFF"/>
</sliders:SfSlider.TrackStyle>
<sliders:SfSlider.ThumbStyle>
<sliders:SliderThumbStyle Fill="#FFFFFF"/>
</sliders:SfSlider.ThumbStyle>
<sliders:SfSlider.ThumbOverlayStyle>
<sliders:SliderThumbOverlayStyle Radius="0"/>
</sliders:SfSlider.ThumbOverlayStyle>
</sliders:SfSlider>
<Label Text="Change back layer reveal option" TextColor="White"
/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="autoButton" Text="Auto" Clicked="autoButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="fillButton" Text="Fill" Grid.Column="1" Clicked="fillButton_Clicked"/>
</Grid>
</StackLayout>
</backdrop:BackdropBackLayer>
</backdrop:SfBackdropPage.BackLayer>
<backdrop:SfBackdropPage.FrontLayer>
<backdrop:BackdropFrontLayer x:Name="frontLayer"
RevealedHeight="{Binding Source={x:Reference frontLayerheader},Path=Height}">
<StackLayout VerticalOptions="FillAndExpand">
<Label Padding="10,0,10,10" x:Name="frontLayerheader" Text="Subheader" FontSize="16" TextColor="#828589" VerticalTextAlignment="Center" HeightRequest="48"/>
<Grid Padding="10,0,10,10" ColumnSpacing="10" RowSpacing="10" VerticalOptions="FillAndExpand">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="{imageExtension:SfImageResource brownie.png}" Aspect="AspectFill" Grid.Row="0"/>
<Image Source="{imageExtension:SfImageResource cupcake.png}" Aspect="AspectFill" Grid.Row="1"/>
<Image Source="{imageExtension:SfImageResource cake.png}" Aspect="AspectFill" Grid.Row="2"/>
<Image Source="{imageExtension:SfImageResource icecake.png}" Aspect="AspectFill" Grid.Row="0" Grid.Column="1"/>
<Image Source="{imageExtension:SfImageResource cookie.png}" Aspect="AspectFill" Grid.Row="1" Grid.Column="1"/>
<Image Source="{imageExtension:SfImageResource biscuits.png}" Aspect="AspectFill" Grid.Row="2" Grid.Column="1"/>
</Grid>
</StackLayout>
</backdrop:BackdropFrontLayer>
</backdrop:SfBackdropPage.FrontLayer>
</backdrop:SfBackdropPage>

Просмотреть файл

@ -0,0 +1,100 @@
#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.SfBackdropPage;
using Syncfusion.Maui.Backdrop;
using Syncfusion.Maui.Sliders;
public partial class Backdrop : SfBackdropPage
{
string edgeShapeSide;
Color pressedColor;
Color normalColor;
public Backdrop()
{
InitializeComponent();
edgeShapeSide = "Both";
pressedColor = Color.FromArgb("#3DFFFFFF");
normalColor = Color.FromArgb("#1F000000");
}
private void curveButton_Clicked(object sender, EventArgs e)
{
this.FrontLayer.EdgeShape = EdgeShape.Curve;
this.curveButton.Background = pressedColor;
this.flatButton.Background = normalColor;
}
private void flatButton_Clicked(object sender, EventArgs e)
{
this.FrontLayer.EdgeShape = EdgeShape.Flat;
this.flatButton.Background = pressedColor;
this.curveButton.Background = normalColor;
}
private void bothButton_Clicked(object sender, EventArgs e)
{
edgeShapeSide = "Both";
FrontLayer.LeftCornerRadius = cornerRadiusSlider.Value;
FrontLayer.RightCornerRadius = cornerRadiusSlider.Value;
this.bothButton.Background = pressedColor;
this.leftButton.Background = this.rightButton.Background = normalColor;
}
private void leftButton_Clicked(object sender, EventArgs e)
{
edgeShapeSide = "Left";
FrontLayer.RightCornerRadius = 0;
FrontLayer.LeftCornerRadius = cornerRadiusSlider.Value;
this.leftButton.Background = pressedColor;
this.rightButton.Background = this.bothButton.Background = normalColor;
}
private void rightButton_Clicked(object sender, EventArgs e)
{
edgeShapeSide = "Right";
FrontLayer.LeftCornerRadius = 0;
FrontLayer.RightCornerRadius = cornerRadiusSlider.Value;
this.rightButton.Background = pressedColor;
this.leftButton.Background = this.bothButton.Background = normalColor;
}
private void autoButton_Clicked(object sender, EventArgs e)
{
this.BackLayerRevealOption = RevealOption.Auto;
this.autoButton.Background = pressedColor;
this.fillButton.Background = normalColor;
}
private void fillButton_Clicked(object sender, EventArgs e)
{
this.BackLayerRevealOption = RevealOption.Fill;
this.fillButton.Background = pressedColor;
this.autoButton.Background = normalColor;
}
private void cornerRadiusSlider_ValueChanged(object sender, SliderValueChangedEventArgs e)
{
switch (edgeShapeSide)
{
case "Right":
FrontLayer.RightCornerRadius = e.NewValue;
break;
case "Left":
FrontLayer.LeftCornerRadius = e.NewValue;
break;
case "Both":
FrontLayer.RightCornerRadius = e.NewValue;
FrontLayer.LeftCornerRadius = e.NewValue;
break;
}
}
private void BackButtonLabel_Tapped(object sender, EventArgs e)
{
Navigation.PopAsync();
}
}

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Backdrop.SfBackdropPage.InitialPage"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
>
<localCore:SampleView.Content>
<Button Clicked="OpenBackdropPage"
HorizontalOptions="Center"
VerticalOptions="Center"
Text="Click to open the backdrop"/>
</localCore:SampleView.Content>
</localCore:SampleView>

Просмотреть файл

@ -0,0 +1,33 @@
#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;
namespace SampleBrowser.Maui.Backdrop.SfBackdropPage;
public partial class InitialPage : SampleView
{
public InitialPage()
{
InitializeComponent();
}
private void OpenBackdropPage(object sender, EventArgs e)
{
if (Application.Current != null && Application.Current.MainPage != null)
{
var page = Application.Current.MainPage as NavigationPage;
if (page != null)
{
page.BarBackgroundColor = Color.FromArgb("#6200EE");
page.BarTextColor = Colors.White;
}
}
Navigation.PushAsync(new Backdrop(), true);
}
}

Просмотреть файл

@ -0,0 +1,34 @@
#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 System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SampleBrowser.Maui.Backdrop
{
public class TitleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value != null)
{
return (bool)value ? "Settings" : "Backdrop";
}
return "";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
}

Просмотреть файл

Просмотреть файл

@ -0,0 +1,16 @@
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
</activePackageSource>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>

Просмотреть файл

@ -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.BadgeView", "SampleBrowser.Maui.BadgeView\SampleBrowser.Maui.BadgeView.csproj", "{450EEE40-B66A-413A-91C6-3CEF43187EF2}"
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
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Release|Any CPU.Build.0 = Release|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Release|Any CPU.Deploy.0 = Release|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Release-Xml|Any CPU.ActiveCfg = Release-Xml|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.Release-Xml|Any CPU.Build.0 = Release-Xml|Any CPU
{450EEE40-B66A-413A-91C6-3CEF43187EF2}.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

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BadgeView"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.BadgeView.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

Просмотреть файл

@ -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.BadgeView;
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);
}
}

Просмотреть файл

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Notification">
<Control Title="BadgeView" ControlName="SfBadgeView" Description="Badge shows a circle or rectangle which contain a number or message." Image="badgeview.png">
<Category Title="Features">
<Sample Title="Offset" SampleName="Offset" Description="Showcases the badge with different offset values." SearchTags="badgeView, badge, offset" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Type" SampleName="Type" Description="Showcases the different badge types available in the Badge View" SearchTags="badgeView, badge, type, badge type" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Position" SampleName="Position" Description="Showcases different badge positions in Badge View." SearchTags="badgeView, badge, badge position, position" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Border" SampleName="Border" Description="Showcases the border customization in Badge View." SearchTags="badgeView, badge, border, customization" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Font" SampleName="Font" Description="Showcases the font customization in Badge View." SearchTags="badgeView, badge, customization, font" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Alignment" SampleName="Alignment" Description="This sample shows the different alignments available to align the badge." SearchTags="badgeView, badge, alignment, customization" CodeViewerPath="BadgeView/Customization/" />
<Sample Title="Icon" SampleName="Icon" Description="This sample shows the pre-defined icons available in Badge View." SearchTags="badgeView, badge, customization, icon" CodeViewerPath="BadgeView/Customization/" />
</Category>
<Sample Title="Notification" SampleName="Notification" SearchTags="listview, badge, badgeView, badge view, notification" CodeViewerPath="BadgeView/Notification/" />
</Control>
</ControlCategory>
</SyncfusionControls>

Просмотреть файл

@ -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.BadgeView
{
// All the code in this file is included in all platforms.
public class ControlConfig
{
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<SampleBrowser>
<Assemblies Prefix="SampleBrowser.Maui.BadgeView" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<Assembly Name="BadgeView" />
</Assemblies>
</SampleBrowser>

Просмотреть файл

@ -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.BadgeView;
using Syncfusion.Maui.Core.Hosting;
using SampleBrowser.Maui.Base.Hosting;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.ConfigureSampleBrowserBase();
return builder.Build();
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

Просмотреть файл

@ -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.BadgeView;
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}

Просмотреть файл

@ -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.BadgeView;
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

Просмотреть файл

@ -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.BadgeView;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -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.BadgeView;
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));
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="SampleBrowser.Maui.BadgeView.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:SampleBrowser.Maui.BadgeView.WinUI">
</maui:MauiWinUIApplication>

Просмотреть файл

@ -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.BadgeView.WinUI;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// 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().
/// </summary>
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 Badge View Demo";
}
}
}
}

Просмотреть файл

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Publisher="CN=User Name" />
<Properties>
<PublisherDisplayName>User Name</PublisherDisplayName>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<PackageDependency Name="Microsoft.VCLibs.140.00" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements />
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="SampleBrowser.Maui.BadgeView.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

Просмотреть файл

@ -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.BadgeView;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше