I been using RadRibbon Form as the Parent MDI and RadDocking technology.
When the user click a button to open another form, the newly opened rad ribbon form will be display directly under the rad dock.
The newly opened rad ribbon form, I wanted that this ribbon will be displayed in the Parent Ribbon as Contextual Tab and their command tabs.
And only the panel or what ever controls will remain in the rad dock.
If ever this is not possible, what controls/forms that can I put in the rad dock? Considering that this controls is a base window.
5 Answers, 1 is accepted
Hello Roger,
Thank you for writing.
Currently, only Menu Merge in MDI applications is supported and it is not supported to handle automatically the MDI child RadRibbonForm creation and create the desired contextual tabs in the parent RadRibbonForm. However, it is a reasonable request. I have logged it in our Feedback Portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - Feedback Item.
I have also updated your Telerik points.
You can manually achieve the merging, following the approach below:
public Form1(){ InitializeComponent(); this.AllowAero = false; this.IsMdiContainer = true; this.radDock1.AutoDetectMdiChildren = true;} private void radButtonElement1_Click(object sender, EventArgs e){ Form2 childForm = new Form2(); foreach (RibbonTab tab in childForm.RibbonBar.CommandTabs) { ContextualTabGroup contextualTabGroup = new ContextualTabGroup(); contextualTabGroup.Text = tab.Title; this.radRibbonBar1.CommandTabs.Add(tab); contextualTabGroup.TabItems.Add(tab); this.radRibbonBar1.ContextualTabGroups.Add(contextualTabGroup); tab.IsSelected = true; } childForm.RibbonBar.Visible = false; childForm.Text = "MDI Child " + DateTime.Now.ToShortTimeString(); childForm.MdiParent = this; childForm.Show();}I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for writing.
I have sample project with the code provided in my previous post.
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
How should RadDiagramRibbonBars be handled compared to 'normal' ribbon bars?
I have tried a modified version of your above code with some success. The Diagram ribbon bar does get merged with the main view's ribbon. But when I add another child form, its diagram ribbon gets added too. Do I need to re-merge this every time I tab to different child views? And similarly, if I undock/restore a child view, do I need to manually remove the diagram bar from the main view, and un-hide it from the child view? Thanks for your time.
I have this structure. All code is simplified.
MDI Container
public partial class MainView : RadRibbonForm
Code to add MDI child
var view = new ChildView(this){ Dock = DockStyle.Fill, TopLevel = false, FormBorderStyle = FormBorderStyle.None, MdiParent = this, Text = "something",};
MDI Child
public partial class ChildView : RadForm{ public FormView(RadRibbonForm parent) { InitializeComponent(); radDiagramRibbonBar1.Visible = false; foreach (var tab in radDiagramRibbonBar1.CommandTabs) { ContextualTabGroup contextualTabGroup = new ContextualTabGroup {Text = tab.Text}; parent.RibbonBar.CommandTabs.Add(tab); contextualTabGroup.TabItems.Add(tab); parent.RibbonBar.ContextualTabGroups.Add(contextualTabGroup); tab.Select(); }
