diff --git a/Styles/StylingToolbarItem/App.xaml b/Styles/StylingToolbarItem/App.xaml
new file mode 100644
index 0000000..3dbfe95
--- /dev/null
+++ b/Styles/StylingToolbarItem/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/App.xaml.cs b/Styles/StylingToolbarItem/App.xaml.cs
new file mode 100644
index 0000000..08e68a2
--- /dev/null
+++ b/Styles/StylingToolbarItem/App.xaml.cs
@@ -0,0 +1,16 @@
+namespace StylingToolbarItem
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Add Valid License");
+ InitializeComponent();
+ }
+
+ protected override Window CreateWindow(IActivationState? activationState)
+ {
+ return new Window(new AppShell());
+ }
+ }
+}
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/AppShell.xaml b/Styles/StylingToolbarItem/AppShell.xaml
new file mode 100644
index 0000000..6eed03b
--- /dev/null
+++ b/Styles/StylingToolbarItem/AppShell.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/AppShell.xaml.cs b/Styles/StylingToolbarItem/AppShell.xaml.cs
new file mode 100644
index 0000000..75fa1c4
--- /dev/null
+++ b/Styles/StylingToolbarItem/AppShell.xaml.cs
@@ -0,0 +1,10 @@
+namespace StylingToolbarItem
+{
+ public partial class AppShell : Shell
+ {
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/Assets/PDF_Succinctly.pdf b/Styles/StylingToolbarItem/Assets/PDF_Succinctly.pdf
new file mode 100644
index 0000000..1675f55
Binary files /dev/null and b/Styles/StylingToolbarItem/Assets/PDF_Succinctly.pdf differ
diff --git a/Styles/StylingToolbarItem/MainPage.xaml b/Styles/StylingToolbarItem/MainPage.xaml
new file mode 100644
index 0000000..3d1468a
--- /dev/null
+++ b/Styles/StylingToolbarItem/MainPage.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/MainPage.xaml.cs b/Styles/StylingToolbarItem/MainPage.xaml.cs
new file mode 100644
index 0000000..7906644
--- /dev/null
+++ b/Styles/StylingToolbarItem/MainPage.xaml.cs
@@ -0,0 +1,42 @@
+using Syncfusion.Maui.Themes;
+using System.Reflection;
+
+namespace StylingToolbarItem
+{
+ public partial class MainPage : ContentPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private async void GotoPdfViewerPage(object sender, EventArgs e)
+ {
+ await Navigation.PushAsync(new PDFViewerPage());
+ }
+ private void OnThemeChangeButtonClicked(object sender, EventArgs e)
+ {
+ if (Application.Current != null)
+ {
+ ICollection mergedDictionaries = Application.Current.Resources.MergedDictionaries;
+ if (mergedDictionaries != null)
+ {
+ var theme = mergedDictionaries.OfType().FirstOrDefault();
+ if (theme != null)
+ {
+ if (theme.VisualTheme == SfVisuals.MaterialLight)
+ {
+ theme.VisualTheme = SfVisuals.MaterialDark;
+ Application.Current.UserAppTheme = AppTheme.Dark;
+ }
+ else
+ {
+ theme.VisualTheme = SfVisuals.MaterialLight;
+ Application.Current.UserAppTheme = AppTheme.Light;
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/MauiProgram.cs b/Styles/StylingToolbarItem/MauiProgram.cs
new file mode 100644
index 0000000..1c63bfb
--- /dev/null
+++ b/Styles/StylingToolbarItem/MauiProgram.cs
@@ -0,0 +1,27 @@
+using Microsoft.Extensions.Logging;
+using Syncfusion.Maui.Core.Hosting;
+
+namespace StylingToolbarItem
+{
+ public static class MauiProgram
+ {
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureSyncfusionCore()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+#if DEBUG
+ builder.Logging.AddDebug();
+#endif
+
+ return builder.Build();
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Android/AndroidManifest.xml b/Styles/StylingToolbarItem/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 0000000..e9937ad
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Platforms/Android/MainActivity.cs b/Styles/StylingToolbarItem/Platforms/Android/MainActivity.cs
new file mode 100644
index 0000000..821685b
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Android/MainActivity.cs
@@ -0,0 +1,11 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+
+namespace StylingToolbarItem
+{
+ [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
+ public class MainActivity : MauiAppCompatActivity
+ {
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Android/MainApplication.cs b/Styles/StylingToolbarItem/Platforms/Android/MainApplication.cs
new file mode 100644
index 0000000..f6636eb
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Android/MainApplication.cs
@@ -0,0 +1,16 @@
+using Android.App;
+using Android.Runtime;
+
+namespace StylingToolbarItem
+{
+ [Application]
+ public class MainApplication : MauiApplication
+ {
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Android/Resources/values/colors.xml b/Styles/StylingToolbarItem/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 0000000..c04d749
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #2B0B98
+ #2B0B98
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Platforms/MacCatalyst/AppDelegate.cs b/Styles/StylingToolbarItem/Platforms/MacCatalyst/AppDelegate.cs
new file mode 100644
index 0000000..afe305d
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/MacCatalyst/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace StylingToolbarItem
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/MacCatalyst/Info.plist b/Styles/StylingToolbarItem/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 0000000..7268977
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Styles/StylingToolbarItem/Platforms/MacCatalyst/Program.cs b/Styles/StylingToolbarItem/Platforms/MacCatalyst/Program.cs
new file mode 100644
index 0000000..7a2d6af
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/MacCatalyst/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace StylingToolbarItem
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Tizen/Main.cs b/Styles/StylingToolbarItem/Platforms/Tizen/Main.cs
new file mode 100644
index 0000000..19e24a3
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Tizen/Main.cs
@@ -0,0 +1,17 @@
+using System;
+using Microsoft.Maui;
+using Microsoft.Maui.Hosting;
+
+namespace StylingToolbarItem
+{
+ internal class Program : MauiApplication
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Tizen/tizen-manifest.xml b/Styles/StylingToolbarItem/Platforms/Tizen/tizen-manifest.xml
new file mode 100644
index 0000000..6cfd990
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Tizen/tizen-manifest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ maui-appicon-placeholder
+
+
+
+
+ http://tizen.org/privilege/internet
+
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Platforms/Windows/App.xaml b/Styles/StylingToolbarItem/Platforms/Windows/App.xaml
new file mode 100644
index 0000000..bf96d9b
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Windows/App.xaml
@@ -0,0 +1,8 @@
+
+
+
diff --git a/Styles/StylingToolbarItem/Platforms/Windows/App.xaml.cs b/Styles/StylingToolbarItem/Platforms/Windows/App.xaml.cs
new file mode 100644
index 0000000..72f1425
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Windows/App.xaml.cs
@@ -0,0 +1,25 @@
+using Microsoft.UI.Xaml;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace StylingToolbarItem.WinUI
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : MauiWinUIApplication
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+
+}
diff --git a/Styles/StylingToolbarItem/Platforms/Windows/Package.appxmanifest b/Styles/StylingToolbarItem/Platforms/Windows/Package.appxmanifest
new file mode 100644
index 0000000..276560b
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Windows/Package.appxmanifest
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $placeholder$
+ User Name
+ $placeholder$.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/Platforms/Windows/app.manifest b/Styles/StylingToolbarItem/Platforms/Windows/app.manifest
new file mode 100644
index 0000000..0f74f21
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/Windows/app.manifest
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/Styles/StylingToolbarItem/Platforms/iOS/AppDelegate.cs b/Styles/StylingToolbarItem/Platforms/iOS/AppDelegate.cs
new file mode 100644
index 0000000..afe305d
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/iOS/AppDelegate.cs
@@ -0,0 +1,10 @@
+using Foundation;
+
+namespace StylingToolbarItem
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : MauiUIApplicationDelegate
+ {
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/iOS/Info.plist b/Styles/StylingToolbarItem/Platforms/iOS/Info.plist
new file mode 100644
index 0000000..0004a4f
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/iOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ LSRequiresIPhoneOS
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/appicon.appiconset
+
+
diff --git a/Styles/StylingToolbarItem/Platforms/iOS/Program.cs b/Styles/StylingToolbarItem/Platforms/iOS/Program.cs
new file mode 100644
index 0000000..7a2d6af
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/iOS/Program.cs
@@ -0,0 +1,16 @@
+using ObjCRuntime;
+using UIKit;
+
+namespace StylingToolbarItem
+{
+ public class Program
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+ }
+}
diff --git a/Styles/StylingToolbarItem/Platforms/iOS/Resources/PrivacyInfo.xcprivacy b/Styles/StylingToolbarItem/Platforms/iOS/Resources/PrivacyInfo.xcprivacy
new file mode 100644
index 0000000..24ab3b4
--- /dev/null
+++ b/Styles/StylingToolbarItem/Platforms/iOS/Resources/PrivacyInfo.xcprivacy
@@ -0,0 +1,51 @@
+
+
+
+
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryFileTimestamp
+ NSPrivacyAccessedAPITypeReasons
+
+ C617.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategorySystemBootTime
+ NSPrivacyAccessedAPITypeReasons
+
+ 35F9.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryDiskSpace
+ NSPrivacyAccessedAPITypeReasons
+
+ E174.1
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/Properties/launchSettings.json b/Styles/StylingToolbarItem/Properties/launchSettings.json
new file mode 100644
index 0000000..4f85793
--- /dev/null
+++ b/Styles/StylingToolbarItem/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "Project",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/README.md b/Styles/StylingToolbarItem/README.md
new file mode 100644
index 0000000..7df420e
--- /dev/null
+++ b/Styles/StylingToolbarItem/README.md
@@ -0,0 +1,212 @@
+# How to match the semantics of custom toolbar item with that of default one in .NET MAUI PDF Viewer?
+
+This project demonstrate how to match the semantics of custom toolbar item with that of already existing toolbar item in the toolbar in [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html).
+
+## Prerequisites
+
+1. A .NET MAUI project set up.
+2. The [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) package.
+
+## Steps
+
+### 1. Install Required NuGet Package
+
+Create a new [MAUI App](https://dotnet.microsoft.com/en-us/learn/maui/first-app-tutorial/create) and install the [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) package using either.
+
+* NuGet Package Manager
+* NuGet CLI
+
+### 2. Add the Syncfusion.Maui.Themes namespace in `App.xaml`
+
+This namespace enables access to the [SyncfusionThemeResourceDictionary](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Themes.SyncfusionThemeDictionary.html).
+
+**XAML:**
+
+```xaml
+ xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
+```
+
+### 3. Merge the `SyncfusionThemeResourceDictionary` to the Application Resource.
+
+To apply themes to your application, merge the [SyncfusionThemeResourceDictionary](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Themes.SyncfusionThemeDictionary.html) item to the application resource.
+
+**XAML:**
+
+```xaml
+
+
+
+
+
+
+
+
+
+```
+
+### 4. Create a new folder and add a `ContentPage` (PdfViewerPage) under the created folder
+
+Create a ContentPage which serves as a destination page of the Navigation.
+
+### 5. Create two button in the `MainPage.Xaml`
+
+Create two buttons.
+
+**XAML:**
+
+```xaml
+
+
+
+
+
+
+
+
+```
+
+### 6. Create clicked event handlers
+
+#### a. Event Handler for Theme Change Button
+
+In this event handler, you can set the theme change code as below using the merged [SyncfusionThemeResourceDictionary](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Themes.SyncfusionThemeDictionary.html).
+
+**C#**
+
+```csharp
+ private void OnThemeChangeButtonClicked(object sender, EventArgs e)
+ {
+ if (Application.Current != null)
+ {
+ ICollection mergedDictionaries = Application.Current.Resources.MergedDictionaries;
+ if (mergedDictionaries != null)
+ {
+ var theme = mergedDictionaries.OfType().FirstOrDefault();
+ if (theme != null)
+ {
+ if (theme.VisualTheme == SfVisuals.MaterialLight)
+ {
+ theme.VisualTheme = SfVisuals.MaterialDark;
+ Application.Current.UserAppTheme = AppTheme.Dark;
+ }
+ else
+ {
+ theme.VisualTheme = SfVisuals.MaterialLight;
+ Application.Current.UserAppTheme = AppTheme.Light;
+ }
+ }
+ }
+ }
+ }
+```
+
+#### b. Event Handler for the Navigation button.
+
+In this event handler, you can set the code `PDfViewerPage` navigation using the [Navigation.PushAsync](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.navigationpage.pushasync?view=net-maui-9.0) method.
+
+**C#:**
+
+```csharp
+ private async void GotoPdfViewerPage(object sender, EventArgs e)
+ {
+ await Navigation.PushAsync(new PDFViewerPage());
+ }
+```
+
+### 7. Wire the clicked event handlers for the respective buttons
+
+**XAML:**
+
+```xaml
+
+
+
+
+
+
+
+
+```
+
+### 8. Initialize and Configure the PDF Viewer
+
+Start by adding the Syncfusion PDF Viewer control to your XAML file.
+
+#### a. Add the Syncfusion.Maui.PdfViewer namespace in `PdfViewerPage.xaml`
+
+This namespace enables access to the PDF Viewer control.
+
+**XAML:**
+
+```xaml
+ xmlns:syncfusion="clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer"
+```
+
+#### b. Add the PDF Viewer to your layout
+
+**XAML:**
+
+```xaml
+
+
+
+ ```
+
+#### c. Load the PDF in `PdfViewerPage.Xaml.cs`
+
+**C#:**
+
+```csharp
+ //Accessing the PDF document that is added as embedded resource as stream.
+ Stream? documentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("StylingToolbarItem.Assets.PDF_Succinctly.pdf");
+
+ // Assigning stream to "DocumentSource" property.
+ pdfViewer.DocumentSource = DocumentStream;
+```
+
+### 9. Matching semantics of the custom toolbar item with default toolbar item
+
+To match the text color of newly added toolbar item with that of default toolbar item in the toolbar, set the color of the [TextColor](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.button.textcolor?view=net-maui-9.0) for the button as that of the default toolbar item using the [SetAppThemeColor](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.bindableobjectextensions.setappthemecolor?view=net-maui-9.0) method. Refer to the below code example.
+
+**C#:**
+
+``` csharp
+ // Create new open button
+ fileOpenButton = new Button
+ {
+ Text = "\ue712", // Set button text
+ FontSize = 24, // Set button text font size
+ FontFamily = "MauiMaterialAssets", // Set button text font family
+ BackgroundColor = Colors.Transparent, // Set background for the button
+ BorderColor = Colors.Transparent, // Set border color for the button
+ CornerRadius = 5, // Set corner radius of the button
+ };
+
+ //Set color based on theme.
+ fileOpenButton.SetAppThemeColor(Button.TextColorProperty,
+ Color.FromArgb("#49454F"),
+ Color.FromArgb("#CAC4D0"));
+
+#if !WINDOWS && !MACCATALYST
+ // Inserting open file option button as toolbar item in the top toolbar for the mobile platform.
+ PdfViewer?.Toolbars?.GetByName("TopToolbar")?.Items?.Insert(0, new Syncfusion.Maui.PdfViewer.ToolbarItem(fileOpenButton, "OpenFile"));
+#else
+ // Inserting open file option button as toolbar item in the primary toolbar for the desktop platform.
+ PdfViewer?.Toolbars?.GetByName("PrimaryToolbar")?.Items?.Insert(0, new Syncfusion.Maui.PdfViewer.ToolbarItem(fileOpenButton, "OpenFile"));
+#endif
+```
+
+To set the tooltip to a newly added toolbar item like the default items in the toolbar, set the tooltip property for the newly added item. For more details about the tooltip, please refer Tooltips in .NET MAUI , refer to below code example.
+
+**C#:**
+
+``` csharp
+ // Set the tooltip text
+ ToolTipProperties.SetText(fileOpenButton, "OpenFile");
+```
+
+## Run the App
+
+1. Build and run the application on all platforms.
+2. Switch the theme and check the color and tooltip of the newly added item in the PdfViewer.
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Resources/AppIcon/appicon.svg b/Styles/StylingToolbarItem/Resources/AppIcon/appicon.svg
new file mode 100644
index 0000000..9d63b65
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/AppIcon/appicon.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Resources/AppIcon/appiconfg.svg b/Styles/StylingToolbarItem/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Regular.ttf b/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..33b3e0d
Binary files /dev/null and b/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Semibold.ttf b/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 0000000..a1f8571
Binary files /dev/null and b/Styles/StylingToolbarItem/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/Styles/StylingToolbarItem/Resources/Images/dotnet_bot.png b/Styles/StylingToolbarItem/Resources/Images/dotnet_bot.png
new file mode 100644
index 0000000..1d1b981
Binary files /dev/null and b/Styles/StylingToolbarItem/Resources/Images/dotnet_bot.png differ
diff --git a/Styles/StylingToolbarItem/Resources/Raw/AboutAssets.txt b/Styles/StylingToolbarItem/Resources/Raw/AboutAssets.txt
new file mode 100644
index 0000000..89dc758
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with your package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/Styles/StylingToolbarItem/Resources/Splash/splash.svg b/Styles/StylingToolbarItem/Resources/Splash/splash.svg
new file mode 100644
index 0000000..21dfb25
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/Splash/splash.svg
@@ -0,0 +1,8 @@
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Resources/Styles/Colors.xaml b/Styles/StylingToolbarItem/Resources/Styles/Colors.xaml
new file mode 100644
index 0000000..30307a5
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/Styles/Colors.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ #512BD4
+ #ac99ea
+ #242424
+ #DFD8F7
+ #9880e5
+ #2B0B98
+
+ White
+ Black
+ #D600AA
+ #190649
+ #1f1f1f
+
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/Resources/Styles/Styles.xaml b/Styles/StylingToolbarItem/Resources/Styles/Styles.xaml
new file mode 100644
index 0000000..86f574d
--- /dev/null
+++ b/Styles/StylingToolbarItem/Resources/Styles/Styles.xaml
@@ -0,0 +1,451 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Styles/StylingToolbarItem/StylingToolbarItem.csproj b/Styles/StylingToolbarItem/StylingToolbarItem.csproj
new file mode 100644
index 0000000..626ad11
--- /dev/null
+++ b/Styles/StylingToolbarItem/StylingToolbarItem.csproj
@@ -0,0 +1,82 @@
+
+
+
+ net9.0-android;net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041.0
+
+
+
+
+
+
+ Exe
+ StylingToolbarItem
+ true
+ true
+ enable
+ enable
+
+
+ StylingToolbarItem
+
+
+ com.companyname.stylingtoolbaritem
+
+
+ 1.0
+ 1
+
+
+ None
+
+ 15.0
+ 15.0
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
diff --git a/Styles/StylingToolbarItem/StylingToolbarItem.sln b/Styles/StylingToolbarItem/StylingToolbarItem.sln
new file mode 100644
index 0000000..cc71ebe
--- /dev/null
+++ b/Styles/StylingToolbarItem/StylingToolbarItem.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.14.36203.30
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StylingToolbarItem", "StylingToolbarItem.csproj", "{4DB5D278-F736-4B58-8FD8-70C87989D6F4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4DB5D278-F736-4B58-8FD8-70C87989D6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4DB5D278-F736-4B58-8FD8-70C87989D6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4DB5D278-F736-4B58-8FD8-70C87989D6F4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {4DB5D278-F736-4B58-8FD8-70C87989D6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4DB5D278-F736-4B58-8FD8-70C87989D6F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BDB833B1-E05A-451D-BBD9-D1693C62AC18}
+ EndGlobalSection
+EndGlobal
diff --git a/Styles/StylingToolbarItem/View/PDFViewerPage.xaml b/Styles/StylingToolbarItem/View/PDFViewerPage.xaml
new file mode 100644
index 0000000..2a93017
--- /dev/null
+++ b/Styles/StylingToolbarItem/View/PDFViewerPage.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Styles/StylingToolbarItem/View/PDFViewerPage.xaml.cs b/Styles/StylingToolbarItem/View/PDFViewerPage.xaml.cs
new file mode 100644
index 0000000..c2a9b1e
--- /dev/null
+++ b/Styles/StylingToolbarItem/View/PDFViewerPage.xaml.cs
@@ -0,0 +1,122 @@
+using System.Reflection;
+
+namespace StylingToolbarItem;
+
+public partial class PDFViewerPage : ContentPage
+{
+ Button? fileOpenButton;
+ public PDFViewerPage()
+ {
+ InitializeComponent();
+
+ //Accessing the PDF document that is added as embedded resource as stream.
+ Stream? documentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("StylingToolbarItem.Assets.PDF_Succinctly.pdf");
+
+ // Assigning stream to "DocumentSource" property.
+ PdfViewer.DocumentSource = documentStream;
+
+ // Calling "AddFileOperationsToolbarItems" for to add save and open options toolbar item in toolbar.
+ AddFileOperationsToolbarItem();
+
+ // Wiring "DocumentLoaded" event to enable the button.
+ PdfViewer.DocumentLoaded += PdfViewer_DocumentLoaded;
+ }
+
+ private void PdfViewer_DocumentLoaded(object? sender, EventArgs? e)
+ {
+ if (fileOpenButton != null)
+ {
+ // Enable the fileOpenButton to allow user interaction.
+ fileOpenButton.IsEnabled = true;
+ fileOpenButton.Opacity = 1; // Set the opacity of the button.
+ }
+ }
+
+ void AddFileOperationsToolbarItem()
+ {
+ // Create new open button.
+ fileOpenButton = new Button
+ {
+ Text = "\ue712", // Set button text.
+ FontSize = 24, // Set button text font size.
+ FontFamily = "MauiMaterialAssets", // Set button text font family.
+ BackgroundColor = Colors.Transparent, // Set background for the button.
+ BorderColor = Colors.Transparent, // Set border color for the button.
+ CornerRadius = 5, // Set corner radius of the button.
+ Opacity = 0.5, // Set opacity of the button.
+ IsEnabled = false, // Disable the button.
+ };
+
+ //Subscription of click event for the open file button.
+ fileOpenButton.Clicked += FileOpenButton_Clicked;
+
+ //Set color based on theme.
+ fileOpenButton.SetAppThemeColor(Button.TextColorProperty,
+ Color.FromArgb("#49454F"),
+ Color.FromArgb("#CAC4D0"));
+
+ // Set the tooltip text.
+ ToolTipProperties.SetText(fileOpenButton, "OpenFile");
+
+#if !WINDOWS && !MACCATALYST
+ // Inserting open file option button as toolbar item in the top toolbar for the mobile platform.
+ PdfViewer?.Toolbars?.GetByName("TopToolbar")?.Items?.Insert(0, new Syncfusion.Maui.PdfViewer.ToolbarItem(fileOpenButton, "OpenFile"));
+#else
+ // Inserting open file option button as toolbar item in the primary toolbar for the desktop platform.
+ PdfViewer?.Toolbars?.GetByName("PrimaryToolbar")?.Items?.Insert(0, new Syncfusion.Maui.PdfViewer.ToolbarItem(fileOpenButton, "OpenFile"));
+#endif
+ }
+
+ private void FileOpenButton_Clicked(object? sender, EventArgs e)
+ {
+ OpenDocument();
+ }
+
+ async void OpenDocument()
+ {
+ //Create file picker with file type as PDF.
+ FilePickerFileType pdfFileType = new FilePickerFileType(new Dictionary>{
+ { DevicePlatform.iOS, new[] { "public.pdf" } },
+ { DevicePlatform.Android, new[] { "application/pdf" } },
+ { DevicePlatform.WinUI, new[] { "pdf" } },
+ { DevicePlatform.MacCatalyst, new[] { "pdf" } },
+ });
+
+ //Provide picker title if required.
+ PickOptions options = new()
+ {
+ PickerTitle = "Please select a PDF file",
+ FileTypes = pdfFileType,
+ };
+ await PickAndShow(options);
+ }
+
+
+ ///
+ /// Picks the file from local storage and store as stream.
+ ///
+ public async Task PickAndShow(PickOptions options)
+ {
+ try
+ {
+ //Pick the file from local storage.
+ var result = await FilePicker.Default.PickAsync(options);
+ if (result != null)
+ {
+ //Store the resultant PDF as stream.
+ Stream documentStream = await result.OpenReadAsync();
+ PdfViewer.LoadDocument(documentStream);
+ }
+ }
+ catch (Exception ex)
+ {
+ //Display error when file picker failed to open files.
+ string message;
+ if (ex != null && string.IsNullOrEmpty(ex.Message) == false)
+ message = ex.Message;
+ else
+ message = "File open failed.";
+ Application.Current?.Windows[0]?.Page?.DisplayAlert("Error", message, "OK");
+ }
+ }
+}
\ No newline at end of file