Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     this._chrome = this.CreateWebPartChrome();
 }