diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs index 876e7f8c..b3701d39 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs @@ -9,13 +9,13 @@ namespace Xamarin.Forms.Platform.Tizen public LabelRenderer() { - RegisterPropertyHandler(Label.TextProperty, () => Control.Text = Element.Text); + RegisterPropertyHandler(Label.TextProperty, UpdateText); RegisterPropertyHandler(Label.TextColorProperty, UpdateTextColor); // FontProperty change is called also for FontSizeProperty, FontFamilyProperty and FontAttributesProperty change RegisterPropertyHandler(Label.FontProperty, UpdateFontProperties); RegisterPropertyHandler(Label.LineBreakModeProperty, UpdateLineBreakMode); - RegisterPropertyHandler(Label.HorizontalTextAlignmentProperty, UpdateTextAlignment); - RegisterPropertyHandler(Label.VerticalTextAlignmentProperty, UpdateTextAlignment); + RegisterPropertyHandler(Label.HorizontalTextAlignmentProperty, UpdateHorizontalTextAlignment); + RegisterPropertyHandler(Label.VerticalTextAlignmentProperty, UpdateVerticalTextAlignment); RegisterPropertyHandler(Label.FormattedTextProperty, UpdateFormattedText); if (TizenPlatformServices.AppDomain.IsTizenSpecificAvailable) { @@ -77,14 +77,23 @@ namespace Xamarin.Forms.Platform.Tizen Control.FormattedText = ConvertFormattedText(Element.FormattedText); } + void UpdateText() + { + Control.Text = Element.Text; + } + void UpdateTextColor() { Control.TextColor = Element.TextColor.ToNative(); } - void UpdateTextAlignment() + void UpdateHorizontalTextAlignment() { Control.HorizontalTextAlignment = Element.HorizontalTextAlignment.ToNative(); + } + + void UpdateVerticalTextAlignment() + { Control.VerticalTextAlignment = Element.VerticalTextAlignment.ToNative(); } |