示例#1
0
        public PageLayoutManager(ApplicationPartManager applicationPartManager)
        {
            this.ApplicationPartManager = applicationPartManager;

            this.PageLayoutDescriptors = new PageLayoutDescriptorCollection();

            this.Initialize();
        }
示例#2
0
        public PageLayoutDescriptorCollection GetByKind(PageLayoutKind kind)
        {
            PageLayoutDescriptorCollection pageLayoutDescriptors = new PageLayoutDescriptorCollection();

            foreach (PageLayoutDescriptor pageLayoutDescriptor in this)
            {
                if (pageLayoutDescriptor.Kind == kind)
                {
                    pageLayoutDescriptors.Add(pageLayoutDescriptor);
                }
            }

            return(pageLayoutDescriptors);
        }
示例#3
0
        public string GetPageLayout(PageLayoutKind kind, string layoutName)
        {
            PageLayoutDescriptorCollection pageLayoutDescriptors = this.PageLayoutDescriptors.GetByKind(kind);

            foreach (PageLayoutDescriptor pageLayoutDescriptor in pageLayoutDescriptors)
            {
                if (pageLayoutDescriptor.Name == layoutName)
                {
                    return(pageLayoutDescriptor.RelativePath);
                }
            }

            return("");
        }