protected override WebPartChrome CreateWebPartChrome() { if (null == this._chrome) { if (!this.RenderDivs) { this._chrome = new BaseChrome(this, base.WebPartManager); } else { this._chrome = new DivChrome(this, base.WebPartManager); } } return(this._chrome); }
protected override void RenderBody(HtmlTextWriter writer) { if (this.WebPartManager.DisplayMode.Name == "Design" || this.WebPartManager.DisplayMode.Name == "Edit") { this.IsDesignMode = true; } writer.AddAttribute(HtmlTextWriterAttribute.Class, "sn-zone-body"); writer.RenderBeginTag(HtmlTextWriterTag.Div); this.RenderEmptyZoneBody(writer); if (this.WebParts.Count != 0) { foreach (WebPart webPart in WebParts) { WebPartChrome.RenderWebPart(writer, webPart); } } writer.RenderEndTag(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); this._chrome = this.CreateWebPartChrome(); }