v27.2.2
|
@ -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.AIAssistView", "SampleBrowser.Maui.AIAssistView\SampleBrowser.Maui.AIAssistView.csproj", "{F95E7D71-B87A-4E0B-8464-2678A62965A3}"
|
||||
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
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Release-Xml|Any CPU.ActiveCfg = Release-Xml|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.Release-Xml|Any CPU.Build.0 = Release-Xml|Any CPU
|
||||
{F95E7D71-B87A-4E0B-8464-2678A62965A3}.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,9 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SyncfusionControls>
|
||||
<ControlCategory Name="Smart AI Solutions">
|
||||
<Control Title="AI AssistView" ControlName="SfAIAssistView" IsPreview="true" StatusTag="New" Image="aiAssistView.png" Description="AIAssistView is a versatile component designed to enhance interaction between users and AI services.">
|
||||
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" StatusTag="New" CodeViewerPath="AIAssistView/GettingStarted/" />
|
||||
<Sample SearchTags="Contorl Template" SampleName="ControlTemplateDemo" Title="Control Template" StatusTag="New" Description="This sample shows how to customize the control template to create Copilot-like UI." CodeViewerPath="AIAssistView/ControlTemplateDemo/" />
|
||||
</Control>
|
||||
</ControlCategory>
|
||||
</SyncfusionControls>
|
|
@ -0,0 +1,18 @@
|
|||
<?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.AIAssistView"
|
||||
xmlns:base ="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:theme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
|
||||
x:Class="SampleBrowser.Maui.AIAssistView.App">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
|
||||
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
|
||||
<base:SampleBrowserStyles/>
|
||||
<theme:SyncfusionThemeResourceDictionary/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,30 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//MainPage = new AppShell();
|
||||
|
||||
var appInfo = typeof(App).GetTypeInfo().Assembly;
|
||||
SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true;
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState? activationState)
|
||||
{
|
||||
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
|
||||
var mainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(assembly);
|
||||
return new Window(mainPage);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. 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.AIAssistView
|
||||
{
|
||||
public class ControlConfig
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SampleBrowser>
|
||||
<Assemblies Prefix="SampleBrowser.Maui.AIAssistView" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublickeyToken=null">
|
||||
<Assembly Name="AIAssistView"/>
|
||||
</Assemblies>
|
||||
</SampleBrowser>
|
|
@ -0,0 +1,30 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
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");
|
||||
fonts.AddFont("Roboto-Medium.ttf", "Roboto-Medium");
|
||||
fonts.AddFont("Roboto-Regular.ttf", "Roboto-Regular");
|
||||
});
|
||||
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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
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.AIAssistView.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.AIAssistView.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.AIAssistView.WinUI">
|
||||
|
||||
</maui:MauiWinUIApplication>
|
|
@ -0,0 +1,50 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView.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);
|
||||
|
||||
if (IPlatformApplication.Current != null)
|
||||
{
|
||||
foreach (var item in IPlatformApplication.Current.Application.Windows)
|
||||
{
|
||||
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
|
||||
|
||||
if (platformWindow != null)
|
||||
{
|
||||
platformWindow.ExtendsContentIntoTitleBar = false;
|
||||
platformWindow.Title = ".NET MAUI AIAssistView Demo";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?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:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
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" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="0CA344B9-03A6-44F3-8220-AD2CD5134431" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<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.AIAssistView.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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView;
|
||||
|
||||
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,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="456" height="456" fill="#512BD4" />
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 228 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 |
Двоичные данные
MAUI/AIAssistView/SampleBrowser.Maui.AIAssistView/Resources/Fonts/OpenSans-Regular.ttf
Normal file
Двоичные данные
MAUI/AIAssistView/SampleBrowser.Maui.AIAssistView/Resources/Fonts/OpenSans-Semibold.ttf
Normal file
Двоичные данные
MAUI/AIAssistView/SampleBrowser.Maui.AIAssistView/Resources/Fonts/Roboto-Medium.ttf
Normal file
Двоичные данные
MAUI/AIAssistView/SampleBrowser.Maui.AIAssistView/Resources/Fonts/Roboto-Regular.ttf
Normal file
|
@ -0,0 +1,93 @@
|
|||
<svg width="419" height="519" viewBox="0 0 419 519" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M284.432 247.568L284.004 221.881C316.359 221.335 340.356 211.735 355.308 193.336C382.408 159.996 372.893 108.183 372.786 107.659L398.013 102.831C398.505 105.432 409.797 167.017 375.237 209.53C355.276 234.093 324.719 246.894 284.432 247.568Z" fill="#8A6FE8"/>
|
||||
<path d="M331.954 109.36L361.826 134.245C367.145 138.676 375.055 137.959 379.497 132.639C383.928 127.32 383.211 119.41 377.891 114.969L348.019 90.0842C342.7 85.6531 334.79 86.3702 330.348 91.6896C325.917 97.0197 326.634 104.929 331.954 109.36Z" fill="#8A6FE8"/>
|
||||
<path d="M407.175 118.062L417.92 94.2263C420.735 87.858 417.856 80.4087 411.488 77.5831C405.12 74.7682 397.67 77.6473 394.845 84.0156L383.831 108.461L407.175 118.062Z" fill="#8A6FE8"/>
|
||||
<path d="M401.363 105.175L401.234 69.117C401.181 62.1493 395.498 56.541 388.53 56.5945C381.562 56.648 375.954 62.3313 376.007 69.2989L376.018 96.11L401.363 105.175Z" fill="#8A6FE8"/>
|
||||
<path d="M386.453 109.071L378.137 73.9548C376.543 67.169 369.757 62.9628 362.971 64.5575C356.185 66.1523 351.979 72.938 353.574 79.7237L362.04 115.482L386.453 109.071Z" fill="#8A6FE8"/>
|
||||
<path d="M381.776 142.261C396.359 142.261 408.181 130.44 408.181 115.857C408.181 101.274 396.359 89.4527 381.776 89.4527C367.194 89.4527 355.372 101.274 355.372 115.857C355.372 130.44 367.194 142.261 381.776 142.261Z" fill="url(#paint0_radial)"/>
|
||||
<path d="M248.267 406.979C248.513 384.727 245.345 339.561 222.376 301.736L199.922 315.372C220.76 349.675 222.323 389.715 221.841 407.182C221.798 408.627 235.263 409.933 248.267 406.979Z" fill="url(#paint1_linear)"/>
|
||||
<path d="M221.841 406.936L242.637 406.84L262.052 518.065L220.311 518.258C217.132 518.269 214.724 515.711 214.938 512.532L221.841 406.936Z" fill="#522CD5"/>
|
||||
<path d="M306.566 488.814C310.173 491.661 310.109 495.782 309.831 500.127L308.964 513.452C308.803 515.839 306.727 517.798 304.34 517.809L260.832 518.012C258.125 518.023 256.08 515.839 256.262 513.142L256.551 499.335C256.883 494.315 255.192 492.474 251.307 487.744C244.649 479.663 224.967 435.62 226.84 406.925L248.256 406.829C249.691 423.858 272.167 461.682 306.566 488.814Z" fill="url(#paint2_linear)"/>
|
||||
<path d="M309.82 500.127C310.023 497.088 310.077 494.176 308.889 491.715L254.635 491.961C256.134 494.166 256.765 496.092 256.562 499.314L256.273 513.121C256.091 515.828 258.146 518.012 260.843 517.99L304.34 517.798C306.727 517.787 308.803 515.828 308.964 513.442L309.82 500.127Z" fill="url(#paint3_radial)"/>
|
||||
<path d="M133.552 407.471C133.103 385.22 135.864 340.021 158.49 301.993L181.073 315.425C160.545 349.921 159.346 389.972 159.989 407.428C160.042 408.884 146.578 410.318 133.552 407.471Z" fill="url(#paint4_linear)"/>
|
||||
<path d="M110.798 497.152C110.765 494.187 111.204 491.575 112.457 487.23C131.882 434.132 133.52 407.364 133.52 407.364L159.999 407.246C159.999 407.246 161.819 433.512 181.716 486.427C183.289 490.195 183.471 493.641 183.674 496.831L183.792 513.816C183.803 516.374 181.716 518.483 179.158 518.494L177.873 518.504L116.781 518.782L115.496 518.793C112.927 518.804 110.83 516.728 110.819 514.159L110.798 497.152Z" fill="url(#paint5_linear)"/>
|
||||
<path d="M110.798 497.152C110.798 496.67 110.808 496.199 110.83 495.739C110.969 494.262 111.643 492.603 114.875 492.582L180.207 492.282C182.561 492.367 183.343 494.176 183.589 495.311C183.621 495.814 183.664 496.328 183.696 496.82L183.813 513.806C183.824 515.411 183.011 516.824 181.769 517.669C181.031 518.172 180.132 518.472 179.179 518.483L177.895 518.494L116.802 518.772L115.528 518.782C114.244 518.793 113.077 518.269 112.232 517.434C111.386 516.599 110.862 515.432 110.851 514.148L110.798 497.152Z" fill="url(#paint6_radial)"/>
|
||||
<path d="M314.979 246.348C324.162 210.407 318.008 181.777 318.008 181.777L326.452 181.734L326.656 181.574C314.262 115.75 256.326 66.0987 186.949 66.4198C108.796 66.773 45.7233 130.424 46.0765 208.577C46.4297 286.731 110.08 349.803 188.234 349.45C249.905 349.172 302.178 309.474 321.304 254.343C321.872 251.999 321.797 247.804 314.979 246.348Z" fill="url(#paint7_radial)"/>
|
||||
<path d="M310.237 279.035L65.877 280.148C71.3998 289.428 77.95 298.012 85.3672 305.761L290.972 304.829C298.336 297.005 304.8 288.368 310.237 279.035Z" fill="#D8CFF7"/>
|
||||
<path d="M235.062 312.794L280.924 312.585L280.74 272.021L234.877 272.23L235.062 312.794Z" fill="#512BD4"/>
|
||||
<path d="M243.001 297.626C242.691 297.626 242.434 297.53 242.22 297.327C242.006 297.123 241.899 296.866 241.899 296.588C241.899 296.299 242.006 296.042 242.22 295.839C242.434 295.625 242.691 295.528 243.001 295.528C243.312 295.528 243.568 295.635 243.782 295.839C243.996 296.042 244.114 296.299 244.114 296.588C244.114 296.877 244.007 297.123 243.793 297.327C243.568 297.519 243.312 297.626 243.001 297.626Z" fill="white"/>
|
||||
<path d="M255.192 297.434H253.212L247.967 289.203C247.839 289 247.721 288.775 247.636 288.55H247.593C247.636 288.786 247.657 289.299 247.657 290.091L247.668 297.444H245.912L245.891 286.228H247.999L253.062 294.265C253.276 294.597 253.415 294.833 253.479 294.95H253.511C253.458 294.651 253.437 294.148 253.437 293.441L253.426 286.217H255.17L255.192 297.434Z" fill="white"/>
|
||||
<path d="M263.733 297.412L257.589 297.423L257.568 286.206L263.465 286.195V287.779L259.387 287.79L259.398 290.969L263.155 290.958V292.532L259.398 292.542L259.409 295.86L263.733 295.85V297.412Z" fill="white"/>
|
||||
<path d="M272.445 287.758L269.298 287.769L269.32 297.401H267.5L267.479 287.769L264.343 287.779V286.195L272.434 286.174L272.445 287.758Z" fill="white"/>
|
||||
<path d="M315.279 246.337C324.355 210.836 318.457 182.483 318.308 181.798L171.484 182.462C171.484 182.462 162.226 181.563 162.268 190.018C162.311 198.463 162.761 222.341 162.878 248.746C162.9 254.172 167.363 256.773 170.863 256.751C170.874 256.751 311.618 252.213 315.279 246.337Z" fill="url(#paint8_radial)"/>
|
||||
<path d="M227.685 246.798C227.685 246.798 250.183 228.827 254.571 225.499C258.959 222.17 262.812 221.977 266.869 225.445C270.925 228.913 293.616 246.498 293.616 246.498L227.685 246.798Z" fill="#A08BE8"/>
|
||||
<path d="M320.748 256.141C320.748 256.141 324.943 248.414 315.279 246.348C315.289 246.305 170.927 246.894 170.927 246.894C167.566 246.905 163.232 244.925 162.846 241.671C162.857 244.004 162.878 246.369 162.889 248.756C162.91 253.68 166.582 256.27 169.878 256.698C170.21 256.73 170.542 256.773 170.874 256.773L180.742 256.73L320.748 256.141Z" fill="#512BD4"/>
|
||||
<path d="M206.4 233.214C212.511 233.095 217.302 224.667 217.102 214.39C216.901 204.112 211.785 195.878 205.674 195.997C199.563 196.116 194.772 204.544 194.973 214.821C195.173 225.099 200.289 233.333 206.4 233.214Z" fill="#512BD4"/>
|
||||
<path d="M306.249 214.267C306.356 203.989 301.488 195.605 295.377 195.541C289.266 195.478 284.225 203.758 284.118 214.037C284.011 224.315 288.878 232.699 294.99 232.763C301.101 232.826 306.142 224.545 306.249 214.267Z" fill="#512BD4"/>
|
||||
<path d="M205.905 205.291C208.152 203.022 211.192 202.016 214.157 202.262C215.912 205.495 217.014 209.733 217.111 214.389C217.164 217.3 216.811 220.04 216.158 222.513C212.669 223.519 208.752 222.662 205.979 219.922C201.912 215.909 201.88 209.348 205.905 205.291Z" fill="#8065E0"/>
|
||||
<path d="M294.996 204.285C297.255 202.016 300.294 200.999 303.259 201.256C305.164 204.628 306.309 209.209 306.256 214.239C306.224 216.808 305.892 219.259 305.303 221.485C301.793 222.523 297.843 221.678 295.061 218.916C291.004 214.892 290.972 208.342 294.996 204.285Z" fill="#8065E0"/>
|
||||
<path d="M11.6342 357.017C10.9171 354.716 -5.72611 300.141 21.3204 258.903C36.9468 235.078 63.3083 221.035 99.6664 217.15L102.449 243.276C74.3431 246.273 54.4676 256.345 43.3579 273.202C23.0971 303.941 36.5722 348.733 36.7113 349.183L11.6342 357.017Z" fill="url(#paint9_linear)"/>
|
||||
<path d="M95.1498 252.802C109.502 252.802 121.137 241.167 121.137 226.815C121.137 212.463 109.502 200.828 95.1498 200.828C80.7976 200.828 69.1628 212.463 69.1628 226.815C69.1628 241.167 80.7976 252.802 95.1498 252.802Z" fill="url(#paint10_radial)"/>
|
||||
<path d="M72.0098 334.434L33.4683 329.307C26.597 328.397 20.2929 333.214 19.3725 340.085C18.4627 346.956 23.279 353.26 30.1504 354.181L68.6919 359.308C75.5632 360.217 81.8673 355.401 82.7878 348.53C83.6975 341.658 78.8705 335.344 72.0098 334.434Z" fill="#8A6FE8"/>
|
||||
<path d="M3.73535 367.185L7.35297 393.076C8.36975 399.968 14.7702 404.731 21.6629 403.725C28.5556 402.708 33.3185 396.308 32.3124 389.415L28.5984 362.861L3.73535 367.185Z" fill="#8A6FE8"/>
|
||||
<path d="M15.5194 374.988L34.849 405.427C38.6058 411.292 46.4082 413.005 52.2735 409.248C58.1387 405.491 59.8512 397.689 56.0945 391.823L41.7953 369.144L15.5194 374.988Z" fill="#8A6FE8"/>
|
||||
<path d="M26.0511 363.739L51.8026 389.019C56.7688 393.911 64.7532 393.846 69.6445 388.88C74.5358 383.914 74.4715 375.929 69.516 371.038L43.2937 345.297L26.0511 363.739Z" fill="#8A6FE8"/>
|
||||
<path d="M26.4043 381.912C40.987 381.912 52.8086 370.091 52.8086 355.508C52.8086 340.925 40.987 329.104 26.4043 329.104C11.8216 329.104 0 340.925 0 355.508C0 370.091 11.8216 381.912 26.4043 381.912Z" fill="url(#paint11_radial)"/>
|
||||
<path d="M184.73 63.6308L157.819 66.5892L158.561 38.5412L177.888 36.4178L184.73 63.6308Z" fill="#8A6FE8"/>
|
||||
<path d="M170.018 41.647C180.455 39.521 187.193 29.3363 185.067 18.8988C182.941 8.46126 172.757 1.72345 162.319 3.84944C151.882 5.97543 145.144 16.1601 147.27 26.5976C149.396 37.0351 159.58 43.773 170.018 41.647Z" fill="#D8CFF7"/>
|
||||
<path d="M196.885 79.385C198.102 79.2464 198.948 78.091 198.684 76.8997C195.851 64.2818 183.923 55.5375 170.773 56.9926C157.622 58.4371 147.886 69.5735 147.865 82.4995C147.863 83.7232 148.949 84.6597 150.168 84.5316L196.885 79.385Z" fill="url(#paint12_radial)"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(382.004 103.457) scale(26.4058)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint1_linear" x1="214.439" y1="303.482" x2="236.702" y2="409.505" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear" x1="231.673" y1="404.144" x2="297.805" y2="522.048" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint3_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(280.957 469.555) rotate(-0.260742) scale(45.8326)">
|
||||
<stop offset="0.034" stop-color="#522CD5"/>
|
||||
<stop offset="0.9955" stop-color="#8A6FE8"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint4_linear" x1="166.061" y1="303.491" x2="144.763" y2="409.709" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint5_linear" x1="146.739" y1="407.302" x2="147.246" y2="518.627" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint6_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(148.63 470.023) rotate(179.739) scale(50.2476)">
|
||||
<stop offset="0.034" stop-color="#522CD5"/>
|
||||
<stop offset="0.9955" stop-color="#8A6FE8"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint7_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(219.219 153.929) rotate(179.739) scale(140.935)">
|
||||
<stop offset="0.4744" stop-color="#A08BE8"/>
|
||||
<stop offset="0.8618" stop-color="#8065E0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint8_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(314.861 158.738) rotate(179.739) scale(146.053)">
|
||||
<stop offset="0.0933" stop-color="#E1DFDD"/>
|
||||
<stop offset="0.6573" stop-color="white"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint9_linear" x1="54.1846" y1="217.159" x2="54.1846" y2="357.022" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.3344" stop-color="#9780E6"/>
|
||||
<stop offset="0.8488" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint10_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(90.3494 218.071) rotate(-0.260742) scale(25.9924)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint11_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.805 345.043) scale(26.4106)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint12_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(169.113 67.3662) rotate(-32.2025) scale(21.0773)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 12 KiB |
|
@ -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,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<Color x:Key="Primary">#512BD4</Color>
|
||||
<Color x:Key="Secondary">#DFD8F7</Color>
|
||||
<Color x:Key="Tertiary">#2B0B98</Color>
|
||||
<Color x:Key="White">White</Color>
|
||||
<Color x:Key="Black">Black</Color>
|
||||
<Color x:Key="Gray100">#E1E1E1</Color>
|
||||
<Color x:Key="Gray200">#C8C8C8</Color>
|
||||
<Color x:Key="Gray300">#ACACAC</Color>
|
||||
<Color x:Key="Gray400">#919191</Color>
|
||||
<Color x:Key="Gray500">#6E6E6E</Color>
|
||||
<Color x:Key="Gray600">#404040</Color>
|
||||
<Color x:Key="Gray900">#212121</Color>
|
||||
<Color x:Key="Gray950">#141414</Color>
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
|
||||
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
|
||||
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
|
||||
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
|
||||
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
|
||||
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
|
||||
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
|
||||
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
|
||||
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
|
||||
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
|
||||
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
|
||||
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
|
||||
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
|
||||
|
||||
<Color x:Key="Yellow100Accent">#F7B548</Color>
|
||||
<Color x:Key="Yellow200Accent">#FFD590</Color>
|
||||
<Color x:Key="Yellow300Accent">#FFE5B9</Color>
|
||||
<Color x:Key="Cyan100Accent">#28C2D1</Color>
|
||||
<Color x:Key="Cyan200Accent">#7BDDEF</Color>
|
||||
<Color x:Key="Cyan300Accent">#C3F2F4</Color>
|
||||
<Color x:Key="Blue100Accent">#3E8EED</Color>
|
||||
<Color x:Key="Blue200Accent">#72ACF1</Color>
|
||||
<Color x:Key="Blue300Accent">#A7CBF6</Color>
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,384 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<!--<Style TargetType="ActivityIndicator">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="IndicatorView">
|
||||
<Setter Property="IndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}"/>
|
||||
<Setter Property="SelectedIndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray100}}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="StrokeShape" Value="Rectangle"/>
|
||||
<Setter Property="StrokeThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="BoxView">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Primary}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Padding" Value="14,10"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="DatePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Editor">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Entry">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Frame">
|
||||
<Setter Property="HasShadow" Value="False" />
|
||||
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ImageButton">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="BorderColor" Value="Transparent"/>
|
||||
<Setter Property="BorderWidth" Value="0"/>
|
||||
<Setter Property="CornerRadius" Value="0"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Picker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ProgressBar">
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RefreshView">
|
||||
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchHandler">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shadow">
|
||||
<Setter Property="Radius" Value="15" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
<Setter Property="Brush" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Offset" Value="10,10" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Slider">
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SwipeItem">
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Switch">
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="ThumbColor" Value="{StaticResource White}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TimePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Page" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shell" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
|
||||
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="Shell.NavBarHasShadow" Value="False" />
|
||||
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="NavigationPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TabbedPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>-->
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,106 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
|
||||
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SampleBrowser.Maui.AIAssistView</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>
|
||||
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
|
||||
|
||||
<!-- Display name -->
|
||||
<ApplicationTitle>SampleBrowser.Maui.AIAssistView</ApplicationTitle>
|
||||
|
||||
<!-- App Identifier -->
|
||||
<ApplicationId>com.companyname.samplebrowser.maui.aiAssistView</ApplicationId>
|
||||
<ApplicationIdGuid>35d80fab-53eb-49a2-8975-5b7e072c3205</ApplicationIdGuid>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.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>
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<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="Resources\Fonts\Roboto-Medium.ttf" />
|
||||
<None Remove="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ControlList.xml" />
|
||||
<EmbeddedResource Include="AIAssistViewSamplesList.xml" />
|
||||
<EmbeddedResource Include="SyncfusionLicense.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.25.0" />
|
||||
<PackageReference Include="Syncfusion.Maui.AIAssistView" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Buttons" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Calendar" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Carousel" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Chat" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.DataSource" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.GridCommon" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Inputs" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.ListView" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Picker" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Popup" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="27.2.2" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="27.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>SampleBrowser.Maui.AIAssistView</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>AIAssistView component for Syncfusion .NET MAUI</description>
|
||||
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
|
||||
</metadata>
|
||||
</package>
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\GettingStarted\View\GettingStarted.xaml.cs">
|
||||
<Link>Samples\AIAssistView\GettingStarted\View\GettingStarted.xaml.cs</Link>
|
||||
<DependentUpon>GettingStarted.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\GettingStarted\ViewModel\GettingStartedViewModel.cs">
|
||||
<Link>Samples\AIAssistView\GettingStarted\ViewModel\GettingStartedViewModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\GettingStarted\Helper\Behaviors.cs">
|
||||
<Link>Samples\AIAssistView\GettingStarted\Helper\Behaviors.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\GettingStarted\Model\GettingStartedModel.cs">
|
||||
<Link>Samples\AIAssistView\GettingStarted\Model\GettingStartedModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\Model\ControlTemplateModel.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\Model\ControlTemplateModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\ViewModel\ControlTemplateViewModel.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\ViewModel\ControlTemplateViewModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\Helper\Converter.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\Helper\Converter.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\Helper\Behavior.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\Helper\Behavior.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\Helper\CustomAssistViewChat.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\Helper\CustomAssistViewChat.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\View\ComposeView.xaml.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\View\ComposeView.xaml.cs</Link>
|
||||
<DependentUpon>ComposeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\View\ControlTemplateDemo.xaml.cs">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\View\ControlTemplateDemo.xaml.cs</Link>
|
||||
<DependentUpon>ControlTemplateDemo.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\AzureBaseService\AzureBaseService.cs">
|
||||
<Link>Samples\AIAssistView\AzureBaseService\AzureBaseService.cs</Link>
|
||||
</Compile>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\AIAssistViewSamplesList.xml" >
|
||||
<Link>AIAssistViewSamplesList.xml</Link>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\GettingStarted\View\GettingStarted.xaml">
|
||||
<Link>Samples\AIAssistView\GettingStarted\View\GettingStarted.xaml</Link>
|
||||
</MauiXaml>
|
||||
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\View\ControlTemplateDemo.xaml">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\View\ControlTemplateDemo.xaml</Link>
|
||||
</MauiXaml>
|
||||
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\AIAssistView\ControlTemplateDemo\View\ComposeView.xaml">
|
||||
<Link>Samples\AIAssistView\ControlTemplateDemo\View\ComposeView.xaml</Link>
|
||||
</MauiXaml>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,333 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.SemanticKernel.ChatCompletion;
|
||||
using Microsoft.SemanticKernel;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public abstract class AzureBaseService
|
||||
{
|
||||
#region Fields
|
||||
|
||||
/// <summary>
|
||||
/// The EndPoint
|
||||
/// </summary>
|
||||
private const string endpoint = "https://YOUR_ACCOUNT.openai.azure.com/";
|
||||
|
||||
/// <summary>
|
||||
/// The Deployment name
|
||||
/// </summary>
|
||||
internal const string deploymentName = "deployment name";
|
||||
|
||||
/// <summary>
|
||||
/// The Image Deployment name
|
||||
/// </summary>
|
||||
internal const string imageDeploymentName = "IMAGE_MODEL_NAME";
|
||||
|
||||
/// <summary>
|
||||
/// The API key
|
||||
/// </summary>
|
||||
private const string key = "API key";
|
||||
|
||||
/// <summary>
|
||||
/// The chat completion service
|
||||
/// </summary>
|
||||
private IChatCompletionService? chatCompletions;
|
||||
|
||||
/// <summary>
|
||||
/// The kernal
|
||||
/// </summary>
|
||||
private Kernel? kernel;
|
||||
|
||||
/// <summary>
|
||||
/// The chat histroy
|
||||
/// </summary>
|
||||
private ChatHistory? chatHistory;
|
||||
|
||||
|
||||
private static bool isCredentialValid = false;
|
||||
|
||||
private static bool isAlreadyValidated = false;
|
||||
|
||||
private Uri? uriResult;
|
||||
|
||||
#endregion
|
||||
|
||||
public AzureBaseService()
|
||||
{
|
||||
ValidateCredential();
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Set a value indicating whether an credentials are valid or not.
|
||||
/// Returns <c>true</c> if the credentials are valid; otherwise, <c>false</c>.
|
||||
/// </summary>
|
||||
public static bool IsCredentialValid
|
||||
{
|
||||
get
|
||||
{
|
||||
return isCredentialValid;
|
||||
}
|
||||
set
|
||||
{
|
||||
isCredentialValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ChatHistory? ChatHistory
|
||||
{
|
||||
get
|
||||
{
|
||||
return chatHistory;
|
||||
}
|
||||
set
|
||||
{
|
||||
chatHistory = value;
|
||||
}
|
||||
}
|
||||
|
||||
public IChatCompletionService? ChatCompletions
|
||||
{
|
||||
get
|
||||
{
|
||||
return chatCompletions;
|
||||
}
|
||||
set
|
||||
{
|
||||
chatCompletions = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the kernal object
|
||||
/// </summary>
|
||||
public Kernel? Kernel
|
||||
{
|
||||
get
|
||||
{
|
||||
return kernel;
|
||||
}
|
||||
set
|
||||
{
|
||||
kernel = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Validate Azure Credentials
|
||||
/// </summary>
|
||||
private async void ValidateCredential()
|
||||
{
|
||||
#region Azure OpenAI
|
||||
// Use below method for Azure Open AI
|
||||
this.GetAzureOpenAIKernal();
|
||||
#endregion
|
||||
|
||||
#region Google Gimini
|
||||
// Use below method for Google Gimini
|
||||
//this.GetGoogleGiminiAIKernal();
|
||||
#endregion
|
||||
|
||||
if (isAlreadyValidated)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool isValidUri = Uri.TryCreate(endpoint, UriKind.Absolute, out uriResult)
|
||||
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
|
||||
|
||||
if (!isValidUri || !endpoint.Contains("http") || string.IsNullOrEmpty(key) || key.Contains("API key") || string.IsNullOrEmpty(deploymentName) || deploymentName.Contains("deployment name") || string.IsNullOrEmpty(imageDeploymentName))
|
||||
{
|
||||
ShowAlertAsync();
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (ChatHistory != null && chatCompletions != null)
|
||||
{
|
||||
// test the semantic kernal with message.
|
||||
ChatHistory.AddSystemMessage("Hello, Test Check");
|
||||
await chatCompletions.GetChatMessageContentAsync(chatHistory: ChatHistory, kernel: kernel);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle any exceptions that indicate the credentials or endpoint are invalid.
|
||||
ShowAlertAsync();
|
||||
return;
|
||||
}
|
||||
IsCredentialValid = true;
|
||||
isAlreadyValidated = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show Alert Popup
|
||||
/// </summary>
|
||||
private async void ShowAlertAsync()
|
||||
{
|
||||
var page = Application.Current?.Windows[0].Page;
|
||||
if (page != null && !IsCredentialValid)
|
||||
{
|
||||
isAlreadyValidated = true;
|
||||
await page.DisplayAlert("Alert", "The Azure API key or endpoint is missing or incorrect. Please verify your credentials. You can also continue with the offline data.", "OK");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Azure OpenAI
|
||||
/// <summary>
|
||||
/// To get the Azure open ai kernal method
|
||||
/// </summary>
|
||||
private void GetAzureOpenAIKernal()
|
||||
{
|
||||
// Create the chat history
|
||||
chatHistory = new ChatHistory();
|
||||
var builder = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(deploymentName, endpoint, key);
|
||||
|
||||
// Get the kernal from build
|
||||
kernel = builder.Build();
|
||||
|
||||
//Get the chat completions from kernal
|
||||
chatCompletions = kernel.GetRequiredService<IChatCompletionService>();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Goolge Gimini
|
||||
/// <summary>
|
||||
/// To get the google gimini ai kermal
|
||||
/// </summary>
|
||||
private void GetGoogleGiminiAIKernal()
|
||||
{
|
||||
// //First Add the below package to the application
|
||||
// add package Microsoft.SemanticKernel.Connectors.Google
|
||||
|
||||
// // Create the chat history
|
||||
// chatHistory = new ChatHistory();
|
||||
// #pragma warning disable SKEXP0070
|
||||
// IKernelBuilder kernelBuilder = Kernel.CreateBuilder();
|
||||
// kernelBuilder.AddGoogleAIGeminiChatCompletion(modelId: "NAME_OF_MODEL", apiKey: key);
|
||||
// Kernel kernel = kernelBuilder.Build();
|
||||
|
||||
// //Get the chat completions from kernal
|
||||
// chatCompletions = kernel.GetRequiredService<IChatCompletionService>();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class AzureAIService : AzureBaseService
|
||||
{
|
||||
public AzureAIService()
|
||||
{
|
||||
InitializeClient();
|
||||
}
|
||||
|
||||
public void InitializeClient()
|
||||
{
|
||||
if (IsCredentialValid && ChatHistory != null)
|
||||
{
|
||||
ChatHistory.Clear();
|
||||
ChatHistory.AddSystemMessage("You are a helpful, intelligent and conversational assistant that can assit with a wide variety of topics.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
internal async Task<string> GetResultsFromAI(string userPrompt, string userAIPrompt)
|
||||
{
|
||||
if (ChatCompletions != null && ChatHistory != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (ChatHistory.Count > 5)
|
||||
{
|
||||
//Remove the message history to avoid exceeding the token limit
|
||||
ChatHistory.RemoveRange(0, 2);
|
||||
}
|
||||
|
||||
ChatHistory.AddUserMessage(userAIPrompt);
|
||||
|
||||
var response = await ChatCompletions.GetChatMessageContentAsync(chatHistory: ChatHistory, kernel: Kernel);
|
||||
return response.ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
var response = this.GetSolutionToPrompt(userPrompt);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var response = this.GetSolutionToPrompt(userPrompt);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region Offline Data generation
|
||||
internal string GetSolutionToPrompt(string prompt)
|
||||
{
|
||||
prompt = prompt.ToLower();
|
||||
for (int i = 0; i < promptRequest.Count(); i++)
|
||||
{
|
||||
if (prompt.Equals(promptRequest[i]))
|
||||
{
|
||||
return promptResponseHtml[i];
|
||||
}
|
||||
}
|
||||
return "Please connect to your preferred AI service for real-time queries.";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Prompts
|
||||
private string[] promptRequest = new string[]
|
||||
{
|
||||
"ownership",
|
||||
"brainstorming",
|
||||
"listening",
|
||||
"resilience",
|
||||
"initiative",
|
||||
"responsibility",
|
||||
"accountability",
|
||||
"different perspective",
|
||||
"more ideas",
|
||||
"active listening",
|
||||
"passive listening",
|
||||
"compare online and offline marketing strategies",
|
||||
"why should i set achievable goals at work?",
|
||||
"write a joke that my coworkers would find funny",
|
||||
"why do people fly in their dreams?",
|
||||
};
|
||||
|
||||
private string[] promptResponseHtml = new string[]
|
||||
{
|
||||
"<b>Characteristics of Ownership</b><ol><li> Ownership is about taking initiative.</li><li> It’s an understanding that taking action is your responsibility, not someone else’s.</li><li> It is the fundamental principle that you, as an individual, are accountable for the delivery of an outcome, even though there may be others who have a role to play.</li></ol>",
|
||||
"<b>Brainstorming</b><br>When a group of people sit and discuss a problem and try to derive the solution, this is termed brainstorming. Brainstorming helps team members, pool ideas and bounce them off each other, narrowing them down and refining them into a plan. It's useful for gaining different perspectives and more ideas.",
|
||||
"<b>Types of Listening</b><br>For a good communication, it is not only enough to convey the information efficiently, but it also needs to include good listening skill. Common types of Listening are Active listening and Passive listening.",
|
||||
"<b>Resilience</b><br>Resilience is the ability to bounce back from setbacks, adapt to difficult situations, and keep going despite adversity. It involves having the strength to confront challenges, learn from failures, and continue to grow without becoming overly discouraged. Essentially, resilience is about enduring tough times and emerging stronger.",
|
||||
"<b>Initiative</b><br>Taking the first step to start something or to bring new ideas and actions into motion. It means proactively beginning a task or project<ol><li><b> Definition:</b> Taking the first step to start a project, task, or initiative without waiting for direction or instruction.</li><li><b> Importance:</b> Demonstrates proactive behavior and leadership qualities. It shows an individual’s willingness to take charge and bring ideas to life.</li><li><b> Example:</b> An employee noticing a gap in the company's process and developing a plan to address it without being asked.</li></ol>",
|
||||
"<b>Responsibility</b><br>Being reliable and dependable in managing tasks or duties. It involves making decisions and completing tasks that one is assigned or has taken on.<ol><li><b> Definition:</b> Ability to be trusted with the duties and tasks associated with a particular role or project.</li><li><b> Importance:</b> Ensures that tasks are assigned and managed efficiently. Responsible individuals are committed to fulfilling their roles and meeting expectations.</li><li><b> Example:</b> A project manager overseeing the progress of a project, ensuring deadlines are met and resources are utilized effectively.</li></ol>",
|
||||
"<b>Accountability</b><br>Being answerable for the outcomes of your actions and decisions. It means acknowledging and accepting the consequences, whether they are successes or failures.<ol><li><b> Definition:</b> Being answerable for the outcomes of one's actions and decisions. This involves acknowledging both successes and failures.</li><li><b> Importance:</b> Encourages trust and transparency within a team or organization. It fosters a culture of continuous improvement and ethical behavior.</li><li><b> Example:</b> A team leader accepting responsibility for a project's failure, analyzing what went wrong, and developing strategies to avoid similar issues in the future.</li></ol>",
|
||||
"<b>Different Perspective</b><br>Each person has a different way of approaching a problem. It might differ with the way they see it, due to their unique understanding, way of thinking or experience. While brainstorming, participants can show each other different angles of a problem, giving everyone a better view of it.",
|
||||
"<b>More Ideas</b><br>When a group brainstorms, they can come up with a lot of ideas for a solution that don't stick to the usual approach. There are better chances of coming up with an innovative solution, as well as plan Bs and Cs. Sometimes, groups can try integrating the positives of each solution and can thus derive an effective solution for that problem.",
|
||||
"<b>Active Listening</b><br>Active listening is a two-way communication. The listener puts in active effort to understand the information conveyed by the speaker and react to it. ",
|
||||
"<b>Passive Listening</b><br>In passive listening, a person just tries to know what the speaker is trying to say. It is just like one way communication.",
|
||||
"<b>Compare online and offline marketing strategies</b><br>Sure, let’s compare online and offline marketing strategies across several key aspects:<br><br><b>Reach and Audience</b><br><br><b>Online Marketing:</b><ol><li> <b>Global Reach: </b>Can target a worldwide audience.</li><li> <b>Specific Targeting:</b> Allows precise targeting based on demographics, interests, and behaviors.</li></ol><br><b>Offline Marketing:</b><ol><li> <b>Local Reach:</b> Often more effective for local or regional audiences.</li><li> <b>Broad Targeting:</b> Reaches a wide audience but with less precision.</li></ol>",
|
||||
"<b>Why should I set achievable goals at work?</b><br>Setting achievable goals at work is a great way to stay motivated and productive.",
|
||||
"<b>Write a joke that my coworkers would find funny</b><br>Sure, here’s a lighthearted office joke for your coworkers:<br>Why did the scarecrow become an excellent employee?<br>Because he was outstanding in his field! 🌾😄<br>Hope that brings some smiles to the office! If you need more jokes or anything else, just let me know.",
|
||||
"<b>Why do people fly in their dreams?</b><br>Flying in dreams is a fascinating and common experience that often symbolizes various aspects of our subconscious mind. People may fly in their dreams for various symbolic and psychological reasons.",
|
||||
|
||||
};
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Controls;
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
class SampleViewBehavior : Behavior<SampleView>
|
||||
{
|
||||
#region Fields
|
||||
internal ControlTemplateViewModel? viewModel;
|
||||
private Border? rootBorder;
|
||||
private SampleView? sampleView;
|
||||
double padding = DeviceInfo.Platform == DevicePlatform.WinUI ? 2 : 125;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Overrides
|
||||
protected override void OnAttachedTo(SampleView bindable)
|
||||
{
|
||||
rootBorder = bindable.FindByName<Border>("rootBorder");
|
||||
sampleView = bindable;
|
||||
viewModel = bindable.BindingContext as ControlTemplateViewModel;
|
||||
#if WINDOWS || MACCATALYST
|
||||
sampleView.PropertyChanged += this.View_PropertyChanged!;
|
||||
#endif
|
||||
base.OnAttachedTo(bindable);
|
||||
}
|
||||
|
||||
protected override void OnDetachingFrom(SampleView bindable)
|
||||
{
|
||||
#if WINDOWS || MACCATALYST
|
||||
sampleView!.PropertyChanged -= View_PropertyChanged!;
|
||||
#endif
|
||||
viewModel = null;
|
||||
sampleView = null;
|
||||
base.OnDetachingFrom(bindable);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CallBacks
|
||||
#if WINDOWS || MACCATALYST
|
||||
private void View_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
|
||||
if (e.PropertyName == "Height" && viewModel != null && sampleView != null)
|
||||
{
|
||||
double borderHeight = 0;
|
||||
#if WINDOWS
|
||||
borderHeight = sampleView.Height - padding;
|
||||
#elif MACCATALYST
|
||||
borderHeight = sampleView.Height - ( 2 * padding );
|
||||
#endif
|
||||
rootBorder!.HeightRequest = borderHeight;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Globalization;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class FontAttributeConverter : IValueConverter
|
||||
{
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is bool isActive)
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
return FontAttributes.Bold;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FontAttributes.None;
|
||||
}
|
||||
}
|
||||
return FontAttributes.None;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class NavigationColorConverter : IValueConverter
|
||||
{
|
||||
// The Convert method to change bool to color
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is bool isEnabled)
|
||||
{
|
||||
// Get the theme from the parameter
|
||||
var theme = Application.Current?.RequestedTheme;
|
||||
|
||||
if (isEnabled)
|
||||
{
|
||||
return theme == AppTheme.Light ? Color.FromArgb("#79747E") : Color.FromArgb("#ACACAC");
|
||||
}
|
||||
else
|
||||
{
|
||||
return theme == AppTheme.Light ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return Colors.Transparent;
|
||||
}
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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 Syncfusion.Maui.AIAssistView;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class CustomAssistViewChat : AssistViewChat
|
||||
{
|
||||
public CustomAssistViewChat(Syncfusion.Maui.AIAssistView.SfAIAssistView aIAssistView) : base(aIAssistView)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomAssistView : Syncfusion.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public static readonly BindableProperty AssistChatViewProperty =
|
||||
BindableProperty.Create(nameof(AssistChatView), typeof(CustomAssistViewChat), typeof(CustomAssistView));
|
||||
|
||||
public CustomAssistViewChat AssistChatView
|
||||
{
|
||||
get { return (CustomAssistViewChat)this.GetValue(AssistChatViewProperty); }
|
||||
set { this.SetValue(AssistChatViewProperty, value); }
|
||||
}
|
||||
protected override AssistViewChat CreateAssistChat()
|
||||
{
|
||||
AssistChatView = new CustomAssistViewChat(this);
|
||||
return AssistChatView;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.ComponentModel;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class FormatModel : INotifyPropertyChanged
|
||||
{
|
||||
private string? _content;
|
||||
private string? _icon;
|
||||
private bool _isSelected;
|
||||
|
||||
public string? Content
|
||||
{
|
||||
get => _content;
|
||||
set
|
||||
{
|
||||
if (_content != value)
|
||||
{
|
||||
_content = value;
|
||||
OnPropertyChanged(nameof(Content));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string? Icon
|
||||
{
|
||||
get => _icon;
|
||||
set
|
||||
{
|
||||
if (_icon != value)
|
||||
{
|
||||
_icon = value!;
|
||||
OnPropertyChanged(nameof(Image));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _isSelected;
|
||||
set
|
||||
{
|
||||
if (_isSelected != value)
|
||||
{
|
||||
_isSelected = value;
|
||||
OnPropertyChanged(nameof(IsSelected));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FormatModel(string? toneContent, string? fontIcon, bool isSelected)
|
||||
{
|
||||
Content = toneContent;
|
||||
Icon = fontIcon;
|
||||
IsSelected = isSelected;
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
public class LengthModel : INotifyPropertyChanged
|
||||
{
|
||||
public string? LengthContent { get; set; }
|
||||
|
||||
public LengthModel(string? lengthContent, bool isSelected)
|
||||
{
|
||||
LengthContent = lengthContent;
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
public class ToneModel : INotifyPropertyChanged
|
||||
{
|
||||
private string? toneContent;
|
||||
|
||||
public string? ToneContent
|
||||
{
|
||||
get => toneContent;
|
||||
set
|
||||
{
|
||||
if (toneContent != value)
|
||||
{
|
||||
toneContent = value!;
|
||||
OnPropertyChanged(nameof(ToneContent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ToneModel(string? toneContent, bool isSelected)
|
||||
{
|
||||
ToneContent = toneContent;
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,255 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ScrollView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.AIAssistView.SfAIAssistView"
|
||||
xmlns:thickness="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
|
||||
xmlns:chip="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
x:Class="SampleBrowser.Maui.AIAssistView.SfAIAssistView.ComposeView">
|
||||
|
||||
<StackLayout>
|
||||
<StackLayout.Resources>
|
||||
<Style TargetType="chip:SfChipGroup">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" />
|
||||
<Setter Property="ChipStroke" Value="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" />
|
||||
<Setter Property="ChipTextColor" Value="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}" />
|
||||
<Setter Property="SelectedChipTextColor" Value="{AppThemeBinding Dark=Black, Light=White}" />
|
||||
<Setter Property="SelectedChipBackground" Value="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Selected">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" />
|
||||
<Setter Property="ChipStroke" Value="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" />
|
||||
<Setter Property="ChipTextColor" Value="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}" />
|
||||
<Setter Property="SelectedChipTextColor" Value="{AppThemeBinding Dark=Black, Light=White}" />
|
||||
<Setter Property="SelectedChipBackground" Value="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
<ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
</StackLayout.Resources>
|
||||
<Border Padding="5"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="0"
|
||||
MaximumWidthRequest="{OnPlatform WinUI=380, MacCatalyst=400}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="10" />
|
||||
</Border.StrokeShape>
|
||||
<Border.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst"
|
||||
Value="5" />
|
||||
<On Platform="WinUI"
|
||||
Value="5" />
|
||||
</OnPlatform>
|
||||
</Border.Margin>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Padding="5"
|
||||
Grid.Row="0"
|
||||
Margin="5"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="1"
|
||||
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
|
||||
MaximumWidthRequest="{OnPlatform WinUI=380, MacCatalyst=400}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="10" />
|
||||
</Border.StrokeShape>
|
||||
<StackLayout Padding="0,5,0,5">
|
||||
<HorizontalStackLayout>
|
||||
<Label Margin="8,4,0,4"
|
||||
Text=""
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontSize="22"
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
VerticalTextAlignment="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
WidthRequest="22"
|
||||
HeightRequest="20" />
|
||||
<Label Text="Tone" VerticalOptions="{OnPlatform Default=End, WinUI=Center, MacCatalyst=Center}" FontSize="14"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontFamily="Roboto-Regular"
|
||||
Padding="4,4,0,4" />
|
||||
</HorizontalStackLayout>
|
||||
<chip:SfChipGroup ItemsSource="{Binding TonesCollection}"
|
||||
ChipPadding="3"
|
||||
HorizontalOptions="Start"
|
||||
ChipStrokeThickness="3"
|
||||
ChoiceMode="Single"
|
||||
DisplayMemberPath="ToneContent"
|
||||
ChipCornerRadius="10"
|
||||
Padding="0,8,0,0"
|
||||
ChipFontFamily="Roboto-Regular"
|
||||
ItemHeight="32"
|
||||
SelectedItem="{Binding PreferredTone, Mode=TwoWay}"
|
||||
ChipType="Choice"
|
||||
VerticalOptions="Center">
|
||||
<chip:SfChipGroup.ChipLayout>
|
||||
<FlexLayout HorizontalOptions="Start"
|
||||
VerticalOptions="End"
|
||||
Wrap="Wrap"
|
||||
/>
|
||||
</chip:SfChipGroup.ChipLayout>
|
||||
</chip:SfChipGroup>
|
||||
</StackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="5"
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="1"
|
||||
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
|
||||
MaximumWidthRequest="{OnPlatform WinUI=380, MacCatalyst=400}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="10" />
|
||||
</Border.StrokeShape>
|
||||
<StackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Label Margin="8,4,0,4"
|
||||
Text=""
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontSize="20"
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
VerticalTextAlignment="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
WidthRequest="20"
|
||||
HeightRequest="20" />
|
||||
<Label Text="Format" VerticalOptions="End" FontSize="14"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontFamily="Roboto-Regular"
|
||||
Padding="4,4,0,4" />
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<FlexLayout BindableLayout.ItemsSource="{Binding Path=FormatModelsCollection}"
|
||||
Wrap="Wrap">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="2"
|
||||
Padding="2">
|
||||
<!-- Define the rows with appropriate heights -->
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="60" />
|
||||
<!-- Height for the image -->
|
||||
<RowDefinition Height="30" />
|
||||
<!-- Height for the label -->
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<chip:SfChip WidthRequest="60"
|
||||
HeightRequest="60"
|
||||
HorizontalOptions="Center"
|
||||
CornerRadius="12"
|
||||
Text="{Binding Icon}"
|
||||
FontSize="22"
|
||||
StrokeThickness="3"
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type ScrollView}}, Path=BindingContext.FormatModelSelectionChangedCommand}" CommandParameter="{Binding .}">
|
||||
<chip:SfChip.Triggers>
|
||||
<DataTrigger TargetType="chip:SfChip"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="True">
|
||||
<Setter Property="Stroke" Value="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}"/>
|
||||
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight1 }, Dark={StaticResource Border}}"/>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="chip:SfChip"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="False">
|
||||
<Setter Property="Stroke" Value="Transparent"/>
|
||||
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight1 }, Dark={StaticResource Border}}"/>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"/>
|
||||
</DataTrigger>
|
||||
</chip:SfChip.Triggers>
|
||||
</chip:SfChip>
|
||||
|
||||
<Label x:Name="label"
|
||||
Text="{Binding Content}"
|
||||
Grid.Row="1"
|
||||
FontFamily="Roboto-Regular"
|
||||
FontSize="12"
|
||||
HorizontalOptions="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</FlexLayout>
|
||||
</StackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="5"
|
||||
Grid.Row="2"
|
||||
Margin="5"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="1"
|
||||
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
|
||||
MaximumWidthRequest="{OnPlatform WinUI=380, MacCatalyst=400}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="10" />
|
||||
</Border.StrokeShape>
|
||||
<StackLayout Padding="0,5,0,5">
|
||||
<HorizontalStackLayout>
|
||||
<Label Margin="8,4,0,4"
|
||||
Text=""
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontSize="20"
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
VerticalTextAlignment="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
WidthRequest="20"
|
||||
HeightRequest="20" />
|
||||
<Label Text="Length" VerticalOptions="End" FontSize="14"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
FontFamily="Roboto-Regular"
|
||||
Padding="4,4,0,4" />
|
||||
</HorizontalStackLayout>
|
||||
<chip:SfChipGroup ItemsSource="{Binding LengthModelsCollection}"
|
||||
ChipPadding="3"
|
||||
HorizontalOptions="Start"
|
||||
ChipStrokeThickness="3"
|
||||
ChoiceMode="Single"
|
||||
DisplayMemberPath="LengthContent"
|
||||
ChipCornerRadius="10"
|
||||
ChipFontFamily="Roboto-Regular"
|
||||
Padding="0,8,0,0"
|
||||
ItemHeight="32"
|
||||
SelectedItem="{Binding PreferredLength, Mode=TwoWay}"
|
||||
ChipType="Choice"
|
||||
VerticalOptions="Center">
|
||||
<chip:SfChipGroup.ChipLayout>
|
||||
<FlexLayout HorizontalOptions="Start"
|
||||
VerticalOptions="End"
|
||||
Wrap="Wrap"
|
||||
/>
|
||||
</chip:SfChipGroup.ChipLayout>
|
||||
</chip:SfChipGroup>
|
||||
</StackLayout>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
|
@ -0,0 +1,16 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView.SfAIAssistView;
|
||||
|
||||
public partial class ComposeView : ScrollView
|
||||
{
|
||||
public ComposeView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,302 @@
|
|||
<?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.AIAssistView.SfAIAssistView.ControlTemplateDemo"
|
||||
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:aiAssist="clr-namespace:Syncfusion.Maui.AIAssistView;assembly=Syncfusion.Maui.AIAssistView"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.AIAssistView.SfAIAssistView"
|
||||
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:thickness="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
|
||||
xmlns:carousel="clr-namespace:Syncfusion.Maui.Carousel;assembly=Syncfusion.Maui.Carousel"
|
||||
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
x:Name="controlView">
|
||||
|
||||
<localCore:SampleView.BindingContext>
|
||||
<local:ControlTemplateViewModel x:Name="viewModel" />
|
||||
</localCore:SampleView.BindingContext>
|
||||
<localCore:SampleView.Behaviors>
|
||||
<local:SampleViewBehavior/>
|
||||
</localCore:SampleView.Behaviors>
|
||||
<localCore:SampleView.Resources>
|
||||
<Style TargetType="buttons:SfButton">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Background" Value="{AppThemeBinding Light=#14000000,Dark=#49454F}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Hovered">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Background" Value="{AppThemeBinding Light=#14000000,Dark=#49454F}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
<imageExtension:SfImageSourceConverter x:Key="imageconverter" />
|
||||
<local:NavigationColorConverter x:Key="navigationColorConverter"/>
|
||||
<Style x:Key="iconLabelStyle" TargetType="Label">
|
||||
<Setter Property="Padding" Value="0,2,0,0"/>
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="FontFamily" Value="MauiSampleFontIcon"/>
|
||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
||||
<Setter Property="VerticalTextAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalTextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalOptions" Value="End"/>
|
||||
<Setter Property="HorizontalOptions" Value="Center"/>
|
||||
<Setter Property="WidthRequest" Value="30"/>
|
||||
<Setter Property="HeightRequest" Value="20"/>
|
||||
</Style>
|
||||
<Style x:Key="tablabelStyle" TargetType="Label">
|
||||
<Setter Property="VerticalOptions" Value="End"/>
|
||||
<Setter Property="HorizontalOptions" Value="Center"/>
|
||||
<Setter Property="HeightRequest" Value="20"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontFamily" Value="Roboto"/>
|
||||
</Style>
|
||||
<DataTemplate x:Key="headerTemplate">
|
||||
<VerticalStackLayout Padding="0,23,0,0">
|
||||
<Grid RowDefinitions="30,30,Auto" RowSpacing="10">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Border BackgroundColor="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" VerticalOptions="Center" HeightRequest="30" WidthRequest="30">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="6"/>
|
||||
</Border.StrokeShape>
|
||||
<Label Text="" FontSize="18" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontFamily="MauiSampleFontIcon" TextColor="{AppThemeBinding Dark={StaticResource PrimaryForeground},Light={StaticResource White}}" HorizontalOptions="Center" />
|
||||
</Border>
|
||||
<Label Text="AssistView" FontFamily="Roboto-Regular" FontSize="20" VerticalOptions="Center" Padding="10,0,0,0"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label Grid.Row="1" Text="Your everyday AI Companion" HorizontalOptions="Center" FontFamily="Roboto-Regular" FontSize="16"/>
|
||||
<Grid Grid.Row="2" Margin="{OnPlatform Default='8,0,8,0',Android=10, iOS=10}" IsClippedToBounds="True" >
|
||||
<VerticalStackLayout>
|
||||
<VerticalStackLayout.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=HeaderItemTappedCommand}"/>
|
||||
</VerticalStackLayout.GestureRecognizers>
|
||||
<carousel:SfCarousel x:Name="headerlayout" SelectedIndex="{Binding CurrentIndex}" RotationAngle="180" SelectedItemOffset="172" Offset="100" ScaleOffset="1" Duration="0" ViewMode="Default" ItemWidth="328" ItemHeight="{OnPlatform Default=250, Android=300, iOS=300}"
|
||||
ItemsSource="{Binding Path=HeaderInfoCollection}" EnableInteraction="False" InputTransparent="True" >
|
||||
<carousel:SfCarousel.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid RowDefinitions="*,Auto,10">
|
||||
<Border Grid.RowSpan="2" WidthRequest="327" HeightRequest="{OnPlatform Default=220, Android=270,iOS=270}" HorizontalOptions="Center" VerticalOptions="Center" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="15"/>
|
||||
</Border.StrokeShape>
|
||||
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}" Aspect="AspectFill" HeightRequest="{OnPlatform Default=220, Android=270,iOS=270}" VerticalOptions="Center" WidthRequest="325" HorizontalOptions="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.RowSpan="2" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" Opacity="0.9" HorizontalOptions="Center" VerticalOptions="End" WidthRequest="300" >
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="12"/>
|
||||
</Border.StrokeShape>
|
||||
<Label x:Name="label" Text="{Binding HeaderMessage}" FontFamily="Roboto-Regular" LineBreakMode="WordWrap" FontSize="14" Padding="10" HorizontalOptions="Center" VerticalOptions="End" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</carousel:SfCarousel.ItemTemplate>
|
||||
</carousel:SfCarousel>
|
||||
</VerticalStackLayout>
|
||||
<Grid Grid.Row="2" HorizontalOptions="Start" VerticalOptions="Center" >
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=PreviousItemCommand}"/>
|
||||
<PointerGestureRecognizer PointerEnteredCommand="{Binding Path=LeftNavigationHoveredCommand}"
|
||||
PointerExitedCommand="{Binding Path=PointerExitCommand}"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Border Background="{AppThemeBinding Dark={StaticResource Black},Light={StaticResource White}}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" >
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="20"/>
|
||||
</Border.StrokeShape>
|
||||
<Label x:Name="leftNavigation" Text="" FontSize="30" Padding="0,0,2,0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontFamily="MauiSampleFontIcon" TextColor="{Binding LeftNavigationEnabled,Converter={StaticResource navigationColorConverter}}" HeightRequest="40" WidthRequest="40" >
|
||||
<Label.Triggers>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsLeftNavigationHovered}"
|
||||
Value="True">
|
||||
<Setter Property="FontAttributes" Value="Bold"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsLeftNavigationHovered}"
|
||||
Value="False">
|
||||
<Setter Property="FontAttributes" Value="None"/>
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" HorizontalOptions="End" VerticalOptions="Center" >
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=NextItemCommand}"/>
|
||||
<PointerGestureRecognizer PointerEnteredCommand="{Binding Path=RightNavigationHoveredCommand}"
|
||||
PointerExitedCommand="{Binding Path=PointerExitCommand}"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Border Background="{AppThemeBinding Dark={StaticResource Black},Light={StaticResource White}}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="20"/>
|
||||
</Border.StrokeShape>
|
||||
<Label x:Name="rightNavigation" Text="" FontSize="30" Padding="2,0,0,0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontFamily="MauiSampleFontIcon" TextColor="{Binding RightNavigationEnabled,Converter={StaticResource navigationColorConverter}}" HeightRequest="40" WidthRequest="40">
|
||||
<Label.Triggers>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsRightNavigationHovered}"
|
||||
Value="True">
|
||||
<Setter Property="FontAttributes" Value="Bold"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsRightNavigationHovered}"
|
||||
Value="False">
|
||||
<Setter Property="FontAttributes" Value="None"/>
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</DataTemplate>
|
||||
<local:FontAttributeConverter x:Key="fontAttributeConverter"/>
|
||||
|
||||
</localCore:SampleView.Resources>
|
||||
<localCore:SampleView.Content>
|
||||
<Border x:Name="rootBorder"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="{OnPlatform Default=0, WinUI=1, MacCatalyst=1}"
|
||||
VerticalOptions="{OnPlatform Default=Fill, WinUI=Center, MacCatalyst=Center}"
|
||||
WidthRequest="{OnPlatform WinUI=380, MacCatalyst=400}"
|
||||
HorizontalOptions="{OnPlatform WinUI=Center, MacCatalyst=Center, Default=Fill}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="{OnPlatform WinUI=10, MacCatalyst=10}" />
|
||||
</Border.StrokeShape>
|
||||
<Border.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst"
|
||||
Value="20" />
|
||||
</OnPlatform>
|
||||
</Border.Margin>
|
||||
<Grid RowDefinitions="50,*">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,30,40" RowDefinitions="*,1" RowSpacing="5" ColumnSpacing="10" HeightRequest="50" Background="{AppThemeBinding Light=#F7F2FB,Dark=#25232A}">
|
||||
<Grid Grid.Column="0" Padding="10,0,0,0" RowSpacing="1"
|
||||
Grid.Row="0"
|
||||
HeightRequest="30"
|
||||
x:Name="ChatTab" ColumnDefinitions="30,*" RowDefinitions="*,2">
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=ChatTappedCommand}" CommandParameter="{Binding .}"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Label Grid.Column="0" Grid.Row="0"
|
||||
Text=""
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
Style="{StaticResource iconLabelStyle}"
|
||||
/>
|
||||
<Label x:Name="chat"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="Chat"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
Style="{StaticResource tablabelStyle}"
|
||||
FontAttributes="{Binding IsActiveChatView, Converter={StaticResource fontAttributeConverter}}"
|
||||
/>
|
||||
<BoxView Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
IsVisible="{Binding IsActiveChatView}"
|
||||
WidthRequest="20"
|
||||
HorizontalOptions="Center"
|
||||
BackgroundColor="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" />
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="ComposeTab"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0" RowSpacing="1"
|
||||
HeightRequest="30"
|
||||
ColumnDefinitions="30,*"
|
||||
RowDefinitions="*,2">
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=ComposeTappedCommand}" CommandParameter="{Binding .}"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Label Text=""
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource iconLabelStyle}" />
|
||||
<Label x:Name="compose"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="Compose"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
Style="{StaticResource tablabelStyle}"
|
||||
FontAttributes="{Binding IsActiveComposeView, Converter={StaticResource fontAttributeConverter}}"
|
||||
/>
|
||||
<BoxView Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
WidthRequest="20"
|
||||
IsVisible="{Binding IsActiveComposeView}"
|
||||
BackgroundColor="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" />
|
||||
</Grid>
|
||||
<Grid x:Name="refresh" Grid.Row="0" Grid.Column="3" Grid.RowSpan="2" HeightRequest="30">
|
||||
<buttons:SfButton x:Name="refreshIcon" Text=""
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
HorizontalOptions="Center"
|
||||
CornerRadius="20"
|
||||
FontSize="20"
|
||||
Command="{Binding Path=RefreshCommand}"
|
||||
HeightRequest="30"
|
||||
WidthRequest="30"
|
||||
VerticalTextAlignment="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalOptions="Center"
|
||||
Padding="0,0,0,1"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
/>
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="close" Grid.Row="0" Grid.Column="4" HeightRequest="30" Grid.RowSpan="2" Padding="0,0,10,0">
|
||||
<buttons:SfButton x:Name="closeIcon" Text=""
|
||||
FontFamily="MauiSampleFontIcon"
|
||||
HorizontalOptions="Center"
|
||||
FontSize="20"
|
||||
CornerRadius="20"
|
||||
HeightRequest="30"
|
||||
WidthRequest="30"
|
||||
VerticalTextAlignment="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalOptions="Center"
|
||||
ToolTipProperties.Text="Close Assist Pane"
|
||||
Padding="0,0,0,1"
|
||||
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
|
||||
/>
|
||||
</Grid>
|
||||
<BoxView Grid.Column="0" Grid.ColumnSpan="5"
|
||||
Grid.Row="1"
|
||||
BackgroundColor="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" />
|
||||
</Grid>
|
||||
|
||||
<local:CustomAssistView x:Name="assistView" Grid.Row="1" ShowHeader="{Binding ShowHeader}"
|
||||
ItemCopyCommand="{Binding CopyCommand}"
|
||||
RequestCommand="{Binding AssistViewRequestCommand}"
|
||||
ItemRetryCommand="{Binding RetryCommand}"
|
||||
HeaderTemplate="{StaticResource headerTemplate}" AssistItems="{Binding AssistMessages}">
|
||||
<local:CustomAssistView.ControlTemplate>
|
||||
<ControlTemplate>
|
||||
<ContentView>
|
||||
<ContentView.Content>
|
||||
<Grid>
|
||||
<ContentView IsVisible="{Binding IsActiveChatView}" Content="{TemplateBinding AssistChatView}" BindingContext="{TemplateBinding BindingContext}" />
|
||||
<local:ComposeView IsVisible="{Binding IsActiveComposeView}" BindingContext="{TemplateBinding BindingContext}"/>
|
||||
<ActivityIndicator x:Name="Indicator" IsRunning="{Binding ShowIndicator}" BindingContext="{TemplateBinding BindingContext}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
/>
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
||||
</ControlTemplate>
|
||||
</local:CustomAssistView.ControlTemplate>
|
||||
</local:CustomAssistView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</localCore:SampleView.Content>
|
||||
</localCore:SampleView>
|
|
@ -0,0 +1,17 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView.SfAIAssistView;
|
||||
public partial class ControlTemplateDemo : SampleView
|
||||
{
|
||||
public ControlTemplateDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,533 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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 System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Input;
|
||||
using Syncfusion.Maui.AIAssistView;
|
||||
|
||||
#nullable disable
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class ControlTemplateViewModel : INotifyPropertyChanged
|
||||
{
|
||||
private ObservableCollection<IAssistItem> assistmessages;
|
||||
private ObservableCollection<GettingStartedModel> headerInfoCollection;
|
||||
private AzureAIService azureAIService;
|
||||
private ObservableCollection<ToneModel> tonesCollection;
|
||||
private ObservableCollection<FormatModel> formatModelsCollection;
|
||||
private ObservableCollection<LengthModel> lengthModelsCollection;
|
||||
private bool isActiveChatView = true;
|
||||
private bool isActiveComposeView = false;
|
||||
private bool showIndicator = false;
|
||||
private bool showHeader = true;
|
||||
private object preferredTone;
|
||||
private string preferredFormat = "Paragraph";
|
||||
private object preferredLength ;
|
||||
private int currentIndex = 1;
|
||||
private bool leftNavigationEnabled = true;
|
||||
private bool rightNavigationEnabled = true;
|
||||
private bool isRightNavigationHovered;
|
||||
private bool isLeftNavigationHovered;
|
||||
|
||||
public ControlTemplateViewModel()
|
||||
{
|
||||
HeaderInfoCollection = new ObservableCollection<GettingStartedModel>();
|
||||
azureAIService = new AzureAIService();
|
||||
this.GetHeaderInfo();
|
||||
this.assistmessages = new ObservableCollection<IAssistItem>();
|
||||
ChatTappedCommand = new Command<object>(ChatTabCommand);
|
||||
ComposeTappedCommand = new Command<object>(ComposeTabCommand);
|
||||
FormatModelSelectionChangedCommand = new Command<FormatModel>(OnFormatModelSelectionChanged);
|
||||
this.AssistViewRequestCommand = new Command<object>(ExecuteRequestCommand);
|
||||
this.HeaderItemTappedCommand = new Command(HeaderItemTapCommand);
|
||||
this.CopyCommand = new Command<object>(ExecuteCopyCommand);
|
||||
this.RetryCommand = new Command<object>(ExecuteRetryCommand);
|
||||
this.RefreshCommand = new Command<object>(ExecuteRefreshCommand);
|
||||
this.PreviousItemCommand = new Command(ScrollToPreviousItem);
|
||||
this.NextItemCommand = new Command(ScrollToNextItemCommand);
|
||||
this.LeftNavigationHoveredCommand = new Command<object>(OnLeftNavigationHovered);
|
||||
this.RightNavigationHoveredCommand = new Command<object>(OnRightNavigationHovered);
|
||||
this.PointerExitCommand = new Command<object>(PointerExitInteraction);
|
||||
TonesCollection = new ObservableCollection<ToneModel>
|
||||
{
|
||||
new ToneModel("Professional", true),
|
||||
new ToneModel("Casual", false),
|
||||
new ToneModel("Enthusiastic", false),
|
||||
new ToneModel("Informational", false),
|
||||
new ToneModel("Funny", false),
|
||||
new ToneModel("Succinct", false)
|
||||
|
||||
};
|
||||
|
||||
FormatModelsCollection = new ObservableCollection<FormatModel>
|
||||
{
|
||||
new FormatModel("Paragraph", "\ue742", true),
|
||||
new FormatModel("Email", "\ue75c", false),
|
||||
new FormatModel("Bullet Points", "\ue74e", false),
|
||||
new FormatModel("LinkedIn Post", "\ue79c", false),
|
||||
new FormatModel("Summary", "\ue75b", false),
|
||||
new FormatModel("Report", "\ue7b1", false)
|
||||
};
|
||||
|
||||
LengthModelsCollection = new ObservableCollection<LengthModel>
|
||||
{
|
||||
new LengthModel("Short", false),
|
||||
new LengthModel("Medium", true),
|
||||
new LengthModel("Long", false)
|
||||
};
|
||||
this.preferredLength = LengthModelsCollection[1];
|
||||
this.preferredTone = TonesCollection[0];
|
||||
}
|
||||
|
||||
public ICommand AssistViewRequestCommand { get; set; }
|
||||
public ICommand HeaderItemTappedCommand { get; set; }
|
||||
public ICommand FormatModelSelectionChangedCommand { get; }
|
||||
public ICommand ChatTappedCommand { get; set; }
|
||||
public ICommand ComposeTappedCommand { get; set; }
|
||||
public ICommand CopyCommand { get; set; }
|
||||
public ICommand RetryCommand { get; set; }
|
||||
public ICommand RefreshCommand { get; set; }
|
||||
public ICommand PreviousItemCommand { get; set; }
|
||||
public ICommand NextItemCommand { get; set; }
|
||||
public ICommand LeftNavigationHoveredCommand { get; set; }
|
||||
public ICommand RightNavigationHoveredCommand { get; set; }
|
||||
public ICommand PointerExitCommand { get; set; }
|
||||
|
||||
private ObservableCollection<string> HeaderMessages { get; set; } = new ObservableCollection<string>
|
||||
{
|
||||
"Compare online and offline marketing strategies",
|
||||
"Why should I set achievable goals at work?",
|
||||
"Write a joke that my coworkers would find funny",
|
||||
"Why do people fly in their dreams?",
|
||||
};
|
||||
|
||||
private ObservableCollection<string> ImagesCollection { get; set; } = new ObservableCollection<string>
|
||||
{
|
||||
"marketing_analysis.png",
|
||||
"goals.png",
|
||||
"funny_jokes.png",
|
||||
"dream.png",
|
||||
};
|
||||
|
||||
public int CurrentIndex
|
||||
{
|
||||
get { return currentIndex; }
|
||||
set { currentIndex = value; RaisePropertyChanged("CurrentIndex"); }
|
||||
}
|
||||
|
||||
public bool ShowIndicator
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.showIndicator;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.showIndicator = value;
|
||||
RaisePropertyChanged("ShowIndicator");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsRightNavigationHovered
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isRightNavigationHovered;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.isRightNavigationHovered = value;
|
||||
RaisePropertyChanged("IsRightNavigationHovered");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLeftNavigationHovered
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isLeftNavigationHovered;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.isLeftNavigationHovered = value;
|
||||
RaisePropertyChanged("IsLeftNavigationHovered");
|
||||
}
|
||||
}
|
||||
|
||||
public bool LeftNavigationEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.leftNavigationEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.leftNavigationEnabled = value;
|
||||
RaisePropertyChanged("LeftNavigationEnabled");
|
||||
}
|
||||
}
|
||||
|
||||
public bool RightNavigationEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.rightNavigationEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.rightNavigationEnabled = value;
|
||||
RaisePropertyChanged("RightNavigationEnabled");
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowHeader
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.showHeader;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.showHeader = value;
|
||||
RaisePropertyChanged("ShowHeader");
|
||||
}
|
||||
}
|
||||
|
||||
public object PreferredTone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.preferredTone;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.preferredTone = value;
|
||||
RaisePropertyChanged("PreferredTone");
|
||||
}
|
||||
}
|
||||
|
||||
public string PreferredFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.preferredFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.preferredFormat = value;
|
||||
RaisePropertyChanged("PreferredFormat");
|
||||
}
|
||||
}
|
||||
|
||||
public object PreferredLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.preferredLength;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.preferredLength = value;
|
||||
RaisePropertyChanged("PreferredLength");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsActiveChatView
|
||||
{
|
||||
get
|
||||
{
|
||||
return isActiveChatView;
|
||||
}
|
||||
set
|
||||
{
|
||||
isActiveChatView = value;
|
||||
RaisePropertyChanged(nameof(IsActiveChatView));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsActiveComposeView
|
||||
{
|
||||
get
|
||||
{
|
||||
return isActiveComposeView;
|
||||
}
|
||||
set
|
||||
{
|
||||
isActiveComposeView = value;
|
||||
RaisePropertyChanged(nameof(IsActiveComposeView));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<GettingStartedModel> HeaderInfoCollection
|
||||
{
|
||||
get
|
||||
{
|
||||
return headerInfoCollection;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.headerInfoCollection = value;
|
||||
RaisePropertyChanged(nameof(HeaderInfoCollection));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<IAssistItem> AssistMessages
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.assistmessages;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.assistmessages = value;
|
||||
RaisePropertyChanged("AssistMessages");
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<ToneModel> TonesCollection
|
||||
{
|
||||
get { return tonesCollection; }
|
||||
set
|
||||
{
|
||||
this.tonesCollection = value;
|
||||
RaisePropertyChanged(nameof(TonesCollection));
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<FormatModel> FormatModelsCollection
|
||||
{
|
||||
get { return formatModelsCollection; }
|
||||
set
|
||||
{
|
||||
if (formatModelsCollection != value)
|
||||
{
|
||||
formatModelsCollection = value;
|
||||
RaisePropertyChanged(nameof(FormatModelsCollection));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<LengthModel> LengthModelsCollection
|
||||
{
|
||||
get { return lengthModelsCollection; }
|
||||
set
|
||||
{
|
||||
if (lengthModelsCollection != value)
|
||||
{
|
||||
lengthModelsCollection = value;
|
||||
RaisePropertyChanged(nameof(LengthModelsCollection));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ScrollToNextItemCommand()
|
||||
{
|
||||
if (!LeftNavigationEnabled)
|
||||
{
|
||||
LeftNavigationEnabled = true;
|
||||
}
|
||||
var index = this.CurrentIndex;
|
||||
int next = index + 1;
|
||||
this.CurrentIndex = (this.CurrentIndex == (headerInfoCollection.Count - 1)) ? (headerInfoCollection.Count - 1) : next;
|
||||
if (this.CurrentIndex == headerInfoCollection.Count - 1)
|
||||
{
|
||||
RightNavigationEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ScrollToPreviousItem()
|
||||
{
|
||||
if (!RightNavigationEnabled)
|
||||
{
|
||||
RightNavigationEnabled = true;
|
||||
}
|
||||
var index = this.CurrentIndex;
|
||||
int prev = index - 1;
|
||||
this.CurrentIndex = (this.CurrentIndex == 0) ? 0 : prev;
|
||||
if (this.CurrentIndex == 0)
|
||||
{
|
||||
LeftNavigationEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void PointerExitInteraction(object obj)
|
||||
{
|
||||
this.IsLeftNavigationHovered = false;
|
||||
this.IsRightNavigationHovered = false;
|
||||
}
|
||||
|
||||
private void OnLeftNavigationHovered(object obj)
|
||||
{
|
||||
this.IsLeftNavigationHovered = true;
|
||||
}
|
||||
|
||||
private void OnRightNavigationHovered(object obj)
|
||||
{
|
||||
this.IsRightNavigationHovered = true;
|
||||
}
|
||||
|
||||
private async void ExecuteRefreshCommand(object obj)
|
||||
{
|
||||
this.CurrentIndex = 1;
|
||||
LeftNavigationEnabled = true;
|
||||
RightNavigationEnabled = true;
|
||||
if (this.IsActiveChatView)
|
||||
{
|
||||
this.ShowIndicator = true;
|
||||
ShowHeader = false;
|
||||
this.AssistMessages.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShowIndicator = true;
|
||||
this.IsActiveComposeView = false;
|
||||
ShowHeader = false;
|
||||
this.AssistMessages.Clear();
|
||||
this.IsActiveChatView = true;
|
||||
}
|
||||
await Task.Delay(3000).ConfigureAwait(true);
|
||||
ShowHeader = true;
|
||||
this.ShowIndicator = false;
|
||||
}
|
||||
|
||||
private void ExecuteCopyCommand(object obj)
|
||||
{
|
||||
string text = (obj as AssistItem).Text;
|
||||
text = Regex.Replace(text, "<.*?>| ", string.Empty);
|
||||
Clipboard.SetTextAsync(text);
|
||||
}
|
||||
|
||||
private async void ExecuteRetryCommand(object obj)
|
||||
{
|
||||
var request = (obj as AssistItem).RequestItem;
|
||||
await this.GetResult(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private void ChatTabCommand(object obj)
|
||||
{
|
||||
var vm = obj as ControlTemplateViewModel;
|
||||
if (!vm.IsActiveChatView)
|
||||
{
|
||||
vm.IsActiveChatView = true;
|
||||
vm.IsActiveComposeView = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ComposeTabCommand(object obj)
|
||||
{
|
||||
var vm = obj as ControlTemplateViewModel;
|
||||
if (!vm.IsActiveComposeView)
|
||||
{
|
||||
vm.IsActiveChatView = false;
|
||||
vm.IsActiveComposeView = true;
|
||||
}
|
||||
}
|
||||
|
||||
private async void HeaderItemTapCommand()
|
||||
{
|
||||
AssistItem request = new AssistItem() { Text = HeaderMessages[this.CurrentIndex], IsRequested = true };
|
||||
this!.AssistMessages.Add(request);
|
||||
await this.GetResult(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private async void ExecuteRequestCommand(object obj)
|
||||
{
|
||||
var request = (obj as Syncfusion.Maui.AIAssistView.RequestEventArgs).RequestItem;
|
||||
await this.GetResult(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private async Task GetResult(object inputQuery)
|
||||
{
|
||||
await Task.Delay(1000).ConfigureAwait(true);
|
||||
AssistItem request = (AssistItem)inputQuery;
|
||||
if (request != null)
|
||||
{
|
||||
var userAIPrompt = this.GetUserAIPrompt(request.Text);
|
||||
var response = await azureAIService!.GetResultsFromAI(request.Text, userAIPrompt).ConfigureAwait(true);
|
||||
response = response.Replace("\n", "<br>");
|
||||
AssistItem responseItem = new AssistItem() { Text = response };
|
||||
responseItem.RequestItem = inputQuery;
|
||||
this.AssistMessages.Add(responseItem);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetUserAIPrompt(string userPrompt)
|
||||
{
|
||||
string userQuery = $"Given User query: {userPrompt}." +
|
||||
$"\nSome conditions need to follow:" +
|
||||
$"\nThe tone should be {(PreferredTone as ToneModel).ToneContent}." +
|
||||
$"\nThe format should be {PreferredFormat}." +
|
||||
$"\nThe length should be {(PreferredLength as LengthModel).LengthContent}."+
|
||||
$"\nGive as string alone"+
|
||||
$"\nRemove ** and remove quotes if it is there in the string.";
|
||||
return userQuery;
|
||||
}
|
||||
|
||||
private void OnFormatModelSelectionChanged(FormatModel selectedFormatModel)
|
||||
{
|
||||
if (selectedFormatModel != null)
|
||||
{
|
||||
// Deselect all other formats in the collection
|
||||
foreach (var format in FormatModelsCollection!)
|
||||
{
|
||||
if (format != selectedFormatModel && format.IsSelected)
|
||||
{
|
||||
format.IsSelected = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle the selected format model
|
||||
selectedFormatModel.IsSelected = !selectedFormatModel.IsSelected;
|
||||
this.PreferredFormat = selectedFormatModel.Content;
|
||||
|
||||
// Optional: Force update of the entire collection
|
||||
RaisePropertyChanged(nameof(FormatModelsCollection));
|
||||
}
|
||||
}
|
||||
|
||||
internal void GetHeaderInfo()
|
||||
{
|
||||
var headerInfo = new ObservableCollection<GettingStartedModel>();
|
||||
int headerItemsCount = 4;
|
||||
|
||||
for (int i = 0; i < headerItemsCount; i++)
|
||||
{
|
||||
var gallery = new GettingStartedModel()
|
||||
{
|
||||
Image = this.ImagesCollection[i],
|
||||
HeaderMessage = this.HeaderMessages[i],
|
||||
};
|
||||
headerInfo.Add(gallery);
|
||||
}
|
||||
this.headerInfoCollection = headerInfo;
|
||||
}
|
||||
|
||||
#region PropertyChanged
|
||||
|
||||
/// <summary>
|
||||
/// Property changed handler.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when property is changed.
|
||||
/// </summary>
|
||||
/// <param name="propName">changed property name</param>
|
||||
public void RaisePropertyChanged(string propName)
|
||||
{
|
||||
if (this.PropertyChanged != null)
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propName));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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 SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
class SfAssistViewHeaderBehavior : Behavior<SampleView>
|
||||
{
|
||||
#region Fields
|
||||
internal GettingStartedViewModel? viewModel;
|
||||
private Border? border;
|
||||
int headerHeight = DeviceInfo.Platform == DevicePlatform.WinUI || DeviceInfo.Platform == DevicePlatform.MacCatalyst ? 255 : 416;
|
||||
const int editorHeight = 56;
|
||||
const int minPadding = 24;
|
||||
private SampleView? sampleView;
|
||||
double padding = DeviceInfo.Platform == DevicePlatform.WinUI ? 2 : 125;
|
||||
#endregion
|
||||
|
||||
#region Overrides
|
||||
|
||||
protected override void OnAttachedTo(SampleView bindable)
|
||||
{
|
||||
sampleView = bindable;
|
||||
border = bindable.FindByName<Border>("border");
|
||||
viewModel = bindable.BindingContext as GettingStartedViewModel;
|
||||
#if WINDOWS || MACCATALYST
|
||||
sampleView.PropertyChanged += this.SampleView_PropertyChanged!;
|
||||
# endif
|
||||
border.PropertyChanged += this.View_PropertyChanged!;
|
||||
base.OnAttachedTo(bindable);
|
||||
}
|
||||
|
||||
protected override void OnDetachingFrom(SampleView bindable)
|
||||
{
|
||||
#if WINDOWS || MACCATALYST
|
||||
sampleView!.PropertyChanged -= this.SampleView_PropertyChanged!;
|
||||
#endif
|
||||
border!.PropertyChanged -= View_PropertyChanged!;
|
||||
viewModel = null;
|
||||
base.OnDetachingFrom(bindable);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CallBacks
|
||||
private void View_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == "Height" && viewModel != null)
|
||||
{
|
||||
double top = ((sender as Border)!.Height - editorHeight) / 2 - (headerHeight / 2);
|
||||
top = top < minPadding ? minPadding : top;
|
||||
viewModel.HeaderPadding = new Thickness(0, top, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#if WINDOWS || MACCATALYST
|
||||
private void SampleView_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == "Height" && viewModel != null && sampleView != null)
|
||||
{
|
||||
double borderHeight = 0;
|
||||
#if WINDOWS
|
||||
borderHeight = sampleView.Height - padding;
|
||||
#elif MACCATALYST
|
||||
borderHeight = sampleView.Height - (2 * padding);
|
||||
#endif
|
||||
border!.HeightRequest = borderHeight;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.ComponentModel;
|
||||
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class GettingStartedModel : INotifyPropertyChanged
|
||||
{
|
||||
private string? image;
|
||||
private string? headerMessage;
|
||||
|
||||
public string? Image
|
||||
{
|
||||
get { return image; }
|
||||
set
|
||||
{
|
||||
image = value;
|
||||
OnPropertyChanged("Image");
|
||||
}
|
||||
}
|
||||
|
||||
public string? HeaderMessage
|
||||
{
|
||||
get { return headerMessage; }
|
||||
set
|
||||
{
|
||||
headerMessage = value;
|
||||
OnPropertyChanged("HeaderMessage");
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public void OnPropertyChanged(string name)
|
||||
{
|
||||
if (this.PropertyChanged != null)
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
<?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.AIAssistView.SfAIAssistView.GettingStarted"
|
||||
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:aiAssist="clr-namespace:Syncfusion.Maui.AIAssistView;assembly=Syncfusion.Maui.AIAssistView"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.AIAssistView.SfAIAssistView"
|
||||
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:thickness="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
|
||||
x:Name="sampleView">
|
||||
<localCore:SampleView.BindingContext>
|
||||
<local:GettingStartedViewModel x:Name="viewModel"/>
|
||||
</localCore:SampleView.BindingContext>
|
||||
<localCore:SampleView.Behaviors>
|
||||
<local:SfAssistViewHeaderBehavior/>
|
||||
</localCore:SampleView.Behaviors>
|
||||
<localCore:SampleView.Resources>
|
||||
<ResourceDictionary>
|
||||
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
|
||||
<DataTemplate x:Key="headerTemplate">
|
||||
<VerticalStackLayout Padding="{Binding HeaderPadding}">
|
||||
<Grid RowDefinitions="45,30,Auto" RowSpacing="10">
|
||||
<Border BackgroundColor="{AppThemeBinding Dark=#D0BCFF,Light=#6750A4}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" HorizontalOptions="Center" >
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="12"/>
|
||||
</Border.StrokeShape>
|
||||
<Label Text="" FontSize="24" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontFamily="MauiSampleFontIcon" TextColor="{AppThemeBinding Dark={StaticResource PrimaryForeground},Light={StaticResource White}}" HeightRequest="45" WidthRequest="45" HorizontalOptions="Center" />
|
||||
</Border>
|
||||
<Label Text="Ask AI Anything!" HorizontalOptions="Center" Grid.Row="1" FontFamily="Roboto-Regular" FontSize="16"/>
|
||||
<FlexLayout x:Name="headerlayout" BindableLayout.ItemsSource="{Binding HeaderInfoCollection}" Grid.Row="2" Wrap="Wrap" JustifyContent="Center" Direction="Row" >
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid RowDefinitions="*,Auto,10" Padding="10">
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Path=BindingContext.HeaderItemTappedCommand, Source={x:Reference headerlayout}}" CommandParameter="{x:Reference label}"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Border WidthRequest="132" HeightRequest="130" Grid.RowSpan="2" HorizontalOptions="Center" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="12"/>
|
||||
</Border.StrokeShape>
|
||||
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}" Aspect="AspectFill" HeightRequest="130" WidthRequest="130" HorizontalOptions="Center"/>
|
||||
</Border>
|
||||
<Border BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}" Opacity="0.9" HorizontalOptions="Center" VerticalOptions="End" WidthRequest="120" Grid.Row="1" Grid.RowSpan="2">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="12"/>
|
||||
</Border.StrokeShape>
|
||||
<Label Text="{Binding HeaderMessage}" x:Name="label" FontFamily="Roboto-Regular" FontSize="14" Padding="10" LineBreakMode="WordWrap" HorizontalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</FlexLayout>
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
</localCore:SampleView.Resources>
|
||||
<localCore:SampleView.Content>
|
||||
<Border x:Name="border"
|
||||
Padding="0"
|
||||
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
|
||||
Stroke="{AppThemeBinding Light={StaticResource BorderLight},Dark={StaticResource Border}}"
|
||||
StrokeThickness="{OnPlatform Default=0,MacCatalyst=1,WinUI=1}"
|
||||
MaximumWidthRequest="{OnPlatform WinUI=650, MacCatalyst=670}"
|
||||
HorizontalOptions="{OnPlatform WinUI=Center, MacCatalyst=Center, Default=Fill}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="10" />
|
||||
</Border.StrokeShape>
|
||||
<Border.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst"
|
||||
Value="20" />
|
||||
</OnPlatform>
|
||||
</Border.Margin>
|
||||
<Grid>
|
||||
<aiAssist:SfAIAssistView x:Name="sfAIAssistView"
|
||||
ShowHeader="true"
|
||||
HeaderTemplate="{StaticResource headerTemplate}"
|
||||
AssistItems="{Binding Messages}"
|
||||
ItemCopyCommand="{Binding CopyCommand}"
|
||||
RequestCommand="{Binding AssistViewRequestCommand}"
|
||||
ItemRetryCommand="{Binding RetryCommand}">
|
||||
</aiAssist:SfAIAssistView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</localCore:SampleView.Content>
|
||||
</localCore:SampleView>
|
|
@ -0,0 +1,19 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public partial class GettingStarted : SampleView
|
||||
{
|
||||
public GettingStarted()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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 System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Input;
|
||||
using Syncfusion.Maui.AIAssistView;
|
||||
|
||||
#nullable disable
|
||||
namespace SampleBrowser.Maui.AIAssistView.SfAIAssistView
|
||||
{
|
||||
public class GettingStartedViewModel : INotifyPropertyChanged
|
||||
{
|
||||
#region Field
|
||||
private ObservableCollection<IAssistItem> messages;
|
||||
private ObservableCollection<GettingStartedModel> headerInfoCollection;
|
||||
private List<List<string>> suggestionlist = new List<List<string>>();
|
||||
private AzureAIService azureAIService;
|
||||
private Thickness headerPadding;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public GettingStartedViewModel()
|
||||
{
|
||||
azureAIService = new AzureAIService();
|
||||
this.GetHeaderInfo();
|
||||
this.GenerateSuggestions();
|
||||
this.messages = new ObservableCollection<IAssistItem>();
|
||||
this.CopyCommand = new Command<object>(ExecuteCopyCommand);
|
||||
this.RetryCommand = new Command<object>(ExecuteRetryCommand);
|
||||
this.AssistViewRequestCommand = new Command<object>(ExecuteRequestCommand);
|
||||
this.HeaderItemTappedCommand = new Command(HeaderItemTapCommand);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private ObservableCollection<string> HeaderMessages { get; set; } = new ObservableCollection<string>
|
||||
{
|
||||
"Ownership",
|
||||
"Brainstorming",
|
||||
"Listening",
|
||||
"Resilience",
|
||||
};
|
||||
|
||||
private ObservableCollection<string> ImagesCollection { get; set; } = new ObservableCollection<string>
|
||||
{
|
||||
"ownership.png",
|
||||
"brainstorming.png",
|
||||
"listening.png",
|
||||
"resilience.png",
|
||||
};
|
||||
|
||||
public ICommand CopyCommand { get; set; }
|
||||
public ICommand RetryCommand { get; set; }
|
||||
public ICommand AssistViewRequestCommand { get; set; }
|
||||
public ICommand HeaderItemTappedCommand { get; set; }
|
||||
|
||||
public ObservableCollection<GettingStartedModel> HeaderInfoCollection
|
||||
{
|
||||
get
|
||||
{
|
||||
return headerInfoCollection;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.headerInfoCollection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<IAssistItem> Messages
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.messages;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.messages = value;
|
||||
RaisePropertyChanged("Messages");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Thickness HeaderPadding
|
||||
{
|
||||
get { return headerPadding; }
|
||||
set { headerPadding = value; RaisePropertyChanged("HeaderPadding"); }
|
||||
}
|
||||
|
||||
private async void HeaderItemTapCommand(object obj)
|
||||
{
|
||||
AssistItem request = new AssistItem() { Text = (obj as Label).Text, IsRequested = true };
|
||||
this!.Messages.Add(request);
|
||||
await this.GetResponseWithSuggestion(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private async void ExecuteRequestCommand(object obj)
|
||||
{
|
||||
var request = (obj as Syncfusion.Maui.AIAssistView.RequestEventArgs).RequestItem;
|
||||
await this.GetResult(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private void ExecuteCopyCommand(object obj)
|
||||
{
|
||||
string text = (obj as AssistItem).Text;
|
||||
text = Regex.Replace(text, "<.*?>| ", string.Empty);
|
||||
Clipboard.SetTextAsync(text);
|
||||
}
|
||||
|
||||
private async void ExecuteRetryCommand(object obj)
|
||||
{
|
||||
var request = (obj as AssistItem).RequestItem;
|
||||
await this.GetResult(request).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private void GetHeaderInfo()
|
||||
{
|
||||
var headerInfo = new ObservableCollection<GettingStartedModel>();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
var gallery = new GettingStartedModel()
|
||||
{
|
||||
Image = this.ImagesCollection[i],
|
||||
HeaderMessage = this.HeaderMessages[i],
|
||||
};
|
||||
headerInfo.Add(gallery);
|
||||
}
|
||||
this.headerInfoCollection = headerInfo;
|
||||
}
|
||||
|
||||
private async Task GetResult(object inputQuery)
|
||||
{
|
||||
await Task.Delay(1000).ConfigureAwait(true);
|
||||
AssistItem request = (AssistItem)inputQuery;
|
||||
if (request != null)
|
||||
{
|
||||
var userAIPrompt = this.GetUserAIPrompt(request.Text);
|
||||
var response = await azureAIService!.GetResultsFromAI(request.Text, userAIPrompt).ConfigureAwait(true);
|
||||
response = response.Replace("\n", "<br>");
|
||||
AssistItem responseItem = new AssistItem() { Text = response };
|
||||
responseItem.RequestItem = inputQuery;
|
||||
this.Messages.Add(responseItem);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetUserAIPrompt(string userPrompt)
|
||||
{
|
||||
string userQuery = $"Given User query: {userPrompt}." +
|
||||
$"\nSome conditions need to follow:" +
|
||||
$"\nGive heading of the topic and simplified answer in 4 points with numbered format" +
|
||||
$"\nGive as string alone" +
|
||||
$"\nRemove ** and remove quotes if it is there in the string.";
|
||||
return userQuery;
|
||||
}
|
||||
|
||||
private async Task GetResponseWithSuggestion(object inputQuery)
|
||||
{
|
||||
await Task.Delay(1000).ConfigureAwait(true);
|
||||
AssistItem request = (AssistItem)inputQuery;
|
||||
if (request != null)
|
||||
{
|
||||
var userAIPrompt = this.GetUserAIPrompt(request.Text);
|
||||
var response = await azureAIService!.GetResultsFromAI(request.Text, userAIPrompt).ConfigureAwait(true);
|
||||
response = response.Replace("\n", "<br>");
|
||||
await Task.Delay(1000).ConfigureAwait(true);
|
||||
var suggestion = this.GetSuggestion(request.Text);
|
||||
await Task.Delay(1000).ConfigureAwait(true);
|
||||
AssistItem responseItem = new AssistItem() { Text = response, Suggestion = suggestion };
|
||||
responseItem.RequestItem = inputQuery;
|
||||
this.Messages.Add(responseItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateSuggestions()
|
||||
{
|
||||
List<string> firstHeaderSuggestion = new List<string> { "Initiative", "Responsibility", "Accountability" };
|
||||
List<string> secondHeaderSuggestion = new List<string> { "Different Perspective", "More Ideas" };
|
||||
List<string> thirdHeaderSuggestion = new List<string> { "Active Listening", "Passive Listening" };
|
||||
suggestionlist.Add(firstHeaderSuggestion);
|
||||
suggestionlist.Add(secondHeaderSuggestion);
|
||||
suggestionlist.Add(thirdHeaderSuggestion);
|
||||
}
|
||||
|
||||
private AssistItemSuggestion GetSuggestion(string prompt)
|
||||
{
|
||||
var promptSuggestions = new AssistItemSuggestion();
|
||||
|
||||
for (int i = 0; i < HeaderMessages.Count() - 1; i++)
|
||||
{
|
||||
if (HeaderMessages[i].Contains(prompt))
|
||||
{
|
||||
var suggestions = new ObservableCollection<ISuggestion>();
|
||||
foreach (var items in suggestionlist[i])
|
||||
{
|
||||
suggestions.Add(new AssistSuggestion() { Text = items });
|
||||
}
|
||||
promptSuggestions.Items = suggestions;
|
||||
promptSuggestions.Orientation = SuggestionsOrientation.Horizontal;
|
||||
return promptSuggestions;
|
||||
}
|
||||
}
|
||||
return promptSuggestions;
|
||||
}
|
||||
|
||||
#region PropertyChanged
|
||||
|
||||
/// <summary>
|
||||
/// Property changed handler.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when property is changed.
|
||||
/// </summary>
|
||||
/// <param name="propName">changed property name</param>
|
||||
public void RaisePropertyChanged(string propName)
|
||||
{
|
||||
if (this.PropertyChanged != null)
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propName));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -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.Accordion", "SampleBrowser.Maui.Accordion\SampleBrowser.Maui.Accordion.csproj", "{3CEA2BFF-0153-495F-957A-B443600F3DA0}"
|
||||
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
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release-Xml|Any CPU.Build.0 = Release|Any CPU
|
||||
{3CEA2BFF-0153-495F-957A-B443600F3DA0}.Release-Xml|Any CPU.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SyncfusionControls>
|
||||
<ControlCategory Name="Layouts">
|
||||
<Control Title="Accordion" ControlName="SfAccordion" Image="accordion.png" Description="Vertical collapsible panel with stacked headers for simultaneous expansion or collapse of items.">
|
||||
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" CodeViewerPath="Accordion/GettingStarted/" />
|
||||
</Control>
|
||||
</ControlCategory>
|
||||
</SyncfusionControls>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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.Accordion"
|
||||
xmlns:base ="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
x:Class="SampleBrowser.Maui.Accordion.App"
|
||||
xmlns:theme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<base:SampleBrowserStyles/>
|
||||
<theme:SyncfusionThemeResourceDictionary/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,28 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion.SfAccordion;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SampleBrowser.Maui.Accordion;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
var appInfo = typeof(App).GetTypeInfo().Assembly;
|
||||
SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true;
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState? activationState)
|
||||
{
|
||||
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
|
||||
var mainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(assembly);
|
||||
return new Window(mainPage);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SampleBrowser.Maui.Accordion
|
||||
{
|
||||
public class ControlConfig
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SampleBrowser>
|
||||
<Assemblies Prefix="SampleBrowser.Maui.Accordion" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublickeyToken=null">
|
||||
<Assembly Name="Accordion"/>
|
||||
</Assemblies>
|
||||
</SampleBrowser>
|
|
@ -0,0 +1,32 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
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("Roboto-Medium.ttf", "Roboto-Medium");
|
||||
fonts.AddFont("Roboto-Regular.ttf", "Roboto-Regular");
|
||||
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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
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.Accordion.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.Accordion.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.Accordion.WinUI">
|
||||
|
||||
</maui:MauiWinUIApplication>
|
|
@ -0,0 +1,50 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion.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);
|
||||
|
||||
if (IPlatformApplication.Current != null)
|
||||
{
|
||||
foreach (var item in IPlatformApplication.Current.Application.Windows)
|
||||
{
|
||||
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
|
||||
|
||||
if (platformWindow != null)
|
||||
{
|
||||
platformWindow.ExtendsContentIntoTitleBar = false;
|
||||
platformWindow.Title = ".NET MAUI Accordion Demo";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?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:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
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" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="75FBFD6E-94A5-4D2F-90D9-28B82CE3B381" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<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.Accordion.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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
[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-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
|
||||
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,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="456" height="456" fill="#512BD4" />
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 228 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 |
Двоичные данные
MAUI/Accordion/SampleBrowser.Maui.Accordion/Resources/Fonts/OpenSans-Regular.ttf
Normal file
Двоичные данные
MAUI/Accordion/SampleBrowser.Maui.Accordion/Resources/Fonts/OpenSans-Semibold.ttf
Normal file
Двоичные данные
MAUI/Accordion/SampleBrowser.Maui.Accordion/Resources/Fonts/Roboto-Medium.ttf
Normal file
Двоичные данные
MAUI/Accordion/SampleBrowser.Maui.Accordion/Resources/Fonts/Roboto-Regular.ttf
Normal file
|
@ -0,0 +1,93 @@
|
|||
<svg width="419" height="519" viewBox="0 0 419 519" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M284.432 247.568L284.004 221.881C316.359 221.335 340.356 211.735 355.308 193.336C382.408 159.996 372.893 108.183 372.786 107.659L398.013 102.831C398.505 105.432 409.797 167.017 375.237 209.53C355.276 234.093 324.719 246.894 284.432 247.568Z" fill="#8A6FE8"/>
|
||||
<path d="M331.954 109.36L361.826 134.245C367.145 138.676 375.055 137.959 379.497 132.639C383.928 127.32 383.211 119.41 377.891 114.969L348.019 90.0842C342.7 85.6531 334.79 86.3702 330.348 91.6896C325.917 97.0197 326.634 104.929 331.954 109.36Z" fill="#8A6FE8"/>
|
||||
<path d="M407.175 118.062L417.92 94.2263C420.735 87.858 417.856 80.4087 411.488 77.5831C405.12 74.7682 397.67 77.6473 394.845 84.0156L383.831 108.461L407.175 118.062Z" fill="#8A6FE8"/>
|
||||
<path d="M401.363 105.175L401.234 69.117C401.181 62.1493 395.498 56.541 388.53 56.5945C381.562 56.648 375.954 62.3313 376.007 69.2989L376.018 96.11L401.363 105.175Z" fill="#8A6FE8"/>
|
||||
<path d="M386.453 109.071L378.137 73.9548C376.543 67.169 369.757 62.9628 362.971 64.5575C356.185 66.1523 351.979 72.938 353.574 79.7237L362.04 115.482L386.453 109.071Z" fill="#8A6FE8"/>
|
||||
<path d="M381.776 142.261C396.359 142.261 408.181 130.44 408.181 115.857C408.181 101.274 396.359 89.4527 381.776 89.4527C367.194 89.4527 355.372 101.274 355.372 115.857C355.372 130.44 367.194 142.261 381.776 142.261Z" fill="url(#paint0_radial)"/>
|
||||
<path d="M248.267 406.979C248.513 384.727 245.345 339.561 222.376 301.736L199.922 315.372C220.76 349.675 222.323 389.715 221.841 407.182C221.798 408.627 235.263 409.933 248.267 406.979Z" fill="url(#paint1_linear)"/>
|
||||
<path d="M221.841 406.936L242.637 406.84L262.052 518.065L220.311 518.258C217.132 518.269 214.724 515.711 214.938 512.532L221.841 406.936Z" fill="#522CD5"/>
|
||||
<path d="M306.566 488.814C310.173 491.661 310.109 495.782 309.831 500.127L308.964 513.452C308.803 515.839 306.727 517.798 304.34 517.809L260.832 518.012C258.125 518.023 256.08 515.839 256.262 513.142L256.551 499.335C256.883 494.315 255.192 492.474 251.307 487.744C244.649 479.663 224.967 435.62 226.84 406.925L248.256 406.829C249.691 423.858 272.167 461.682 306.566 488.814Z" fill="url(#paint2_linear)"/>
|
||||
<path d="M309.82 500.127C310.023 497.088 310.077 494.176 308.889 491.715L254.635 491.961C256.134 494.166 256.765 496.092 256.562 499.314L256.273 513.121C256.091 515.828 258.146 518.012 260.843 517.99L304.34 517.798C306.727 517.787 308.803 515.828 308.964 513.442L309.82 500.127Z" fill="url(#paint3_radial)"/>
|
||||
<path d="M133.552 407.471C133.103 385.22 135.864 340.021 158.49 301.993L181.073 315.425C160.545 349.921 159.346 389.972 159.989 407.428C160.042 408.884 146.578 410.318 133.552 407.471Z" fill="url(#paint4_linear)"/>
|
||||
<path d="M110.798 497.152C110.765 494.187 111.204 491.575 112.457 487.23C131.882 434.132 133.52 407.364 133.52 407.364L159.999 407.246C159.999 407.246 161.819 433.512 181.716 486.427C183.289 490.195 183.471 493.641 183.674 496.831L183.792 513.816C183.803 516.374 181.716 518.483 179.158 518.494L177.873 518.504L116.781 518.782L115.496 518.793C112.927 518.804 110.83 516.728 110.819 514.159L110.798 497.152Z" fill="url(#paint5_linear)"/>
|
||||
<path d="M110.798 497.152C110.798 496.67 110.808 496.199 110.83 495.739C110.969 494.262 111.643 492.603 114.875 492.582L180.207 492.282C182.561 492.367 183.343 494.176 183.589 495.311C183.621 495.814 183.664 496.328 183.696 496.82L183.813 513.806C183.824 515.411 183.011 516.824 181.769 517.669C181.031 518.172 180.132 518.472 179.179 518.483L177.895 518.494L116.802 518.772L115.528 518.782C114.244 518.793 113.077 518.269 112.232 517.434C111.386 516.599 110.862 515.432 110.851 514.148L110.798 497.152Z" fill="url(#paint6_radial)"/>
|
||||
<path d="M314.979 246.348C324.162 210.407 318.008 181.777 318.008 181.777L326.452 181.734L326.656 181.574C314.262 115.75 256.326 66.0987 186.949 66.4198C108.796 66.773 45.7233 130.424 46.0765 208.577C46.4297 286.731 110.08 349.803 188.234 349.45C249.905 349.172 302.178 309.474 321.304 254.343C321.872 251.999 321.797 247.804 314.979 246.348Z" fill="url(#paint7_radial)"/>
|
||||
<path d="M310.237 279.035L65.877 280.148C71.3998 289.428 77.95 298.012 85.3672 305.761L290.972 304.829C298.336 297.005 304.8 288.368 310.237 279.035Z" fill="#D8CFF7"/>
|
||||
<path d="M235.062 312.794L280.924 312.585L280.74 272.021L234.877 272.23L235.062 312.794Z" fill="#512BD4"/>
|
||||
<path d="M243.001 297.626C242.691 297.626 242.434 297.53 242.22 297.327C242.006 297.123 241.899 296.866 241.899 296.588C241.899 296.299 242.006 296.042 242.22 295.839C242.434 295.625 242.691 295.528 243.001 295.528C243.312 295.528 243.568 295.635 243.782 295.839C243.996 296.042 244.114 296.299 244.114 296.588C244.114 296.877 244.007 297.123 243.793 297.327C243.568 297.519 243.312 297.626 243.001 297.626Z" fill="white"/>
|
||||
<path d="M255.192 297.434H253.212L247.967 289.203C247.839 289 247.721 288.775 247.636 288.55H247.593C247.636 288.786 247.657 289.299 247.657 290.091L247.668 297.444H245.912L245.891 286.228H247.999L253.062 294.265C253.276 294.597 253.415 294.833 253.479 294.95H253.511C253.458 294.651 253.437 294.148 253.437 293.441L253.426 286.217H255.17L255.192 297.434Z" fill="white"/>
|
||||
<path d="M263.733 297.412L257.589 297.423L257.568 286.206L263.465 286.195V287.779L259.387 287.79L259.398 290.969L263.155 290.958V292.532L259.398 292.542L259.409 295.86L263.733 295.85V297.412Z" fill="white"/>
|
||||
<path d="M272.445 287.758L269.298 287.769L269.32 297.401H267.5L267.479 287.769L264.343 287.779V286.195L272.434 286.174L272.445 287.758Z" fill="white"/>
|
||||
<path d="M315.279 246.337C324.355 210.836 318.457 182.483 318.308 181.798L171.484 182.462C171.484 182.462 162.226 181.563 162.268 190.018C162.311 198.463 162.761 222.341 162.878 248.746C162.9 254.172 167.363 256.773 170.863 256.751C170.874 256.751 311.618 252.213 315.279 246.337Z" fill="url(#paint8_radial)"/>
|
||||
<path d="M227.685 246.798C227.685 246.798 250.183 228.827 254.571 225.499C258.959 222.17 262.812 221.977 266.869 225.445C270.925 228.913 293.616 246.498 293.616 246.498L227.685 246.798Z" fill="#A08BE8"/>
|
||||
<path d="M320.748 256.141C320.748 256.141 324.943 248.414 315.279 246.348C315.289 246.305 170.927 246.894 170.927 246.894C167.566 246.905 163.232 244.925 162.846 241.671C162.857 244.004 162.878 246.369 162.889 248.756C162.91 253.68 166.582 256.27 169.878 256.698C170.21 256.73 170.542 256.773 170.874 256.773L180.742 256.73L320.748 256.141Z" fill="#512BD4"/>
|
||||
<path d="M206.4 233.214C212.511 233.095 217.302 224.667 217.102 214.39C216.901 204.112 211.785 195.878 205.674 195.997C199.563 196.116 194.772 204.544 194.973 214.821C195.173 225.099 200.289 233.333 206.4 233.214Z" fill="#512BD4"/>
|
||||
<path d="M306.249 214.267C306.356 203.989 301.488 195.605 295.377 195.541C289.266 195.478 284.225 203.758 284.118 214.037C284.011 224.315 288.878 232.699 294.99 232.763C301.101 232.826 306.142 224.545 306.249 214.267Z" fill="#512BD4"/>
|
||||
<path d="M205.905 205.291C208.152 203.022 211.192 202.016 214.157 202.262C215.912 205.495 217.014 209.733 217.111 214.389C217.164 217.3 216.811 220.04 216.158 222.513C212.669 223.519 208.752 222.662 205.979 219.922C201.912 215.909 201.88 209.348 205.905 205.291Z" fill="#8065E0"/>
|
||||
<path d="M294.996 204.285C297.255 202.016 300.294 200.999 303.259 201.256C305.164 204.628 306.309 209.209 306.256 214.239C306.224 216.808 305.892 219.259 305.303 221.485C301.793 222.523 297.843 221.678 295.061 218.916C291.004 214.892 290.972 208.342 294.996 204.285Z" fill="#8065E0"/>
|
||||
<path d="M11.6342 357.017C10.9171 354.716 -5.72611 300.141 21.3204 258.903C36.9468 235.078 63.3083 221.035 99.6664 217.15L102.449 243.276C74.3431 246.273 54.4676 256.345 43.3579 273.202C23.0971 303.941 36.5722 348.733 36.7113 349.183L11.6342 357.017Z" fill="url(#paint9_linear)"/>
|
||||
<path d="M95.1498 252.802C109.502 252.802 121.137 241.167 121.137 226.815C121.137 212.463 109.502 200.828 95.1498 200.828C80.7976 200.828 69.1628 212.463 69.1628 226.815C69.1628 241.167 80.7976 252.802 95.1498 252.802Z" fill="url(#paint10_radial)"/>
|
||||
<path d="M72.0098 334.434L33.4683 329.307C26.597 328.397 20.2929 333.214 19.3725 340.085C18.4627 346.956 23.279 353.26 30.1504 354.181L68.6919 359.308C75.5632 360.217 81.8673 355.401 82.7878 348.53C83.6975 341.658 78.8705 335.344 72.0098 334.434Z" fill="#8A6FE8"/>
|
||||
<path d="M3.73535 367.185L7.35297 393.076C8.36975 399.968 14.7702 404.731 21.6629 403.725C28.5556 402.708 33.3185 396.308 32.3124 389.415L28.5984 362.861L3.73535 367.185Z" fill="#8A6FE8"/>
|
||||
<path d="M15.5194 374.988L34.849 405.427C38.6058 411.292 46.4082 413.005 52.2735 409.248C58.1387 405.491 59.8512 397.689 56.0945 391.823L41.7953 369.144L15.5194 374.988Z" fill="#8A6FE8"/>
|
||||
<path d="M26.0511 363.739L51.8026 389.019C56.7688 393.911 64.7532 393.846 69.6445 388.88C74.5358 383.914 74.4715 375.929 69.516 371.038L43.2937 345.297L26.0511 363.739Z" fill="#8A6FE8"/>
|
||||
<path d="M26.4043 381.912C40.987 381.912 52.8086 370.091 52.8086 355.508C52.8086 340.925 40.987 329.104 26.4043 329.104C11.8216 329.104 0 340.925 0 355.508C0 370.091 11.8216 381.912 26.4043 381.912Z" fill="url(#paint11_radial)"/>
|
||||
<path d="M184.73 63.6308L157.819 66.5892L158.561 38.5412L177.888 36.4178L184.73 63.6308Z" fill="#8A6FE8"/>
|
||||
<path d="M170.018 41.647C180.455 39.521 187.193 29.3363 185.067 18.8988C182.941 8.46126 172.757 1.72345 162.319 3.84944C151.882 5.97543 145.144 16.1601 147.27 26.5976C149.396 37.0351 159.58 43.773 170.018 41.647Z" fill="#D8CFF7"/>
|
||||
<path d="M196.885 79.385C198.102 79.2464 198.948 78.091 198.684 76.8997C195.851 64.2818 183.923 55.5375 170.773 56.9926C157.622 58.4371 147.886 69.5735 147.865 82.4995C147.863 83.7232 148.949 84.6597 150.168 84.5316L196.885 79.385Z" fill="url(#paint12_radial)"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(382.004 103.457) scale(26.4058)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint1_linear" x1="214.439" y1="303.482" x2="236.702" y2="409.505" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear" x1="231.673" y1="404.144" x2="297.805" y2="522.048" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint3_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(280.957 469.555) rotate(-0.260742) scale(45.8326)">
|
||||
<stop offset="0.034" stop-color="#522CD5"/>
|
||||
<stop offset="0.9955" stop-color="#8A6FE8"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint4_linear" x1="166.061" y1="303.491" x2="144.763" y2="409.709" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint5_linear" x1="146.739" y1="407.302" x2="147.246" y2="518.627" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#522CD5"/>
|
||||
<stop offset="0.4397" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint6_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(148.63 470.023) rotate(179.739) scale(50.2476)">
|
||||
<stop offset="0.034" stop-color="#522CD5"/>
|
||||
<stop offset="0.9955" stop-color="#8A6FE8"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint7_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(219.219 153.929) rotate(179.739) scale(140.935)">
|
||||
<stop offset="0.4744" stop-color="#A08BE8"/>
|
||||
<stop offset="0.8618" stop-color="#8065E0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint8_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(314.861 158.738) rotate(179.739) scale(146.053)">
|
||||
<stop offset="0.0933" stop-color="#E1DFDD"/>
|
||||
<stop offset="0.6573" stop-color="white"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint9_linear" x1="54.1846" y1="217.159" x2="54.1846" y2="357.022" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.3344" stop-color="#9780E6"/>
|
||||
<stop offset="0.8488" stop-color="#8A6FE8"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint10_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(90.3494 218.071) rotate(-0.260742) scale(25.9924)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint11_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.805 345.043) scale(26.4106)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint12_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(169.113 67.3662) rotate(-32.2025) scale(21.0773)">
|
||||
<stop stop-color="#8065E0"/>
|
||||
<stop offset="1" stop-color="#512BD4"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 12 KiB |
|
@ -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,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<Color x:Key="Primary">#512BD4</Color>
|
||||
<Color x:Key="Secondary">#DFD8F7</Color>
|
||||
<Color x:Key="Tertiary">#2B0B98</Color>
|
||||
<Color x:Key="White">White</Color>
|
||||
<Color x:Key="Black">Black</Color>
|
||||
<Color x:Key="Gray100">#E1E1E1</Color>
|
||||
<Color x:Key="Gray200">#C8C8C8</Color>
|
||||
<Color x:Key="Gray300">#ACACAC</Color>
|
||||
<Color x:Key="Gray400">#919191</Color>
|
||||
<Color x:Key="Gray500">#6E6E6E</Color>
|
||||
<Color x:Key="Gray600">#404040</Color>
|
||||
<Color x:Key="Gray900">#212121</Color>
|
||||
<Color x:Key="Gray950">#141414</Color>
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
|
||||
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
|
||||
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
|
||||
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
|
||||
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
|
||||
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
|
||||
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
|
||||
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
|
||||
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
|
||||
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
|
||||
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
|
||||
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
|
||||
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
|
||||
|
||||
<Color x:Key="Yellow100Accent">#F7B548</Color>
|
||||
<Color x:Key="Yellow200Accent">#FFD590</Color>
|
||||
<Color x:Key="Yellow300Accent">#FFE5B9</Color>
|
||||
<Color x:Key="Cyan100Accent">#28C2D1</Color>
|
||||
<Color x:Key="Cyan200Accent">#7BDDEF</Color>
|
||||
<Color x:Key="Cyan300Accent">#C3F2F4</Color>
|
||||
<Color x:Key="Blue100Accent">#3E8EED</Color>
|
||||
<Color x:Key="Blue200Accent">#72ACF1</Color>
|
||||
<Color x:Key="Blue300Accent">#A7CBF6</Color>
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,405 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<!--<Style TargetType="ActivityIndicator">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="IndicatorView">
|
||||
<Setter Property="IndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}"/>
|
||||
<Setter Property="SelectedIndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray100}}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="StrokeShape" Value="Rectangle"/>
|
||||
<Setter Property="StrokeThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="BoxView">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Primary}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Padding" Value="14,10"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="DatePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Editor">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Entry">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Frame">
|
||||
<Setter Property="HasShadow" Value="False" />
|
||||
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ImageButton">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="BorderColor" Value="Transparent"/>
|
||||
<Setter Property="BorderWidth" Value="0"/>
|
||||
<Setter Property="CornerRadius" Value="0"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Picker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ProgressBar">
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RefreshView">
|
||||
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchHandler">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shadow">
|
||||
<Setter Property="Radius" Value="15" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
<Setter Property="Brush" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Offset" Value="10,10" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Slider">
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SwipeItem">
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Switch">
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="ThumbColor" Value="{StaticResource White}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TimePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Page" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shell" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
|
||||
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="Shell.NavBarHasShadow" Value="False" />
|
||||
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="NavigationPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TabbedPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>-->
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,99 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
|
||||
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SampleBrowser.Maui.Accordion</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.Accordion</ApplicationTitle>
|
||||
|
||||
<!-- App Identifier -->
|
||||
<ApplicationId>com.companyname.samplebrowser.maui.accordion</ApplicationId>
|
||||
<ApplicationIdGuid>ac8b7816-b396-4e19-b5b3-f2e82474e81d</ApplicationIdGuid>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.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>
|
||||
</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>
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<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="*,*" />
|
||||
|
||||
<!-- Images -->
|
||||
<MauiImage Include="Resources\Images\*" />
|
||||
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
|
||||
|
||||
<!-- 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="Resources\Fonts\Roboto-Medium.ttf" />
|
||||
<None Remove="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ControlList.xml" />
|
||||
<EmbeddedResource Include="AccordionSamplesList.xml" />
|
||||
<EmbeddedResource Include="SyncfusionLicense.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Syncfusion.Maui.Buttons" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Expander" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="27.2.2" />
|
||||
<PackageReference Include="Syncfusion.Maui.Popup" version="27.2.2" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="27.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>SampleBrowser.Maui.Accordion</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>Accordion component for Syncfusion .NET MAUI</description>
|
||||
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
|
||||
</metadata>
|
||||
</package>
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Accordion\GettingStarted\View\GettingStarted.xaml.cs">
|
||||
<Link>Samples\Accordion\GettingStarted\View\GettingStarted.xaml.cs</Link>
|
||||
<DependentUpon>GettingStarted.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Accordion\GettingStarted\Model\EmployeeInfo.cs">
|
||||
<Link>Samples\Accordion\GettingStarted\Model\EmployeeInfo.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Accordion\GettingStarted\ViewModel\EmployeeDetails.cs">
|
||||
<Link>Samples\Accordion\GettingStarted\ViewModel\EmployeeDetails.cs</Link>
|
||||
</Compile>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\AccordionSamplesList.xml" >
|
||||
<Link>AccordionSamplesList.xml</Link>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Accordion\GettingStarted\View\GettingStarted.xaml">
|
||||
<Link>Samples\Accordion\GettingStarted\View\GettingStarted.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,57 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SampleBrowser.Maui.Accordion.SfAccordion
|
||||
{
|
||||
public class EmployeeInfo
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
public EmployeeInfo(string name, string image, string position, string organizationunit, string dateofbirth, string location, string phone, bool isexpanded, string description)
|
||||
{
|
||||
Name = name;
|
||||
Image = image;
|
||||
Position = position;
|
||||
OrganizationUnit = organizationunit;
|
||||
DateOfBirth = dateofbirth;
|
||||
Location = location;
|
||||
Phone = phone;
|
||||
IsExpanded = isexpanded;
|
||||
Description = description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Image { get; set; }
|
||||
|
||||
public string Position { get; set; }
|
||||
|
||||
public string OrganizationUnit { get; set; }
|
||||
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
public string Location { get; set; }
|
||||
|
||||
public string Phone { get; set; }
|
||||
|
||||
public bool IsExpanded { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Accordion.SfAccordion"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SampleBrowser.Maui.Accordion.SfAccordion.GettingStarted"
|
||||
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Accordion;assembly=Syncfusion.Maui.Expander"
|
||||
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui">
|
||||
<localCore:SampleView.Resources>
|
||||
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
|
||||
</localCore:SampleView.Resources>
|
||||
<localCore:SampleView.BindingContext>
|
||||
<local:EmployeeDetails />
|
||||
</localCore:SampleView.BindingContext>
|
||||
<localCore:SampleView.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="-4,-4,-6,-6"/>
|
||||
<On Platform="WinUI" Value="-4,-4,-6,-6"/>
|
||||
</OnPlatform>
|
||||
</localCore:SampleView.Margin>
|
||||
<localCore:SampleView.Content>
|
||||
<Grid ColumnDefinitions="0.4*, 0.6*">
|
||||
<Grid IsClippedToBounds="True" IsVisible="{OnPlatform MacCatalyst=True, WinUI=True, Default=False}"
|
||||
RowDefinitions="0.3*,100,50,*">
|
||||
<Image Source="{imageExtension:SfImageResource registrationform.png}" Aspect="AspectFill" Grid.RowSpan="4"/>
|
||||
<Label Text="Meet our Stellar Team" LineBreakMode="WordWrap" HorizontalOptions="Start"
|
||||
FontSize="30" WidthRequest="230" FontAttributes="Bold" TextColor="White" Grid.Row="1" Margin="50,0,0,0"/>
|
||||
<Label Text="A Look at Our Employee List!" HorizontalOptions="Start" FontSize="16" WidthRequest="240" TextColor="White"
|
||||
Grid.Row="2" Margin="50,0,0,0"/>
|
||||
</Grid>
|
||||
<syncfusion:SfAccordion x:Name="accordion" BindableLayout.ItemsSource="{Binding Employees}" ExpandMode="SingleOrNone"
|
||||
VerticalOptions="{OnPlatform Default=Fill}"
|
||||
IsClippedToBounds="True"
|
||||
Grid.ColumnSpan="{OnPlatform Default=2, MacCatalyst=1,WinUI=1}"
|
||||
Grid.Column="{OnPlatform Default=0, MacCatalyst=1,WinUI=1}"
|
||||
HorizontalOptions="Fill">
|
||||
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<syncfusion:AccordionItem IsExpanded="{Binding IsExpanded}">
|
||||
<syncfusion:AccordionItem.Header>
|
||||
<Grid HeightRequest="48">
|
||||
<Label Text="{Binding Name}" Margin="16,14,0,14" CharacterSpacing="0.25" FontFamily="Roboto-Regular" FontSize="14" />
|
||||
</Grid>
|
||||
</syncfusion:AccordionItem.Header>
|
||||
<syncfusion:AccordionItem.Content>
|
||||
<Grid ColumnSpacing="10" RowSpacing="2" BackgroundColor="{AppThemeBinding Light=#F4F4F4, Dark=#14E6E1E5}">
|
||||
<Grid Margin="16,8,0,0">
|
||||
<Grid.RowDefinitions >
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="{OnPlatform Default=90,Android=90,WinUI=70, iOS=100,MacCatalyst=70 }"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Frame Grid.RowSpan="4" Grid.Row="0" Grid.Column="0" HasShadow="False" Padding="0" Margin="0,0,12,7" BackgroundColor="{StaticResource White}">
|
||||
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
|
||||
</Frame>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Position" Grid.Column="1" Grid.Row="0" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding Position}" Grid.Row="0" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Organization " Grid.Row="1" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding OrganizationUnit}" Grid.Row="1" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Date Of Birth " Grid.Row="2" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding DateOfBirth}" Grid.Row="2" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Location " Grid.Row="3" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
|
||||
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding Location}" Grid.Row="3" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
|
||||
|
||||
<Label Padding="0,5,0,12" Grid.Row="4" Grid.ColumnSpan="3" LineBreakMode="WordWrap"
|
||||
FontSize="14" CharacterSpacing="0.25" VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
|
||||
Text="{Binding Description}">
|
||||
</Label>
|
||||
|
||||
<StackLayout Grid.Row="5" Orientation="Horizontal" Margin="0,0,0,12" Grid.ColumnSpan="3">
|
||||
<Label Text="" FontSize="16" Margin="0,2,2,2"
|
||||
FontFamily="MauiSampleFontIcon" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
|
||||
VerticalOptions="Center" VerticalTextAlignment="Center"/>
|
||||
<Label Text="{Binding Phone}" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" VerticalOptions="Center" CharacterSpacing="0.25" FontSize="14"/>
|
||||
</StackLayout>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</syncfusion:AccordionItem.Content>
|
||||
</syncfusion:AccordionItem>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</syncfusion:SfAccordion>
|
||||
</Grid>
|
||||
</localCore:SampleView.Content>
|
||||
</localCore:SampleView>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Accordion;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Microsoft.Maui.ApplicationModel.Permissions;
|
||||
using System.Xml.Linq;
|
||||
|
||||
|
||||
namespace SampleBrowser.Maui.Accordion.SfAccordion
|
||||
{
|
||||
public partial class GettingStarted : SampleView
|
||||
{
|
||||
public GettingStarted()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2024.
|
||||
// Copyright Syncfusion Inc. 2001-2024. 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.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SampleBrowser.Maui.Accordion.SfAccordion
|
||||
{
|
||||
public class EmployeeDetails
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private ObservableCollection<EmployeeInfo>? _employee;
|
||||
|
||||
string[] Description = new string[]
|
||||
{
|
||||
"Robin Rane, Chairman of ABC Inc., leads with dedication and vision.Under his guidance, the company thrives and continues to make a significant impact in the industry.",
|
||||
"Paul Vent, General Manager of XYZ Corp., oversees daily operations, ensuring the company's success and growth through strategic planning and effective management practices.",
|
||||
"Clara Venus, Asst. Manager at ABC Inc., efficiently handles multiple tasks. With her strong skill set and dedication, she contributes significantly to the company's growth and success.",
|
||||
"Maria Even, a highly experienced professional, holds the position of Executive Manager at XYZ Corp. She oversees crucial operations, enforcing company policies and practices.",
|
||||
"Mark Zuen, Senior Executive at ABC Inc., skillfully manages business operations. He is adept at leadership and strategic thinking.",
|
||||
"Eric John, Technical Manager at ABC Inc., expertly leads his team to develop innovative solutions, creating value for the company",
|
||||
"Chris Marker serves as the Senior Accountant at XYZ Corp. With extensive experience, he skillfully manages the company's financial matters, ensuring accuracy and compliance.",
|
||||
"Seria Stein, an Account Executive at ABC Inc., adeptly manages client portfolios, ensuring their satisfaction. She is a great communicator, skilled in building relationships.",
|
||||
"Angelina Justin, HR Manager at XYZ Corp., expertly handles workplace dynamics with her exceptional communication and problem-solving skills, fostering a positive work environment"
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
public EmployeeDetails()
|
||||
{
|
||||
Employees = new ObservableCollection<EmployeeInfo>();
|
||||
Employees.Add(new EmployeeInfo("Robin Rane", "emp_01.png", ": Chairman", ": ABC Inc.", ": 09/17/1973", ": Boston", "(617) 555-1234", false, Description[0]));
|
||||
Employees.Add(new EmployeeInfo("Paul Vent", "emp_02.png", ": General Manager", ": XYZ Corp.", ": 05/27/1985", ": New York", "(212) 555-1234", true, Description[1]));
|
||||
Employees.Add(new EmployeeInfo("Clara Venus", "emp_03.png", ": Assistant Manager", ": ABC Inc.", ": 07/22/1988", ": California", "(415) 123-4567", false, Description[2]));
|
||||
Employees.Add(new EmployeeInfo("Maria Even", "emp_04.png", ": Executive Manager", ": XYZ Corp.", ": 04/16/1970", ": New York", "(516) 345-6789", false, Description[3]));
|
||||
Employees.Add(new EmployeeInfo("Mark Zuen", "emp_05.png", ": Senior Executive", ": ABC Inc.", ": 09/11/1983", ": Boston", "(617) 123-4567", false, Description[4]));
|
||||
Employees.Add(new EmployeeInfo("Eric John", "emp_06.png", ": Technical Manager", ": ABC Inc.", ": 12/09/1985", ": New Jersey", "(201) 555-1234", false, Description[5]));
|
||||
Employees.Add(new EmployeeInfo("Chris Marker", "emp_07.png", ": Senior Accountant", ": XYZ Corp.", ": 03/14/1986", ": California", "(714) 555-5678", false, Description[6]));
|
||||
Employees.Add(new EmployeeInfo("Seria Stein", "emp_08.png", ": Account Executive", ": XYZ Corp.", ": 02/07/1985", ": New York", "(646) 987-6543", false, Description[7]));
|
||||
Employees.Add(new EmployeeInfo("Angelina Justin", "emp_09.png", ": HR Manager", ": XYZ Corp.", ": 07/11/1972", ": Boston", "(617) 987-6543", false, Description[8]));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public ObservableCollection<EmployeeInfo>? Employees
|
||||
{
|
||||
get { return _employee; }
|
||||
set { _employee = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -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>
|