private void UpdateFont() { FontDescription fontDescription = FontDescriptionHelper.CreateFontDescription( Element.FontSize, Element.FontFamily, Element.FontAttributes); Control.SetFont(fontDescription); }
private static string GenerateMarkupText(Span span) { StringBuilder builder = new StringBuilder(); builder.Append("<span "); FontDescription fontDescription = FontDescriptionHelper.CreateFontDescription( span.FontSize, span.FontFamily, span.FontAttributes); builder.AppendFormat(" font=\"{0}\"", fontDescription.ToString()); // BackgroundColor => if (!span.BackgroundColor.IsDefault) { builder.AppendFormat(" bgcolor=\"{0}\"", span.BackgroundColor.ToRgbaColor()); } // ForegroundColor => if (!span.TextColor.IsDefault) { builder.AppendFormat(" fgcolor=\"{0}\"", span.TextColor.ToRgbaColor()); } builder.Append(">"); // Complete opening span tag // Text builder.Append(SecurityElement.Escape(span.Text)); builder.Append("</span>"); return(builder.ToString()); }
private void UpdateFont() { FontDescription fontDescription = FontDescriptionHelper.CreateFontDescription( Element.FontSize, Element.FontFamily, Element.FontAttributes); Control.TextView.ModifyFont(fontDescription); AdjustMinimumHeight(Control.TextView, fontDescription); }