We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Toolbar template name cannot be found

Hello to all,

I am glad that I recently became a member on this community.

By working on my own helper class to enable/disable toolbar icons on PDF Viewer toolbars, I found that the following page is not up to date:

https://help.syncfusion.com/wpf/pdf-viewer/how-to/disable-toolbar-items

For example, there is no toolbar template with name: PART_LabelTotalPageCount

Can someone let me know what is the real control name?


5 Replies 1 reply marked as answer

KG Krithika Ganesan Syncfusion Team February 14, 2023 05:04 PM UTC

Danijel,

 

The "PART_LabelTotalPageCount" name was wrongly as "PART_LableTotalPageCount" in wpf pdfviewer source and  in UG page there was no details about textmarkup annotation. We will update the UG page as soon as possible. As of now you can use the below button name to use them.

 

Toolbar item

Template name

Type

Page count tool

PART_LableTotalPageCount

System.Windows.Controls.TextBlock

Text markup tool

PART_TextMarkup

System.Windows.Controls.Primitives.ToggleButton

 

We will update the template name to “PART_LabelTotalPageCount” in any of the upcoming release and we update this as breaking change in the release note. After that you can change the template name in your project.


Attachment: SimpleSample_ac37adea.zip


DR Danijel Radenkovic replied to Krithika Ganesan February 14, 2023 10:19 PM UTC

Hello Krithika,

Thank you so much for your reply.
Finally, I have successfully retrieved TextBlock control by the template name that you provided.
Can you please check what is the name of the following "slash" label (or TextBlock)?
jkNwt8urR9.png
Regarding " PART_TextMarkup ", I figured it out by myself :).




KG Krithika Ganesan Syncfusion Team February 15, 2023 11:35 AM UTC

Danijel,


We will update the UG page as soon as possible. As of now you can use the below text block name to use the mentioned one. We have created a sample as per your requirement and attached below.


Toolbar item

Template name

Type

Page separator tool

PART_PageSeparator

System.Windows.Controls.TextBlock



Attachment: SimpleSample_d5404b17.zip

Marked as answer

DR Danijel Radenkovic February 15, 2023 11:34 PM UTC

Hello Krithika,

Thank you so much for providing correct control name.



KG Krithika Ganesan Syncfusion Team February 19, 2023 12:56 PM UTC

Most Welcome.


Loader.
Live Chat Icon For mobile
Up arrow icon