diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-09-26 10:17:36 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-10-23 13:34:42 +0900 |
commit | 4f4e2218dab0f122e5e76e689ea17cb74b04ac77 (patch) | |
tree | 578f834576218de89b599528d965ed5e2ee22680 /Xamarin.Forms.Platform.Tizen | |
parent | 13dc587597f955faddbc35ec006691e4e219e52b (diff) | |
download | xamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.tar.gz xamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.tar.bz2 xamarin-forms-4f4e2218dab0f122e5e76e689ea17cb74b04ac77.zip |
Reorder UpdateValue of slider renderer correctly
- TASK=TNEXT-3845, 3847, 3873
- Value shoud be placed after Min,Max values are set.
Change-Id: I03bf89d896b3225a97efe809e7bc475b509065a5
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Renderers/SliderRenderer.cs | 29 |
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 db725830..162409b1 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) |