I presently work on an application that features an Office 2007 Ribbon lookalike 3rd-party library. The application uses an extensive plugin framework and access control rules to build its ribbon tabs and controls at application startup. Unfortunately, that ribbon library has a couple of issues that I can do without, so I have thought of replacing it with Windows Ribbon Framework (WRF).
WRF has a different philosophy behind it though, where the entire ribbon structure is specified in XAML. What I haven't been able to figure out, is how one would go about adding tabs based on a plugin. Here are a couple of ideas I came up with, most of which don't seem doable with that framework:
- Add a tab containing new commands from my plugin. Doesn't seem doable.
- Add XAML that contains the new commands from my plugin and merge it with the existing XAML. Doesn't seem doable.
- Generate the entire UI's XAML after my plugins are loaded and my commands are available. This seems doable and not too different from our present strategy of defining ribbon controls directly, but could that really be the only way?
Are there any options that I have missed?
Quite an old question but I'll pick it up anyway as there is no answer yet.
You should be able to accomplish this scenario using "Application Modes". This is a features in the framework that allows you to hide/show certain elements of the ribbon bar - including whole tabs - at run time.
For more information on the concept and its capabilities, please refer to the following page: https://msdn.microsoft.com/en-us/library/windows/desktop/dd940486%28v=vs.85%29.aspx