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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to merge RibbonPanelContainercontrol from child form in WinForms RibbonControlAdv?

Platform: WinForms |
Control: RibbonControlAdv

Creating RibbonPanelMergeContainer

In RibbonControlAdv, it is possible to merge the RibbonPanel of the child form to the ribbon control of Main Form by using “RibbonPanelMergeContainer”. This documentation will guide to merge the RibbonPanel of the Child Form to the RibbonControlAdv in Parent Form and you can also activate the recently added tab by using SelectedTab property in RibbonControlAdv. The following code demonstrates the same.


/// <summary>
/// For MDIChildForm is merged to Parent Form.
/// </summary>
Form2 form = new Form2();
form.MdiParent = this;
form.Text = "Form" + count;
// To Select recently added MDIChildForm
foreach (ToolStripTabItem TabItem in this.ribbonControlAdv1.Header.MainItems)
  if((TabItem as ToolStripTabItem).Panel != null
&& (TabItem as ToolStripTabItem).Panel is RibbonPanelMergeContainer)
    this.ribbonControlAdv1.SelectedTab = TabItem;


''' <summary>
''' For MDIChildForm is merged to Parent Form.
''' </summary>
Dim form As New Form2()
form.MdiParent = Me
form.Text = "Form" & count
' To Select MDIChildForm when added.
For Each TabItem As ToolStripTabItem In Me.ribbonControlAdv1.Header.MainItems
  If (TryCast(TabItem, ToolStripTabItem)).Panel IsNot Nothing AndAlso TypeOf (TryCast(TabItem, ToolStripTabItem)).Panel Is RibbonPanelMergeContainer Then
    Me.ribbonControlAdv1.SelectedTab = TabItem
    Exit For
  End If
Next TabItem


ScreenshotBefore merging childform to parentform

Figure 1: Before merging ChildForm to Parent Form.

After merging childform to parentform    Figure 2: After merging ChildForm to Parent Form.


C#:  MergeRibbonPanel

VB:  MergeRibbonPanel

Reference link: https://help.syncfusion.com/windowsforms/ribbon/ribbon-merge-support

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile