File Manager Toolbar Item Issues
Hi,
The screenshot below is the current state of my file manager. Please disregard the lack of options in the toolbar as I made it so to only have a single toolbar item which is the Add Markup command.


Attachment: FileManager_70d8506c.zip
I am currently working on customizing the toolbar items for the File Manager component version 19.1.0.58. But it doesn't seem to work on my end. Here's an example.
The screenshot below is the current state of my file manager. Please disregard the lack of options in the toolbar as I made it so to only have a single toolbar item which is the Add Markup command.
To add to this, as I was unable to capture it in a screenshot, when hovering over the AddMarkup toolbar item, the tooltip text says "TooltipAddMarkup". Obviously I wanted to update both the toolbar item text as well as the toolbar item tooltip text. So, I went ahead and added this event callback for the ToolbarCreated event. (I will be attaching a copy of the code that I have used as well)
These properties that I have set did not translate to the file manager toolbar. After writing the above code, I'm still seeing the same screen as the first screenshot.
Is there another way of doing this? I have checked your forums, and you have this one sample but it's from an older version. I think it was from version 18 back when you're still using the single Syncfusion.Blazor library for all your components.
Please advise.
Best regards,
Attachment: FileManager_70d8506c.zip
SIGN IN To post a reply.
1 Reply
1 reply marked as answer
IL
Indhumathy Loganathan
Syncfusion Team
May 13, 2021 04:13 PM UTC
Hi Denzel,
Greetings from Syncfusion support.
We have validated your requirement in File Manager component. You can set the TooltipText for a Toolbar item using localization. Please follow the below steps to add localization in your sample.
Step1: Register Syncfusion locale service and include the below service in Startup.cs file
|
// Register the Syncfusion locale service to customize the SyncfusionBlazor component locale culture
services.AddSingleton(typeof(ISyncfusionStringLocalizer), typeof(SyncfusionLocalizer)); |
Step 2: Create ~/Shared/SyncfusionLocalizer.cs file and implement ISyncfusionStringLocalizer to the class.
|
using Syncfusion.Blazor;
namespace BlazorApp1.Shared
{
public class SyncfusionLocalizer : ISyncfusionStringLocalizer
{
// To get the locale key from mapped resources file
public string GetText(string key)
{
return this.ResourceManager.GetString(key);
}
// To access the resource file and get the exact value for locale key
public System.Resources.ResourceManager ResourceManager
{
get
{
return BlazorApp1.Resources.SfResources.ResourceManager;
}
}
}
} |
Step 3: Add the resource files in the ~/Resources folder. The locale resource files for different cultures are available in this GitHub repository. You can get any culture resource file from here and utilize it in your application. In the sample, we have set English(en-US) culture.
Step 4: Finally set the TooltipText as custom Toolbar item text in the locale file.
|
FileManager_TooltipAddMarkup |
AddMarkup |
You can find the sample demonstrating the solution from below link.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorFileManagerLocale2117751982
Please let us know if you need any further assistance.
Regards,
Indhumathy L
Marked as answer
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
- Marked answer
-
RS Roy Sunga
- May 12, 2021 09:24 PM UTC
- May 13, 2021 04:13 PM UTC