Building wpf Ribbon at runtime-Collection of common programming errors

I am trying to databind a ribbon control for dynamic menus.


   
    
    
     
     
    

The top ribbon tab is my ‘real’ ribbontab. The bottom started out as a manually built that I am verifying my theories with.

Here are the datatemplates I am trying to use:


   



   

This is my first attempt at the Group DataTemplate:


   

Then I was trying this one:


  

The problem is that I cant get the buttons to show up under the group. If I dont have a grouptemplate as in my second ribbontab, I can get it working. But if I try to do the group dynamically as well it fails to create the buttons. Also by doing the datatemplate with the ribbongroup inside of it, the headings get cutoff. I already read about that and that was the reason for trying to use the HierarchicalDatatemplate. The Regular Datatemplate does not allow for itemsource or itemtemplate.

So How do i get a dynamic RibbonGroup to show Dynamic RibbonButtons?

I have implemented some other changes now and its at least filling it in, however its not correct.

Right now it looks like this:

I want it to look like this which is partially hardcoded.

here is the xaml


   



   

the only thing I have left to try is changing my RibbonButtonDataTemplate to a hierarchical datatemplate.