This is a migrated thread and some comments may be shown as answers.

RadRibbonForm in RadRibbonForm MDI

5 Answers 374 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 24 Aug 2014, 03:44 PM
first see the attach file so that you could picture out the things I wanted to do.

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

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Aug 2014, 02:23 PM

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
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
k
Top achievements
Rank 1
answered on 10 Jul 2017, 09:16 AM
It is possible to project
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Jul 2017, 06:48 AM
Hello , 

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
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Valentino
Top achievements
Rank 1
answered on 29 Aug 2017, 12:27 AM

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();
        }

 

0
Valentino
Top achievements
Rank 1
answered on 29 Aug 2017, 12:28 AM
edit: FormView (constructor) above, should be ChildView
Tags
RibbonBar
Asked by
Roger
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
k
Top achievements
Rank 1
Valentino
Top achievements
Rank 1
Share this question
or