summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-09-26 01:17:36 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:42 (GMT)
commit4f4e2218dab0f122e5e76e689ea17cb74b04ac77 (patch)
tree578f834576218de89b599528d965ed5e2ee22680
parent13dc587597f955faddbc35ec006691e4e219e52b (diff)
downloadxamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.zip
xamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.tar.gz
xamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.tar.bz2
Reorder UpdateValue of slider renderer correctly
- TASK=TNEXT-3845, 3847, 3873 - Value shoud be placed after Min,Max values are set. Change-Id: I03bf89d896b3225a97efe809e7bc475b509065a5
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs29
1 files changed, 21 insertions, 8 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs
index db72583..162409b 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using ESlider = ElmSharp.Slider;
using ESize = ElmSharp.Size;
@@ -6,14 +7,6 @@ namespace Xamarin.Forms.Platform.Tizen
{
public class SliderRenderer : ViewRenderer<Slider, ESlider>
{
-
- public SliderRenderer()
- {
- RegisterPropertyHandler(Slider.ValueProperty, UpdateValue);
- RegisterPropertyHandler(Slider.MinimumProperty, UpdateMinimum);
- RegisterPropertyHandler(Slider.MaximumProperty, UpdateMaximum);
- }
-
protected override void OnElementChanged(ElementChangedEventArgs<Slider> e)
{
if (Control == null)
@@ -24,9 +17,29 @@ namespace Xamarin.Forms.Platform.Tizen
});
Control.ValueChanged += OnValueChanged;
}
+ UpdateMinimum();
+ UpdateMaximum();
+ UpdateValue();
base.OnElementChanged(e);
}
+ protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == Slider.MinimumProperty.PropertyName)
+ {
+ UpdateMinimum();
+ }
+ else if (e.PropertyName == Slider.MaximumProperty.PropertyName)
+ {
+ UpdateMaximum();
+ }
+ else if (e.PropertyName == Slider.ValueProperty.PropertyName)
+ {
+ UpdateValue();
+ }
+ base.OnElementPropertyChanged(sender, e);
+ }
+
protected override void Dispose(bool disposing)
{
if (disposing)