Last Updated: 29 Oct 2015 09:37 by Todor
Created on: 27 Oct 2015 13:15
Category: RibbonBar
Type: Bug Report
FIX. RadRibbonBar - the layout is not updated when the ribbon is collapsed and adding new command tabs.
To reproduce:
1.Create a new Visual C# -> Telerik Windows Forms Application
2.Drag a RadRibbonBar control onto RadForm1
3.Create a single tab "First Tab" (otherwise you cannot collapse the ribbon)
4.Drag a button onto the form and add the following code to the click event handler:
RibbonTab tab = new RibbonTab("Test");
tab.IsSelected = true;
5.You should end up with something like the attached png file.
6.Run the project and click the button. You should see the new tab is created and selected.
7.Close the project and run it again. This time, collapse the ribbon before clicking the button. No new tab is visible on the ribbon. Even if you click on the [First Tab] to show the full ribbon.
8.Click the expand ribbon button on the right and the new tab will then appear.

bool isExpanded = this.radRibbonBar1.Expanded;
this.radRibbonBar1.Expanded = true;
RibbonTab tab = new RibbonTab("Test " + this.radRibbonBar1.CommandTabs.Count); 
tab.IsSelected = true;
this.radRibbonBar1.Expanded = isExpanded;