Hello,
After investigation, it was not feasible to modify the ToolbarItem in the handler.
The reason is that when using the handler, the ToolbarItem is already in the created state, but according to the ToolbarItem Class document, any changes will be ignored after the ToolbarItem is created.
Any changes made to the properties of the toolbar item after it has been added will be ignored.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.