public void UpdateText(string value = null) { if (!String.IsNullOrEmpty(value)) { _rawText = value; ContainsHtml = (!String.IsNullOrEmpty(value) && Common.MatchHtmlTags.IsMatch(value)); } else { return; } var style = _instance.GetStyle(StyleID); TextValue = TextStyle.ParseString(style, _rawText); AttributedValue = ContainsHtml ? _instance.CreateHtmlString(TextValue, StyleID, CustomTags) : _instance.CreateStyledString(style, TextValue); }
public static ISpanned ToSpannedString(this string target, TextStyle instance, string defaultStyle, List <CssTagStyle> customStyles = null, bool useExisting = true) { return(instance.CreateHtmlString(target, defaultStyle, customStyles, useExisting)); }
public static NSAttributedString ToAttributedString(this string target, TextStyle instance, List <CssTag> customStyles = null, bool useExisting = true) { return(instance.CreateHtmlString(target, customStyles, useExisting)); }