summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Native
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-06-12 10:31:00 +0200
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:37 +0900
commit66a992c24e304293ea59a465c04e25d78593f47d (patch)
tree1724fa9059324ce849afd69f7d44796f68b02f1b /Xamarin.Forms.Platform.Tizen/Native
parent0a485a818a417116226e8552fa082c9b70ead90d (diff)
downloadxamarin-forms-66a992c24e304293ea59a465c04e25d78593f47d.tar.gz
xamarin-forms-66a992c24e304293ea59a465c04e25d78593f47d.tar.bz2
xamarin-forms-66a992c24e304293ea59a465c04e25d78593f47d.zip
Initialize Button with single batch update
Change-Id: Id34604e0d228b9d94395f432471ff272eb7e251f Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Button.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Button.cs b/Xamarin.Forms.Platform.Tizen/Native/Button.cs
index a3f36a4b..5985c58b 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Button.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Button.cs
@@ -10,7 +10,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// Extends the EButton control, providing basic formatting features,
/// i.e. font color, size, additional image.
/// </summary>
- public class Button : EButton, IMeasurable
+ public class Button : EButton, IMeasurable, IBatchable
{
/// <summary>
/// Holds the formatted text of the button.
@@ -192,12 +192,20 @@ namespace Xamarin.Forms.Platform.Tizen.Native
}
}
+ void IBatchable.OnBatchCommitted()
+ {
+ ApplyTextAndStyle();
+ }
+
/// <summary>
/// Applies the button's text and its style.
/// </summary>
void ApplyTextAndStyle()
{
- SetInternalTextAndStyle(_span.GetDecoratedText(), _span.GetStyle());
+ if (!this.IsBatched())
+ {
+ SetInternalTextAndStyle(_span.GetDecoratedText(), _span.GetStyle());
+ }
}
/// <summary>