private void AddText(string text, FontAndColorSetting setting) { if (setting == null) { throw new ArgumentNullException("setting"); } textSource.Add(text, setting); }
public void Add(string text, FontAndColorSetting format) { SimpleTextRunProperties props; if (!propMap.TryGetValue(format.GetHashCode(), out props)) { props = new SimpleTextRunProperties(format); propMap.Add(format.GetHashCode(), props); } var span = new FormattedSpan(textBuilder.Length, text.Length, props); textBuilder.Append(text); spans.Add(span); cache.Change(span.Start, span.Length, 0); }
public SimpleTextParagraphProperties(FontAndColorSetting defaultSetting) { this.defaultTextRunProperties = new SimpleTextRunProperties(defaultSetting); }
public SimpleTextRunProperties(FontAndColorSetting fontAndColorSetting) { this.fontAndColorSetting = fontAndColorSetting; }