Пример #1
0
        /// <summary>
        /// Creates child controls.
        /// </summary>
        protected override void CreateChildControls()
        {
            // create menu tabstrip
            _tabContainer        = CreateTabContainer();
            _tabContainer.Click += new TabCommandEventHandler(OnSelectTabCommand);

            // create multiview container
            _multiView = new MultiView();
            _multiView.ActiveViewChanged += new EventHandler(OnActiveViewChanged);

            // add views previously parsed
            for (int i = 0; i < _parsedViews.Count; i++)
            {
                _multiView.Controls.Add((Control)_parsedViews[i]);
            }
            _parsedViews = null;

            // select defined view
            if (_activeViewIndexCached != -1)
            {
                _multiView.ActiveViewIndex = _activeViewIndexCached;
                _activeViewIndexCached     = -1;
            }

            // create content pane
            Control content = CreateContent(_tabContainer, _multiView);

            Controls.Add(content);

            RebuildTabs();
        }
Пример #2
0
        /// <summary>
        /// Creates TabContainer and MultiView
        /// </summary>
        protected virtual Control CreateContent(TabContainer menu, MultiView body)
        {
            Control content = new Control();

            WebControl menuPanel = new WebControl(HtmlTextWriterTag.Div);

            menuPanel.CssClass = TabularMenuCSS;
            menuPanel.Controls.Add(menu);
            content.Controls.Add(menuPanel);

            WebControl bodyPanel = new WebControl(HtmlTextWriterTag.Div);

            bodyPanel.CssClass = TabularBodyCSS;
            bodyPanel.Controls.Add(body);
            content.Controls.Add(bodyPanel);

            return(content);
        }