This project is read-only.

Adding controls to RibbonToolBarRow programmatically

May 16, 2013 at 11:41 PM

I would appreciate some help in adding buttons to a RibbonToolBarRow programmatically.

I have tried creating a Fluent.Button and setting its Name property. Then creating a var def = RibbonToolBarControlDefinition with its Target set to the button name. And, lastly, I tried adding the RibbonToolBarControlDefinition to the toolbar by performing: myToolbar.Children.Add(def);

But this does not add the button to the ribbon toolbar row.

Do I need to do some form of "refresh" after adding items to the Children property to get them to show up? Perhaps I am not adding the button correctly?

Thank you for any help. Much appreciated.
May 18, 2013 at 4:46 PM
There is an example usage of the RibbonToolBar in the TestWindow.
Just look at the XAML-Code and translate that to code.

Refreshing is not needed.