Fill ribbon content dynamically

Nov 13, 2013 at 9:17 AM
Thanks for this great work !

I try to dynamically fill ribbon content using xml file. However I have some difficulties to get a correct layout (some settings like RibbonElementSizeMode seems to be managed in a strange way). Maybe I'm wrong or is there a specific way to refresh the whole ribbon layout.), for example OrbDropDown.OnRegionChanged() (changing private to public !) seems to perform the layout but for the Orb only.

Need help.
Developer
Nov 26, 2013 at 6:34 AM
RibbonTab tab3 = new RibbonTab();
tab3.Text = "New Tab";

RibbonPanel panel = new RibbonPanel();
panel.Text = "New Panel";
tab3.Panels.Add(panel);

RibbonButton button = new RibbonButton();
button.Text = "New Button";
panel.Items.Add(button);

ribbon1.Tabs.Add(tab3);

// Refresh and redraw whole ribbon
ribbon1.Refresh();