public FormattedText GetFormattedText() {
if (_formattedText == null) {
_formattedText = new FormattedText(
Text,
CultureInfo.CurrentUICulture,
CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight,
Typeface,
FontSize,
Foreground);
}
return _formattedText;
}