diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs index 3f26f4ea..49611e4b 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs @@ -1,5 +1,3 @@ -using Xamarin.Forms.PlatformConfiguration.TizenSpecific; - using EColor = ElmSharp.Color; using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Label; @@ -75,7 +73,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateFormattedText() { - if(Element.FormattedText != null) + if (Element.FormattedText != null) Control.FormattedText = ConvertFormattedText(Element.FormattedText); } @@ -104,9 +102,7 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateFontWeight() { - var weight = Specific.GetFontWeight(Element); - - Control.FontWeight = ConvertToNativeFontWeight(weight); + Control.FontWeight = Specific.GetFontWeight(Element); } Native.LineBreakMode ConvertToNativeLineBreakMode(LineBreakMode mode) @@ -128,36 +124,5 @@ namespace Xamarin.Forms.Platform.Tizen return Native.LineBreakMode.WordWrap; } } - - Native.FontWeight ConvertToNativeFontWeight(FontWeight weight) - { - switch (weight) - { - case FontWeight.Bold: - return Native.FontWeight.Bold; - case FontWeight.SemiBold: - return Native.FontWeight.SemiBold; - case FontWeight.UltraBold: - return Native.FontWeight.UltraBold; - case FontWeight.Black: - return Native.FontWeight.Black; - case FontWeight.ExtraBlack: - return Native.FontWeight.ExtraBlack; - case FontWeight.Book: - return Native.FontWeight.Book; - case FontWeight.Light: - return Native.FontWeight.Light; - case FontWeight.Medium: - return Native.FontWeight.Medium; - case FontWeight.Normal: - return Native.FontWeight.Normal; - case FontWeight.Thin: - return Native.FontWeight.Thin; - case FontWeight.UltraLight: - return Native.FontWeight.UltraLight; - default: - return Native.FontWeight.None; - } - } } } |