summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-01-16 09:52:05 +0100
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:28 +0900
commit0797bfc37545d5f43741fe63027d72b410d52852 (patch)
tree694796277d4a572d481875f6e8b4a9e6eb8418f4 /Xamarin.Forms.Platform.Tizen/Renderers
parent0b87fd361e90937bcf665bab0ecfbe08483da5bf (diff)
downloadxamarin-forms-0797bfc37545d5f43741fe63027d72b410d52852.tar.gz
xamarin-forms-0797bfc37545d5f43741fe63027d72b410d52852.tar.bz2
xamarin-forms-0797bfc37545d5f43741fe63027d72b410d52852.zip
Initialize Label with a single batch update
Change-Id: Id3811e8014accc2044c6422d1fab2381ac4594ed Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
index b3701d39..08547c98 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/LabelRenderer.cs
@@ -1,3 +1,4 @@
+using Xamarin.Forms.Platform.Tizen.Native;
using EColor = ElmSharp.Color;
using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Label;
@@ -37,6 +38,7 @@ namespace Xamarin.Forms.Platform.Tizen
if (e.NewElement != null)
{
+ Control.BatchBegin();
}
base.OnElementChanged(e);
@@ -47,6 +49,11 @@ namespace Xamarin.Forms.Platform.Tizen
return Control.Measure(Control.MinimumWidth, Control.MinimumHeight).ToDP();
}
+ protected override void OnElementReady()
+ {
+ Control?.BatchCommit();
+ }
+
Native.FormattedString ConvertFormattedText(FormattedString formattedString)
{
if (formattedString == null)
@@ -99,9 +106,13 @@ namespace Xamarin.Forms.Platform.Tizen
void UpdateFontProperties()
{
+ Control.BatchBegin();
+
Control.FontSize = Element.FontSize;
Control.FontAttributes = Element.FontAttributes;
Control.FontFamily = Element.FontFamily;
+
+ Control.BatchCommit();
}
void UpdateLineBreakMode()