|
|
|
@ -111,7 +111,14 @@ namespace Avalonia.Controls.Documents |
|
|
|
/// <param name="text">The to be added text.</param>
|
|
|
|
public void Add(string text) |
|
|
|
{ |
|
|
|
AddText(text); |
|
|
|
if (InlineHost is TextBlock textBlock && !textBlock.HasComplexContent) |
|
|
|
{ |
|
|
|
textBlock._text += text; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Add(new Run(text)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -123,18 +130,6 @@ namespace Avalonia.Controls.Documents |
|
|
|
Add(new InlineUIContainer(control)); |
|
|
|
} |
|
|
|
|
|
|
|
internal void AddText(string text) |
|
|
|
{ |
|
|
|
if (InlineHost is TextBlock textBlock && !textBlock.HasComplexContent) |
|
|
|
{ |
|
|
|
textBlock._text += text; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Add(new Run(text)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Raised when an inline in the collection changes.
|
|
|
|
/// </summary>
|
|
|
|
|