I can't add items to dropdown controller at runtime in the Ribbon class. However, looks like many topics and even msdn resolve it using Globals class properties.
https://msdn.microsoft.com/en-us/library/bb772088.aspx
The firt example on this msdn page doesn't work for me. I can't reach the dropDown or any other controller (button, comboBox, etc.).
Here is my .xml file:
<?xml version="1.0" encoding="utf-8" ?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon>
<tabs>
<tab id="LFET" label="LFET(new)">
<group id="Data" label="Data">
<dropDown id="DropdownList" label="Dropdownlist1" visible="true">
</dropDown>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
And the .cs where i'm trying to access the dropDown item:
namespace TEST
{
[ComVisible(true)]
public class TESTRibbon : Office.IRibbonExtensibility
{
private Office.IRibbonUI ribbon;
public void DropdownList()
{
//No way to access my custom ribbon like that.
Globals.Ribbons.Ribbon.Dropdownlist1.Items.Add();
}
}
}
Regards,