This project is read-only.

Add InRibbonGalery at runtime

May 21, 2010 at 5:34 PM

Hi everybody.

I try to add some RibbonControls to Ribbon at runtime. All works fine, but when i try add RibbonGroupBox with InRibbonGalery inside, size of this group not correspond InRibbonGallery control.

This is code:

public static void MergeRibbonGroups(Collection<RibbonGroupBox> source, Collection<RibbonGroupBox> groupsToMerge)
{
      foreach (RibbonGroupBox group in groupsToMerge)
      {
          if (source.Contains<RibbonGroupBox>(group, new RibbonGroupComparer()))
          {
              continue;                    
          }
          else
          {
              source.Add(group);
          }
      }
}

 

Any suggestion?