BaseExtensions can be used to show or hide elements in the ribbon (even though they are connected to other Alloy Plugins). Using this, we can filter events or hide buttons in ribbon if, for instance, a shape or a document property is not present. To filter events and show/hide buttons, the newest BaseExtensions and Alloy plugins are required.
Supported elements:
- Bookmark (Word): booksmarks
- Document properties (All): documentprop
- Shapes (Word and PowerPoint): shapes
- Styles (Word): styles
- Content controls (Word/PowerPoint): contentcontrol
Legacy syntax
The legacy syntax for showing or hiding elements in ribbon:
<Button label="xx" visible="insertElementHere-xx">
Here is an example:
This button cleverly detects if the document originated from Templafy by using the TemplafyTimeStamp property:
<Button label="Blah" visible="BaseExtensions:documentprop-TemplafyTimeStamp">
Comments
0 comments
Article is closed for comments.