summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-06-12 10:35:25 +0200
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:28 +0900
commit3d499e232ec240e87ca5e8a1a5cf6ab2f87ea4ea (patch)
tree50532b655d43b03a6eabf79538d02e1bfd5faf6a /Xamarin.Forms.Platform.Tizen/Renderers
parent284e3e2404f18ee486160fcde9d370e02047b28a (diff)
downloadxamarin-forms-3d499e232ec240e87ca5e8a1a5cf6ab2f87ea4ea.tar.gz
xamarin-forms-3d499e232ec240e87ca5e8a1a5cf6ab2f87ea4ea.tar.bz2
xamarin-forms-3d499e232ec240e87ca5e8a1a5cf6ab2f87ea4ea.zip
Initialize Entry/Editor with a single batch update
Change-Id: Ibc7f697dfb51992040c8dbe476065ea884e33a49 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/EditorRenderer.cs8
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs8
2 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs
index b904b7da..f37566aa 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Platform.Tizen.Native;
using EColor = ElmSharp.Color;
namespace Xamarin.Forms.Platform.Tizen
@@ -37,11 +38,18 @@ namespace Xamarin.Forms.Platform.Tizen
{
Control.TextChanged += TextChanged;
Control.Unfocused += Completed;
+
+ Control.BatchBegin();
}
base.OnElementChanged(e);
}
+ protected override void OnElementReady()
+ {
+ Control?.BatchCommit();
+ }
+
void TextChanged(object sender, EventArgs e)
{
Element.Text = ((Native.Entry)sender).Text;
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs
index 3274ec3e..e54e7399 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Platform.Tizen.Native;
using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Entry;
namespace Xamarin.Forms.Platform.Tizen
@@ -47,6 +48,8 @@ namespace Xamarin.Forms.Platform.Tizen
{
Control.TextChanged += EntryChangedHandler;
Control.Activated += EntryCompletedHandler;
+
+ Control.BatchBegin();
}
base.OnElementChanged(e);
@@ -63,6 +66,11 @@ namespace Xamarin.Forms.Platform.Tizen
base.Dispose(disposing);
}
+ protected override void OnElementReady()
+ {
+ Control?.BatchCommit();
+ }
+
void EntryChangedHandler(object sender, EventArgs e)
{
Element.Text = Control.Text;