AddButton() публичный Метод

public AddButton ( ) : CommandBarButton
Результат CommandBarButton
Пример #1
0
 private static void AddControl(CommandBarControls parentControls, XmlNode xmlNode, GetImageDelegate getImage)
 {
     if (xmlNode.Name == "popup")
     {
         string          controlName = xmlNode.Attributes["caption"].Value;
         object          before      = ReadControlBeforeAttribute(xmlNode);
         CommandBarPopup newPopup    = parentControls.AddPopup(controlName, before);
         ApplyControlAttributes(newPopup, xmlNode, getImage);
         AddControls(newPopup.Controls, xmlNode.ChildNodes, getImage);
     }
     else if (xmlNode.Name == "button")
     {
         object           before    = ReadControlBeforeAttribute(xmlNode);
         CommandBarButton newButton = parentControls.AddButton(before);
         ApplyControlAttributes(newButton, xmlNode, getImage);
     }
 }
Пример #2
0
 private static void AddControl(CommandBarControls parentControls, XmlNode xmlNode, GetImageDelegate getImage)
 {
     if (xmlNode.Name == "popup")
     {
         string controlName = xmlNode.Attributes["caption"].Value;
         object before = ReadControlBeforeAttribute(xmlNode);
         CommandBarPopup newPopup = parentControls.AddPopup(controlName, before);
         ApplyControlAttributes(newPopup, xmlNode, getImage);
         AddControls(newPopup.Controls, xmlNode.ChildNodes, getImage);
     }
     else if (xmlNode.Name == "button")
     {
         object before = ReadControlBeforeAttribute(xmlNode);
         CommandBarButton newButton = parentControls.AddButton(before);
         ApplyControlAttributes(newButton, xmlNode, getImage);
     }
 }