public void ClickItem (string groupId, string itemId)
{
CommandBarMenu menu = GetMenu(groupId);
if(menu == null)
throw new ConfigurationException("Could not find the menu with an Id of '"+groupId+"'.");
CommandBarItem item= GetMenuItem(menu, itemId);
if(item == null)
throw new ConfigurationException("Could not find the item with an Id of '"+itemId+"' in the menu '"+groupId+"'.");
OnClick(item, null);
}