This project has moved and is read-only. For the latest updates, please go here.

RibbonUIAdapter (and ExtensionSites in general)

Jan 1, 2008 at 11:56 PM
Edited Jan 2, 2008 at 12:43 AM
Does anyone who uses the RibbonControl in CAB use the RibbonUIAdapter class?

I can't see how it's useful, given that once the RibbonControl private variable is set, it can never be used (unless you use the InternalCollection property which was also never used).

It's looking like trash-can material.

I actually came to realise that to a large extent, I don't really use ExtensionSites much (ie classes in the UIElements namespace).

Mainly because the different modules we use on our project have fairly different interfaces, so there's not much need for different modules to access a single UIElement. Different modules usually use different SmartParts.

Therefore, I only use ExtensionSites for the MainMenu, and the main NavBar (Outlook Style).
And even if I did need to use a RibbonControl on my project, I wouldn't use it as an ExtensionSite (and so I wouldn't need any of these Adapters we've created) because my module would be the only module needing it.

... on Extension Sites...
I am struggling to understand what UIExtensionSites are giving us: they make it difficult to access core functionality of our ToolStrips etc. without giving us proper decoupling
Jan 2, 2008 at 4:58 AM
I am not using the RibbonUIAdapter class either; I am, however, using many of the other ExtensionSites. I have been reading Rich Newman's CAB intro and have also wondered what he is using instead of UIElements.

In my ShellApp tool I have abstracted the creation of UI controls and keep my own internal list. This internal list allows me to get a reference to the BarItem associated with a command. I can make changes to the BarItem whenever it is required. Making changes to the Ribbon itself or the BarManager is an issue that I have yet to face. I believe that I am getting the decoupling without sacrificing the core functionality of the Ribbon or menu/toolbars. I'm not done yet so I may still hit that wall :-) (In fact I have just scratched the surface)

I have an advantage at the day job in that we don’t have anything written in C# as of yet; there are no legacy modules that will hinder us from creating a unified UI.

If the RibbonUIAdapter is not useful (and no one chimes in saying that they are using it) then I think you can trash it.