public PageLayoutManager(ApplicationPartManager applicationPartManager) { this.ApplicationPartManager = applicationPartManager; this.PageLayoutDescriptors = new PageLayoutDescriptorCollection(); this.Initialize(); }
public PageLayoutDescriptorCollection GetByKind(PageLayoutKind kind) { PageLayoutDescriptorCollection pageLayoutDescriptors = new PageLayoutDescriptorCollection(); foreach (PageLayoutDescriptor pageLayoutDescriptor in this) { if (pageLayoutDescriptor.Kind == kind) { pageLayoutDescriptors.Add(pageLayoutDescriptor); } } return(pageLayoutDescriptors); }
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(""); }