Example #1
0
        private void ProcessSeparatorNode(RibbonPanel panel, XmlNode node)
        {
            string targetControl = XmlUtilities.GetAttributeValue <string>(node, "targetControl");
            bool?  insertBefore  = XmlUtilities.GetAttributeValueAsNullable <bool>(node, "insertBefore");
            bool?  isInSlideout  = XmlUtilities.GetAttributeValueAsNullable <bool>(node, "isInSlideout");

            bool slideout = isInSlideout.HasValue ? isInSlideout.Value : false;

            CommandControls controls = (slideout ? panel.SlideoutControls : panel.CommandControls);

            controls.AddSeparator(
                string.IsNullOrEmpty(targetControl) ? string.Empty : targetControl,
                insertBefore.HasValue ? insertBefore.Value : false);
        }