예제 #1
0
        public static ContentRegistration FieldSet(this ContentRegistration re, string containerName, string legend, Action <ContentRegistration> registration, int?sortOrder = null)
        {
            if (re == null)
            {
                return(re);
            }

            re.Add(new N2.Web.UI.FieldSetContainerAttribute(containerName, legend, re.NextSortOrder(sortOrder)));

            string previousContainerName = re.ContainerName;

            re.ContainerName = containerName;
            if (registration != null)
            {
                registration(re);
                re.ContainerName = previousContainerName;
            }

            return(re);
        }