We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Merging ribbons

Hello,

I have main form and usercontrol. On main form is ribbon, and on usercontrol also.
Usercontrol runs insde main form. How to show ribbon from usercontrol in main form? Is it possible that kind of merging ribbons, but without using MDI as showed in this example?

1 Reply

SK Senthil Kumaran Rajan Syncfusion Team November 30, 2015 12:09 PM UTC

Hi Josip,

Thanks for contacting Syncfusion Support.

Could you please confirm whether the reported requirement is to merge the RibbonControlAdv subitems from the UserControl into RibbonControlAdv loaded another Form? If so, the reported requirement can be achieved by programmatically retrieving required ToolStripTabItem and load it to RibbonControlAdv of the MainForm. Please use the below code example.

Code Example[C#];

//To add particular ToolStripTabItem           

 this.ribbonControlAdv1.Header.AddMainItem(this.user.ribbonControlAdv1.Header.MainItems[0]); 


//To add the all the ToolStripTabItem from userControl into the MainForm

private void toolStripButton3_Click(object sender, EventArgs e)

        {

            for (int i = 0; i <= this.user.ribbonControlAdv1.Header.MainItems.Count; i++)

            {  

               this.ribbonControlAdv1.Header.AddMainItem(this.user.ribbonControlAdv1.Header.MainItems[0]);

            }

        }


We have prepared the sample and video for your reference and it can be download from here.

Sample : http://www.syncfusion.com/downloads/support/forum/121296/ze/RibbonMerge-767209461

Video : http://www.syncfusion.com/downloads/support/forum/121296/ze/RibbonMergeVideo735339923

Additionally, we have also prepared the sample by merging the userControl as an MDI and it can be download from the below location.

Sample : http://www.syncfusion.com/downloads/support/forum/121296/ze/MergeRibbon-956024872

Regards,
Senthil

Loader.
Live Chat Icon For mobile
Up arrow icon