Exemplo n.º 1
0
 public WebTabStrip(WebTabCollection tabCollection)
 {
     ArgumentUtility.CheckNotNull("tabCollection", tabCollection);
     _tabs = tabCollection;
     _tabs.SetTabStrip(this);
     _tabStyle         = new WebTabStyle();
     _selectedTabStyle = new WebTabStyle();
     _disabledTabStyle = new WebTabStyle();
 }
Exemplo n.º 2
0
        private WebTabCollection GetDesignTimeTabs()
        {
            WebTabCollection tabs = new WebTabCollection(null);

            for (int i = 0; i < 5; i++)
            {
                tabs.Add(new WebTab(i.ToString(), "Tab " + (i + 1)));
            }
            return(tabs);
        }
Exemplo n.º 3
0
        private List <WebTab> GetVisibleTabs()
        {
            WebTabCollection tabs = Tabs;

            if (IsDesignMode &&
                tabs.Count == 0)
            {
                tabs = GetDesignTimeTabs();
            }

            var visibleTabs = new List <WebTab>();

            foreach (WebTab tab in tabs)
            {
                if (tab.EvaluateVisible() || IsDesignMode)
                {
                    visibleTabs.Add(tab);
                }
            }

            return(visibleTabs);
        }
 public void AddRange(WebTabCollection values)
 {
     base.AddRange(values);
 }
Exemplo n.º 5
0
 /// <summary> Saves the settings of the  <paramref name="tabs"/> and returns this view state </summary>
 private object SaveTabsControlState(WebTabCollection tabs)
 {
     EnsureTabsRestored();
     return(((IControlStateManager)tabs).SaveControlState());
 }
Exemplo n.º 6
0
 /// <summary> Loads the settings of the <paramref name="tabs"/> from <paramref name="tabsControlState"/>. </summary>
 private void LoadTabsControlState(object tabsControlState, WebTabCollection tabs)
 {
     ((IControlStateManager)tabs).LoadControlState(tabsControlState);
 }