Skip to content

Commit 75544f9

Browse files
authored
Merge pull request #2562 from syncfusion-content/ToolbarImprovements
902724 - Feedback addressing for updated toolbar UG documentation
2 parents 2c5db04 + 95cfc46 commit 75544f9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

MAUI/PDF-Viewer/Toolbar.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.
1414

1515
## Toolbars structure
1616

17-
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) features a built-in toolbar that utilizes multiple or multilevel toolbars. This design ensures that the user interface remains clean and accessible. We have incorporated approximately 40 toolbars to ensure comprehensive functionality across various platforms. These toolbars are strategically organized based on the available screen space, adapting to different screen sizes on both mobile and desktop platforms. This approach ensures that tools are easily accessible, preventing the interface from becoming cluttered.
17+
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) features a built-in toolbar that utilizes multiple or multilevel toolbars. This design ensures that the user interface remains clean and accessible. We have incorporated multiple toolbars, such as top, bottom, and sub-toolbars for editing and choosing types, to ensure comprehensive functionality across various platforms. These toolbars are strategically organized based on the available screen space, adapting to different screen sizes on both mobile and desktop platforms. This approach ensures that tools are easily accessible, preventing the interface from becoming cluttered.
1818

1919
### Need for using multiple toolbars
2020

@@ -915,13 +915,13 @@ To remove an item from all toolbars, iterate through the toolbar collection and
915915
// Iterate through the toolbar collection of the PDF Viewer
916916
for (int i = 0; i < pdfViewer?.Toolbars.Count; i++)
917917
{
918-
// Get the toolbar item with the name "Sticky note" from the current toolbar
919-
var item = pdfViewer.Toolbars[i]?.Items?.GetByName("Sticky note");
920-
if (item != null)
921-
{
922-
// Remove the "Sticky note" item
923-
pdfViewer.Toolbars[i].Items.Remove(item);
924-
}
918+
// Get the toolbar item with the name "Sticky note" from the current toolbar
919+
var item = pdfViewer.Toolbars[i]?.Items?.GetByName("Sticky note");
920+
if (item != null)
921+
{
922+
// Remove the "Sticky note" item
923+
pdfViewer.Toolbars[i].Items.Remove(item);
924+
}
925925
}
926926
{% endhighlight %}
927927
{% endtabs %}
@@ -934,7 +934,7 @@ If you need to hide specific items in the [SfPdfViewer](https://help.syncfusion.
934934

935935
##### Hide Item by Index
936936

937-
To hide a toolbar item by its index, you can directly access the item in the toolbar's Items collection using the index and then set its IsVisible property to false. Here’s how you can do it:
937+
To hide a toolbar item by its index, you can directly access the item in the toolbar's Items collection using the index and then set its [IsVisible](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ToolbarItem.html#Syncfusion_Maui_PdfViewer_ToolbarItem_IsVisible) property to false. Here’s how you can do it:
938938

939939
{% tabs %}
940940
{% highlight C# %}
@@ -953,7 +953,7 @@ if (toolbar != null && indexToHide >= 0 && indexToHide < toolbar.Items.Count)
953953

954954
##### Hide item by name
955955

956-
By using the [GetByName](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ToolbarItemCollection.html#Syncfusion_Maui_PdfViewer_ToolbarItemCollection_GetByName_System_String) method with its specified toolbar names, you can access the items of those toolbars. After accessing the item, you can modify its visibility by setting the `IsVisible` property. Here, we retrieve the toolbar "PrimaryToolbar" and "Search" item using the GetByName method and hide the "Search" item by setting its visibility to false.
956+
By using the [GetByName](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ToolbarItemCollection.html#Syncfusion_Maui_PdfViewer_ToolbarItemCollection_GetByName_System_String) method with its specified toolbar names, you can access the items of those toolbars. After accessing the item, you can modify its visibility by setting the [IsVisible]https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ToolbarItem.html#Syncfusion_Maui_PdfViewer_ToolbarItem_IsVisible property. Here, we retrieve the toolbar "PrimaryToolbar" and "Search" item using the GetByName method and hide the "Search" item by setting its visibility to false.
957957

958958
{% tabs %}
959959
{% highlight C# %}
@@ -969,7 +969,7 @@ item.IsVisible = false; // Hide the search item
969969

970970
#### Hide item in all toolbars
971971

972-
In [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html),each toolbar operates independently. Hiding an item in one toolbar does not affect others. For example, changing the visibility of the signature icon in the "AnnotationsToolbar" does not impact other toolbars.
972+
In [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html), each toolbar operates independently. Hiding an item in one toolbar does not affect others. For example, changing the visibility of the signature icon in the "AnnotationsToolbar" does not impact other toolbars.You can identify an item present in multiple toolbars by referring to the availability toolbar column in the toolbar item availability topic under the table of [Mobile toolbar item names](https://help.syncfusion.com/maui/pdf-viewer/toolbar#mobile-toolbar-item-names) and [Desktop toolbar item names](https://help.syncfusion.com/maui/pdf-viewer/toolbar#desktop-toolbar-item-names).
973973

974974
To hide an icon from all toolbars, iterate through the toolbar collection and adjust the visibility of the item in each toolbar. Here’s how to hide the "Signature" icon from all toolbars:
975975

0 commit comments

Comments
 (0)