Beispiel #1
0
        protected override void RenderContents(HtmlTextWriter output)
        {
            #region Header div

            output.AddAttribute(HtmlTextWriterAttribute.Class, "groupboxHeaders");
            output.RenderBeginTag(HtmlTextWriterTag.Div);

            #region Header left div

            output.AddAttribute(HtmlTextWriterAttribute.Class, "left groupboxHeadersLeft");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            TitleLeftContent.RenderControl(output);
            output.RenderEndTag();

            #endregion

            #region Header right div

            //Header right
            output.AddAttribute(HtmlTextWriterAttribute.Class, "right groupboxHeadersRight");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            TitleRightContent.RenderControl(output);
            output.RenderEndTag();

            #endregion

            #region Clear both

            output.Write("<br style='clear:both;' />");

            #endregion

            //End header div
            output.RenderEndTag();

            #endregion

            #region Content div

            output.AddAttribute(HtmlTextWriterAttribute.Class, "groupBoxContent");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            BodyContent.RenderControl(output);
            output.RenderEndTag();

            #endregion
        }
Beispiel #2
0
        /// <summary>
        /// Renders the contents.
        /// </summary>
        /// <param name="output">The output.</param>
        protected override void RenderContents(HtmlTextWriter output)
        {
            //Visual state hidden field
            hdnVisualState.RenderControl(output);

            #region Background overlay

            //Begin and end background overlay div
            output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxOverlay");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            output.RenderEndTag();

            #endregion Background overlay

            #region Dialog box container

            //Begin dialog container div (this is the parent div of the dialog box and its shadow)
            output.AddAttribute(HtmlTextWriterAttribute.Class, IsAutoFocus ? "popupBoxDialogContainer AutoFocus" : "popupBoxDialogContainer");
            output.RenderBeginTag(HtmlTextWriterTag.Div);

            //Begin and End Dialog shadow div
            output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxDialogShadow");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            output.RenderEndTag();

            #region Dialog box

            //Begin dialog div
            output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxDialog");
            output.RenderBeginTag(HtmlTextWriterTag.Div);

            #region Titlebar

            if (ShowTitleBar)
            {
                output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxTitlebar");
                //output.AddStyleAttribute(HtmlTextWriterStyle.Height, string.Format("{0}px", TitlebarHeight));
                output.RenderBeginTag(HtmlTextWriterTag.Div);

                output.Write(Title);

                if (ShowCornerCloseButton)
                {
                    output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxCornerCloseButton popupBoxCloser");
                    output.RenderBeginTag(HtmlTextWriterTag.Div);
                    output.RenderEndTag();
                }

                output.RenderEndTag();
            }

            #endregion Titlebar

            #region Content area

            output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxContent");
            output.RenderBeginTag(HtmlTextWriterTag.Div);
            BodyContent.RenderControl(output);
            output.RenderEndTag();

            #endregion Content area

            #region Bottom stripe area

            if (ShowBottomStripe)
            {
                output.AddAttribute(HtmlTextWriterAttribute.Class, "popupBoxBottomStripe");
                output.RenderBeginTag(HtmlTextWriterTag.Div);
                BottomStripeContent.RenderControl(output);
                output.RenderEndTag();
            }

            #endregion Bottom stripe area

            //End dialog div
            output.RenderEndTag();

            #endregion Dialog box

            //End dialog container div
            output.RenderEndTag();

            #endregion Dialog box container
        }