summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-06-12 10:54:38 +0200
committerSeungkeun Lee <sngn.lee@samsung.com>2017-06-27 01:35:53 +0000
commitbaf8f27278af20dcb3525747a325334b8691f6ee (patch)
treea51c3d555b2dcb6d8f810a6271d8eac93aa9fb8f
parenteefc83ae8afe3349189996764a028368937641c9 (diff)
downloadxamarin-forms-baf8f27278af20dcb3525747a325334b8691f6ee.tar.gz
xamarin-forms-baf8f27278af20dcb3525747a325334b8691f6ee.tar.bz2
xamarin-forms-baf8f27278af20dcb3525747a325334b8691f6ee.zip
Initialize SearchBar with a single batch update
Change-Id: I88749ed075b320ad22bf7cb3d9e869d1f6c6dad6 Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs10
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs7
2 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs b/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
index 42ada16e..f2335f51 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
@@ -330,6 +330,16 @@ namespace Xamarin.Forms.Platform.Tizen.Native
return new ESize(width, BackgroundHeight);
}
+ internal void BatchBegin()
+ {
+ _entry.BatchBegin();
+ }
+
+ internal void BatchCommit()
+ {
+ _entry.BatchCommit();
+ }
+
/// <summary>
/// Handles the event triggered by the cancel button being clicked.
/// </summary>
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
index 3c9734db..30a2546c 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
@@ -51,6 +51,8 @@ namespace Xamarin.Forms.Platform.Tizen
{
Control.TextChanged += SearchBarTextChangedHandler;
Control.SearchButtonPressed += SearchButtonPressedHandler;
+
+ Control.BatchBegin();
}
base.OnElementChanged(e);
@@ -61,6 +63,11 @@ namespace Xamarin.Forms.Platform.Tizen
return new Size(136, 65);
}
+ protected override void OnElementReady()
+ {
+ Control?.BatchCommit();
+ }
+
/// <summary>
/// Called upon changing of Xamarin widget's cancel button color property.
/// Converts current Color to ElmSharp.Color instance and sets it in the underlying Xamarin.Forms.Platform.Tizen.Native widget.