Пример #1
0
        public override Group CreateGroup(SPRibbon ribbon,
                                          string id,
                                          GroupProperties properties,
                                          string title,
                                          string description,
                                          string command,
                                          Dictionary <string, List <Control> > controls,
                                          Dictionary <string, string> pars)
        {
            DeclarativeTemplateBuildContext bc = new DeclarativeTemplateBuildContext();

            bc.Ribbon     = ribbon;
            bc.Controls   = controls;
            bc.Parameters = pars;

            Group group = ribbon.CreateGroup(id, properties, title, description, command);

            // Loop through the Layouts for this group and create them.
            JSObject[] children = DataNodeWrapper.GetNodeChildren(_data);
            for (int i = 0; i < children.Length; i++)
            {
                Layout layout = CreateLayoutFromData(children[i], group, bc);
                if (!CUIUtility.IsNullOrUndefined(layout))
                {
                    group.AddChild(layout);
                }
            }
            return(group);
        }