public void InitPages(int index) { FUpdatingTabs = true; // add tabs FTabs.Tabs.Clear(); // code tab TabItem codeTab = new TabItem(); codeTab.Text = Res.Get("Designer,Workspace,Code"); codeTab.Image = Res.GetImage(61); FTabs.Tabs.Add(codeTab); // page tabs foreach (PageBase page in FReport.Pages) { TabItem pageTab = new TabItem(); pageTab.Tag = page; pageTab.Text = page.PageName; ObjectInfo info = RegisteredObjects.FindObject(page); pageTab.Image = info.Image; FTabs.Tabs.Add(pageTab); } FUpdatingTabs = false; ActivePageIndex = index; FTabs.Refresh(); }