Log in

No account? Create an account

DevLynx.ShellApp Ribbon Galleries

A thread started by karelkral on the CodePlex Smart Client Guidance discussions prompted me to investigate galleries sooner rather than later. I assumed that I could add gallery support and, as a demo, a skin gallery in a weekend — au contraire.

When I started investigating ribbon galleries, I thought the implementation would be similar to the other UI extensions that I coded for the CAB DevExpress Extension Kit. However, the XtraBars ribbon galleries consist of three parts:
•    RibbonGalleryBarItem - container for the gallery.
•    GalleryItemGroup - named container for groups of gallery items.
•    GalleryItem - the actual clickable item within the gallery.

My first thought was that the clickable GalleryItem would be a descendent of BarItem. I could follow the same pattern as the RibbonApplicationMenu, RibbonPageHeader, and RibbonQuickAccessToolbarUIAdapter. But no, the BarItem descendant is the RibbonGalleryBarItem. The RibbonGalleryBarItem click event passes which GalleryItem was selected. My current pattern relies on each item being assigned a single CAB command which is called when the click event of that item is fired.

One option is to completely ignore the CAB UI Extension Sites and handle galleries with some special exception code in the DevLynx.ShellApp UxExtension service. This would be fairly simple but would not follow the CAB philosophy-something that I am loath to do.

Another option would be to bite the bullet and create CAB UI Extension Sites to handle the ribbon galleries-a more complex undertaking. I also feel some duty to provide galleries within the CAB DevExpress Extension Kit allowing their use without the DevLynx.ShellApp. This solution will also require some special code within the UxExtension service but it feels better to me.

The real trick is to hide all this implementation from the developer and ensure that the ribbon and menu/toolbar paradigms still work seamlessly. The developer will need to set the gallery name, the gallery group name, and some images and it should run - displaying in menus/toolbars or the ribbon depending on user choice. This is the challenge.

More to follow...




Hello, DevLynx. I see that your effort in developing CAB application is very great! So my...

I am very skeptical about UIExtensionSites and ribbon. Do you read this article from Rich Newman?
He wrote:
> ...I am very sceptical of the value of UIExtensionSites and we have decided not to
> use them in our current project.

Because I do not need to switch between Normal menu/Ribbon paradigm, I decided to write my own RibbonService. This service will be ignoring UIExtension sites and will allow modules to use ribbon specific features.

Do you realized that ribbon is no only commands and galleries? It can contain various controls as text boxes, combo boxes etc... I cannot imagine how to deal with this specific features with UIExtensionSites. IMO this is not possible.

And one note about ribbon/menu paradigm switching. This is nice feature at first look. But when you get into realization deeply, you find out that you must use the smaller feature set which is common between menu and ribbon. In my opinion this is too restrictive. I have decided to use ribbon only.

Re: Ribbon


Thank you for your kind comments on my efforts. I really appreciate the feedback. I think these issues deserve their own journal entry. If you don't mind my using your comment as a springboard to an entry I'll write it weekend.

First, I have read the excellent articles from Rich Newman. Those articles gave very clear explanations of the CAB and guided many of the steps that I took while writing my framework. However, I was curious why they chose not to use them (I'm the 'Mike' that posted comment 2 in the article you referenced). His answer just doesn't explain enough for me to abandon the feature at this point.

I also realize that the ribbon (and menu/toolbars) are much more than buttons and galleries. But here is where I tentatively disagree - I'm not yet ready to abandon the technique as impossible. I say tentatively because I don't know if it can be done.

DevLynx.ShellApp is an experiment in how far I can take this technology and create a rich user experience. I expect that there is an even chance that I will fall flat on my face - a prospect, while not appealing, I'm ready to face.

There are basically three reasons that I started this project. Being a Delphi / Pascal developer for the last 20 years, I needed a project to learn C#. I also wanted to experiment with the full range of tasks needed to develop software. Finally, I wanted to try my hand in the blogsphere and with releasing some open source software. And I can tell you that I'm having more fun doing this project than I have had in years. Even if I fail in this particular task, this has been a raving success for me.

So please let me know if you don’t mind my using your comment as the basis for a journal entry. You can email me at mreith at tetzel dot com if you prefer email over a further comment here.