c# - VSTO Excel preserve Ribbon state -
i have simple vsto excel 2013 application level add-in custom ribbon, includes toggle button , checkbox. if open 2 files (workbooks) can see ribbons not preserve state across multiple windows, meaning if click on checkbox or toggle button on second workbook same checkbox state shown on first workbook , vise versa. found article describes similar situation outlook : https://www.add-in-express.com/creating-addins-blog/2013/01/30/preserve-outlook-ribbon-controls-state/ unfortunately inspector window event not available in excel. idea on how deal it?
you need use callbacks instead of attributes in ribbon xml. when user changes active window need call invalidate/invalidatecontrol method of iribbonui interface force office applications (excel in case) call callbacks current state of controls. it's pretty easy...
you can read more ribbon ui (aka fluent ui) in following series of articles in msdn:
- customizing 2007 office fluent ribbon developers (part 1 of 3)
- customizing 2007 office fluent ribbon developers (part 2 of 3)
- customizing 2007 office fluent ribbon developers (part 3 of 3)
also may find following ones helpful:
Comments
Post a Comment