In code, it would look something like this:

// Add the sub-menu to parentMenu, which is a CommandBarPopup

MsoControlType.msoControlPopup, Type.Missing,
Type.Missing, Type.Missing, true);

parentCommandBarControl.Visible = true;