当前位置: 首页>>代码示例>>C#>>正文


C# XhtmlMobileTextWriter.ExitStyle方法代码示例

本文整理汇总了C#中XhtmlMobileTextWriter.ExitStyle方法的典型用法代码示例。如果您正苦于以下问题:C# XhtmlMobileTextWriter.ExitStyle方法的具体用法?C# XhtmlMobileTextWriter.ExitStyle怎么用?C# XhtmlMobileTextWriter.ExitStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XhtmlMobileTextWriter的用法示例。


在下文中一共展示了XhtmlMobileTextWriter.ExitStyle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenderRule

 private void RenderRule (XhtmlMobileTextWriter writer, Color foreColor, int columnSpan) {
     if (CssLocation == StyleSheetLocation.PhysicalFile || Device["requiresXhtmlCssSuppression"] == "true") {
         // Review: Since, if there is a physical stylesheet, we cannot know the intended foreColor,
         // do not render a rule.
         return;
     }
     writer.Write("<tr>");
     Style hruleStyle = new Style();
     // Rendering <td...> with background color equal to the style's forecolor renders a thin
     // rule with color forecolor, as intended.
     hruleStyle[Style.BackColorKey] = foreColor == Color.Empty ? Color.Black : foreColor;
     NameValueCollection additionalAttributes = new NameValueCollection();
     additionalAttributes["colspan"] = columnSpan.ToString(CultureInfo.InvariantCulture);              
     writer.EnterStyleInternal(hruleStyle, "td", StyleFilter.BackgroundColor, additionalAttributes);
     writer.ExitStyle(Style);
     writer.WriteEndTag("tr");            
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:17,代码来源:XhtmlBasicObjectListAdapter.cs

示例2: RenderClosingListTag

 /// <include file='doc\XhtmlBasicControlAdapter.uex' path='docs/doc[@for="XhtmlControlAdapter.RenderClosingListTag"]/*' />
 protected virtual void RenderClosingListTag(XhtmlMobileTextWriter writer, String tagName) {
     if (CssLocation == StyleSheetLocation.PhysicalFile  && (String)Device[XhtmlConstants.RequiresXhtmlCssSuppression] != "true") {
         writer.WriteEndTag(tagName);
         ConditionalPopPhysicalCssClass(writer);
     }
     else if ((String)Device[XhtmlConstants.RequiresXhtmlCssSuppression] != "true") {
         writer.ExitStyle(Style);
     }
     else {
         writer.WriteEndTag(tagName);
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:13,代码来源:XhtmlBasicControlAdapter.cs

示例3: Render

        /// <include file='doc\XhtmlBasicFormAdapter.uex' path='docs/doc[@for="XhtmlFormAdapter.Render"]/*' />
        public override void Render (XhtmlMobileTextWriter writer) {
            // Note: <head>, <body> rendered by page adapter, as in HTML case.
            String formsAuthCookieName = FormsAuthentication.FormsCookieName;
            if(!Device.SupportsRedirectWithCookie)
            {
                if(formsAuthCookieName != null && formsAuthCookieName.Length > 0)
                {
                    HttpContext.Current.Response.Cookies.Remove(formsAuthCookieName);
                }
            }
            writer.WriteBeginTag ("form");
            writer.WriteAttribute ("id", Control.ClientID);
            writer.WriteAttribute ("method", Control.Method.ToString().ToLower(CultureInfo.CurrentCulture));
            writer.Write (" action=\"");
            RenderPostbackUrl(writer);
            if(Control.Action.Length > 0) {
                if(Control.Action.IndexOf("?", StringComparison.Ordinal) != -1) {
                    writer.Write("&");
                }
                else {
                    writer.Write("?");
                }
            }
            else {
                writer.Write("?");
            }
            writer.Write(Page.UniqueFilePathSuffix);

            if (Control.Method != FormMethod.Get &&
                Control.Action.Length == 0) {   // VSWhidbey 411176: We don't include QueryStringText if Action is explicitly set

                String queryStringText = PreprocessQueryString(Page.QueryStringText);
                if (queryStringText != null && queryStringText.Length > 0) {
                    String amp = (String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false"  ? "&amp;" : "&";
                    writer.Write(amp);
                    if((String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false") {
                        writer.WriteEncodedText(queryStringText);
                    }
                    else {
                        writer.Write(queryStringText);
                    }
                }
            }
            writer.WriteLine ("\">");
            bool needDivStyle = (String)Device[XhtmlConstants.RequiresXhtmlCssSuppression] != "true" &&
                (String)Device["supportsBodyClassAttribute"] == "false";
            if (!needDivStyle) {
                if((String)Device["usePOverDiv"] == "true")
                    writer.WriteFullBeginTag("p");
                else
                    writer.WriteFullBeginTag ("div");
            }
            else {
                if((String)Device["usePOverDiv"] == "true")
                    writer.EnterStyle(Style, "p");
                else
                    writer.EnterStyle (Style, "div");
            }
            RenderPostBackHeader (writer);
            // Renders hidden variables for IPostBackDataHandlers which are
            // not displayed due to pagination or secondary UI.
            RenderOffPageVariables(writer, Control, Control.CurrentPage);
            
            RenderChildren (writer);
            if (!needDivStyle) {
                if((String)Device["usePOverDiv"] == "true")
                    writer.WriteEndTag("p");
                else
                    writer.WriteEndTag ("div");
            }
            else {
                if((String)Device["usePOverDiv"] == "true")
                    writer.ExitStyle(Style);
                else
                    writer.ExitStyle (Style);
            }
            writer.WriteEndTag ("form");
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:79,代码来源:XhtmlBasicFormAdapter.cs

示例4: ConditionalExitStyle

 /// <include file='doc\XhtmlBasicControlAdapter.uex' path='docs/doc[@for="XhtmlControlAdapter.ConditionalExitStyle"]/*' />
 protected virtual void ConditionalExitStyle(XhtmlMobileTextWriter writer, Style style)  {
     if ((String)Device[XhtmlConstants.RequiresXhtmlCssSuppression] == "true") {
         return;
     }
     if (CssLocation == StyleSheetLocation.PhysicalFile) {
         // Do nothing.  Styles should be handled by CssClass custom attribute.
         return;
     }
     writer.ExitStyle(style);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:11,代码来源:XhtmlBasicControlAdapter.cs

示例5: RenderClosingBodyElement

 private void RenderClosingBodyElement(XhtmlMobileTextWriter writer) {
     Style formStyle = ((ControlAdapter)Page.ActiveForm.Adapter).Style;
     if (CssLocation == StyleSheetLocation.PhysicalFile) {
         writer.WriteEndTag("body");
         if (_pushedCssClassForBody) {
             writer.PopPhysicalCssClass();
         }
     }
     else if ((String)Device[XhtmlConstants.RequiresXhtmlCssSuppression] != "true" &&
         (String)Device[XhtmlConstants.SupportsBodyClassAttribute] != "false") {
         writer.ExitStyle(formStyle); // writes the closing body element.
     }
     else {
         writer.WriteEndTag ("body");
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:16,代码来源:XhtmlBasicPageAdapter.cs


注:本文中的XhtmlMobileTextWriter.ExitStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。