summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-02-08 14:54:28 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:29 +0900
commit15319699dd2499b5ce7a0e631ce633a5e3a350e2 (patch)
tree4ecf90753ae60eae8d3ef8243e5031a1792681e9 /Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs
parent91c0dd08a55c23c5c7366befb0ce6d4db4151c48 (diff)
downloadxamarin-forms-15319699dd2499b5ce7a0e631ce633a5e3a350e2.tar.gz
xamarin-forms-15319699dd2499b5ce7a0e631ce633a5e3a350e2.tar.bz2
xamarin-forms-15319699dd2499b5ce7a0e631ce633a5e3a350e2.zip
Add Style to VisualElement as TizenSpecific
- Implement the change proposed in RFC-17 Change-Id: I96431b3a32358be6f32e7acdeb0cbc6a27a98ec4
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs32
1 files changed, 3 insertions, 29 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs
index def27a99..eea46e80 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs
@@ -2,7 +2,7 @@ using System;
using System.ComponentModel;
using EColor = ElmSharp.Color;
using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
-using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Button;
+using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.VisualElement;
namespace Xamarin.Forms.Platform.Tizen
{
@@ -41,23 +41,11 @@ namespace Xamarin.Forms.Platform.Tizen
if (e.NewElement != null)
{
- UpdateStyle();
Control.Clicked += ButtonClickedHandler;
}
-
base.OnElementChanged(e);
}
- protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- base.OnElementPropertyChanged(sender, e);
-
- if (e.PropertyName == Specific.ButtonStyleProperty.PropertyName)
- {
- UpdateStyle();
- }
- }
-
protected override Size MinimumSize()
{
return new Size(Control.MinimumWidth, Control.MinimumHeight);
@@ -98,23 +86,9 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
- void UpdateStyle()
+ protected override void UpdateThemeStyle()
{
- string style;
- switch (Specific.GetButtonStyle(Element))
- {
- case ButtonStyle.Circle:
- style = "circle";
- break;
- case ButtonStyle.Bottom:
- style = "bottom";
- break;
- default:
- style = "default";
- break;
- }
-
- Control.UpdateStyle(style);
+ Control.UpdateStyle(Specific.GetStyle(Element));
((IVisualElementController)Element).NativeSizeChanged();
}