/// <include file='doc\StyleBuilderForm.uex' path='docs/doc[@for="StyleBuilderForm.SaveStringStyle"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        protected void SaveStringStyle()
        {
            Debug.Assert(styleType == STYLE_TYPE_STRING,
                         "SaveStringStyle must be called only when editing a string");

            Debug.Assert(editingStyle[0].GetPeerStyle() is IHTMLRuleStyle,
                         "Unexpected peer style for wrapper style");

            IHTMLRuleStyle style = (IHTMLRuleStyle)editingStyle[0].GetPeerStyle();

            styleObject = style.GetCssText();

            if (styleObject == null)
            {
                styleObject = "";
            }
        }
        /// <include file='doc\StyleBuilderForm.uex' path='docs/doc[@for="StyleBuilderForm.InitStyle"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        protected void InitStyle()
        {
            string styleValue = null;

            editingStyle = new IStyleBuilderStyle[1];
            switch (styleType)
            {
            case STYLE_TYPE_STRING:
                if (preview != null)
                {
                    IHTMLRuleStyle parseStyle = preview.GetParseStyleRule();
                    if (parseStyle != null)
                    {
                        styleValue = (string)styleObject;
                        parseStyle.SetCssText(styleValue);
                        editingStyle[0] = new CSSRuleStyle(parseStyle);
                    }
                }
                break;

            case STYLE_TYPE_INLINESTYLE:
            {
                IHTMLStyle style = (IHTMLStyle)styleObject;

                styleValue      = style.GetCssText();
                editingStyle[0] = new CSSInlineStyle(style);
            }
            break;

            case STYLE_TYPE_RULESTYLE:
            {
                IHTMLRuleStyle style = (IHTMLRuleStyle)styleObject;

                styleValue      = style.GetCssText();
                editingStyle[0] = new CSSRuleStyle(style);
            }
            break;
            }

            if (styleValue != null)
            {
                preview.SetSharedElementStyle(styleValue);
            }
        }