protected override TemplateEditingVerb[] GetCachedTemplateEditingVerbs() { if (_templateEditingVerbs == null) { WeavverTabControl tc = (WeavverTabControl)Component; _templateEditingVerbs = new TemplateEditingVerb[tc.Tabs.Count]; for (int i = 0; i < tc.Tabs.Count; i++) { _templateEditingVerbs[i] = new TemplateEditingVerb("Tab " + i.ToString(), i, this); } } return(_templateEditingVerbs); }
public override void SetTemplateContent(ITemplateEditingFrame editingFrame, string templateName, string templateContent) { if ((_templateEditingVerbs != null) && (_templateEditingVerbs[index] == editingFrame.Verb)) { WeavverTabControl control = (WeavverTabControl)Component; ITemplate newTemplate = null; if ((templateContent != null) && (templateContent.Length != 0)) { newTemplate = GetTemplateFromText(templateContent); //control.Tabs[index] = newTemplate; } } UpdateDesignTimeHtml(); }
//------------------------------------------------------------------------------------------- #region Design-time HTML public override string GetDesignTimeHtml() { WeavverTabControl control = (WeavverTabControl)Component; if (control.Tabs[control.SelectedIndex] == null) { return(GetEmptyDesignTimeHtml()); } string designTimeHTML = String.Empty; try { control.DataBind(); designTimeHTML = base.GetDesignTimeHtml(); } catch (Exception e) { designTimeHTML = GetErrorDesignTimeHtml(e); } return(designTimeHTML); }