/// ----------------------------------------------------------------------------- /// <summary> /// This class allows us to render the design time mode with custom HTML /// </summary> /// <remarks> /// The reason for implementing this class is to allow a default tabstrip to be /// shown at design-time, when no tabs are present in the html /// </remarks> /// <history> /// [Jon Henning] 8/7/2006 Commented /// </history> /// ----------------------------------------------------------------------------- public override string GetDesignTimeHtml() { string strText; DNNTabStrip objTabStrip = (DNNTabStrip)base.Component; TabStripTabCollection objTabs = objTabStrip.Tabs; bool blnFDL = objTabStrip.ForceDownLevel; //store original before setting to true objTabStrip.ForceDownLevel = true; //force downlevel to cause only one tab to render if (objTabs.Count == 0) { objTabs.Add(new DNNTab("Tab 1")); objTabs.Add(new DNNTab("Tab 2")); Panel objPanel = new Panel(); objPanel.Width = new Unit("100px"); objPanel.Height = new Unit("50px"); ((DNNTab)objTabs[0]).Controls.Add(objPanel); objTabStrip.SelectedIndex = 0; strText = base.GetDesignTimeHtml(); objTabs.Clear(); } else { strText = base.GetDesignTimeHtml(); } objTabStrip.ForceDownLevel = blnFDL; //restore original value return(strText); }
private void DisplayTabbedLoginControl(AuthenticationLoginBase authLoginControl, TabStripTabCollection Tabs) { var tab = new DNNTab(Localization.GetString("Title", authLoginControl.LocalResourceFile)) { ID = authLoginControl.AuthenticationType }; tab.Controls.Add(authLoginControl); Tabs.Add(tab); tsLogin.Visible = true; }