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"); }
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"); }