Ejemplo n.º 1
0
 private void AddingChild(Span element, Inline child)
 {
     if (FormattingCalculator.RequiresSpace(element.Inlines.LastInline, child))
     {
         element.Inlines.Add(new Run(" "));
     }
 }
Ejemplo n.º 2
0
        private void AddingChild(StringBuilder stringBuilder, XInline child)
        {
            var lastCharacter = stringBuilder.Length > 0 ? stringBuilder[stringBuilder.Length - 1] : '\0';

            if (child is XLineBreak)
            {
                return;
            }

            if (FormattingCalculator.RequiresSpace(lastCharacter, (child.Text ?? string.Empty).FirstOrDefault()))
            {
                stringBuilder.Append(" ");
            }
        }