<Groups>
<LabelGroup>
<GroupName>grpDocumentInformation</GroupName>
<GroupLabel>Document Information</GroupLabel>
<Labels>
<Label>
<LabelName>lblReferenceNo</LabelName>
<LabelText>Reference No:</LabelText>
</Label>
<LabelName>lblReferenceType</LabelName>
<LabelText>Reference Type:</LabelText>
<LabelName>lblCreatedBy</LabelName>
<LabelText>Created By</LabelText>
<LabelName>lblDocumentType</LabelName>
<LabelText>Document Type:</LabelText>
</Labels>
</LabelGroup><Groups>
XmlNodeList labelGroupsList = xmlDoc.DocumentElement.SelectNodes("//Groups/LabelGroup");
foreach (XmlNode group in labelGroupsList)
{
rGroup = new RibbonGroup();
rGroup.Name = group.SelectSingleNode("GroupName").InnerText;
rGroup.Label = group.SelectSingleNode("GroupLabel").InnerText;
XmlNodeList labelElements = group.SelectNodes("Labels");
foreach (XmlNode labelList in labelElements)
XmlNodeList labels = labelList.SelectNodes("Label");
foreach (XmlNode label in labels)
rLabel = new RibbonLabel();
rLabel.Name = label.SelectSingleNode("LabelName").InnerText;
rLabel.Label = label.SelectSingleNode("LabelText").InnerText;
rLabel.Enabled = true;
rLabel.ShowLabel = true;
rGroup.Items.Add(rLabel);
}
tab1.Groups.Add(rGroup);