コード例 #1
0
 void UpdateTabContainer()
 {
     TabContainer = TargetDashboard.Items.FirstOrDefault(item => item is TabContainerDashboardItem) as TabContainerDashboardItem;
     if (TabContainer == null)
     {
         CreateTabContainer();
         DashboardLayoutTabContainer layoutTabContainer = new DashboardLayoutTabContainer(TabContainer, 1);
         if (ItemsAndGroups.Count() > 0)
         {
             DashboardTabPage tabPage = TabContainer.CreateTabPage();
             tabPage.Name = TargetDashboard.Title.Text;
             DashboardLayoutTabPage layoutPage = new DashboardLayoutTabPage(tabPage);
             layoutTabContainer.ChildNodes.Add(layoutPage);
             MoveRootToTabPage(layoutPage);
             SetParentContainer(tabPage);
         }
         TargetDashboard.LayoutRoot = new DashboardLayoutGroup();
         TargetDashboard.LayoutRoot.ChildNodes.Add(layoutTabContainer);
     }
 }