I'm working on a PowerPoint Add-In project.
I'm trying to create a RibbonToggleButton in code-behind but I can't do it the way I thought,
RibbonToggleButton toggleButton = new RibbonToggleButton();
Is it possible to create RibbonControls in code-behind and not the RibbonDesigner or RibbonXML?
According to the docs:
You can create a
RibbonToggleButton
at run time by using theCreateRibbonToggleButton
method of theRibbonFactory
object.
It looks like you get at the RibbonFactory
via the RibbonBase.Factory
property.
You may also want to look through this walk-through.