IPlatformRenderInterface.

CreateFormattedText(string, Typeface, double, TextAlignment, TextWrapping, Size, IReadOnlyList<FormattedTextStyleSpan>) Method

Summary

Creates a formatted text implementation.
Namespace
Avalonia.Platform
Containing Type
IPlatformRenderInterface

Syntax

IFormattedTextImpl CreateFormattedText(string text, Typeface typeface, double fontSize, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList<FormattedTextStyleSpan> spans)

Parameters

Name Type Description
text string The text.
typeface Typeface The base typeface.
fontSize double The font size.
textAlignment TextAlignment The text alignment.
wrapping TextWrapping The text wrapping mode.
constraint Size The text layout constraints.
spans IReadOnlyList<FormattedTextStyleSpan> The style spans.

Return Value

Type Description
IFormattedTextImpl An IFormattedTextImpl.