FontAttributes = FontAttributes.None;
ForegroundColor = EColor.Default;
BackgroundColor = EColor.Default;
- HorizontalTextAlignment = TextAlignment.Auto;
- VerticalTextAlignment = TextAlignment.Auto;
- LineBreakMode = LineBreakMode.MixedWrap;
+ HorizontalTextAlignment = TextAlignment.None;
+ VerticalTextAlignment = TextAlignment.None;
+ LineBreakMode = LineBreakMode.None;
Underline = false;
Strikethrough = false;
}
case TextAlignment.Center:
_formattingString.Append("align=center ");
break;
+
+ case TextAlignment.None:
+ break;
}
switch (VerticalTextAlignment)
case TextAlignment.Center:
_formattingString.Append("valign=middle ");
break;
+
+ case TextAlignment.None:
+ break;
}
switch (LineBreakMode)
case LineBreakMode.TailTruncation:
_formattingString.Append("ellipsis=1.0");
break;
+
+ case LineBreakMode.None:
+ break;
}
return _formattingString;
nativeSpan.FontAttributes = span.FontAttributes;
nativeSpan.FontFamily = span.FontFamily;
nativeSpan.FontSize = span.FontSize;
- nativeSpan.LineBreakMode = Control.LineBreakMode;
- nativeSpan.HorizontalTextAlignment = Control.HorizontalTextAlignment;
- nativeSpan.VerticalTextAlignment = Control.VerticalTextAlignment;
nativeSpan.ForegroundColor = span.ForegroundColor.ToNative();
nativeSpan.BackgroundColor = span.BackgroundColor.ToNative();
nativeString.Spans.Add(nativeSpan);
void UpdateTextAlignment()
{
- if (Control.FormattedText != null)
- {
- foreach (var span in Control.FormattedText.Spans)
- {
- span.HorizontalTextAlignment = Element.HorizontalTextAlignment.ToNative();
- span.VerticalTextAlignment = Element.VerticalTextAlignment.ToNative();
- }
- }
-
Control.HorizontalTextAlignment = Element.HorizontalTextAlignment.ToNative();
Control.VerticalTextAlignment = Element.VerticalTextAlignment.ToNative();
}
void UpdateLineBreakMode()
{
- if (Control.FormattedText != null)
- {
- foreach (var span in Control.FormattedText.Spans)
- {
- span.LineBreakMode = ConvertToNativeLineBreakMode(Element.LineBreakMode);
- }
- }
Control.LineBreakMode = ConvertToNativeLineBreakMode(Element.LineBreakMode);
}
void UpdateFontWeight()
{
var weight = Specific.GetFontWeight(Element);
- if (Control.FormattedText != null)
- {
- foreach (var span in Control.FormattedText.Spans)
- {
- span.FontWeight = ConvertToNativeFontWeight(weight);
- }
- }
+
Control.FontWeight = ConvertToNativeFontWeight(weight);
}