I am trying to programmatically add new child items (and links) to my top-level PopupButtonCommand Menu item.
I already inserted a BarPopupButtonCommand (Category = "New Menu") into my UI call 'PlugIns" and using the code below (which works but is probably not the best way), I can enable or disable the button.
foreach (ActiproSoftware.UIStudio.Bar.BarCommand cmd in barManager.Commands)
{
if (cmd.Tag == "PlugIns"){
if (plugIns == null || plugIns.Length == 0)
cmd.Enabled = false;
else
{
// populate with our available plug-ins
}
}
}
I am using an interface to create different plug-ins for my application. After reading a folder and getting a list of available plug-ins, I'm trying to add those plug-in items (with command links) programmatically to my current barManager.Commands.
After looking at all the ActiPro examples, I'm still struggling. Any example code or basic step-by-step would be great.
Thanks, Ian