public GroupDetailPage(SampleDataGroup dataGroup, PageGroup child) { InitializeComponent(); pageGroupCore = new PageGroup(); pageGroupCore.Caption = dataGroup.Title; imageControl.Image = DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(dataGroup.ImagePath, typeof(MainForm).Assembly); labelSubtitle.Text = dataGroup.Subtitle; labelDescription.Text = dataGroup.Description; CreateLayout(dataGroup, child); }
PageGroup CreateGroupItemDetailPage(SampleDataGroup group, PageGroup child) { GroupDetailPage page = new GroupDetailPage(group, child); PageGroup pageGroup = page.PageGroup; BaseDocument document = windowsUIView.AddDocument(page); pageGroup.Parent = tileContainer; pageGroup.Items.Add(document as Document); windowsUIView.ContentContainers.Add(pageGroup); windowsUIView.ActivateContainer(pageGroup); return pageGroup; }
public bool AddItem(SampleDataItem tile) { if (tile == null) return false; string groupName = tile.GroupName == null ? "" : tile.GroupName; SampleDataGroup thisGroup = GetGroup(groupName); if (thisGroup == null) { thisGroup = new SampleDataGroup(groupName); groupsCore.Add(thisGroup); } return thisGroup.AddItem(tile); }
public void CreateGroup(string name, string title, string subtitle, string imagePath, string description) { if (ContainsGroup(name)) return; SampleDataGroup group = new SampleDataGroup(name, title, subtitle, imagePath, description); groupsCore.Add(group); }
void CreateLayout(SampleDataGroup dataGroup, PageGroup child) { for (int i = 0; i < dataGroup.Items.Count; i++) CreateLayoutCore(dataGroup.Items[i], child, i); }