2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using Tizen.NUI.BaseComponents;
19 using System.ComponentModel;
21 namespace Tizen.NUI.Components
24 /// A slider lets users select a value from a continuous or discrete range of values by moving the slider thumb.
26 /// <since_tizen> 6 </since_tizen>
27 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class Slider : Control
31 // the background track image object
32 private ImageView bgTrackImage = null;
33 // the slided track image object
34 private ImageView slidedTrackImage = null;
35 // the thumb image object
36 private ImageView thumbImage = null;
37 // the background thumb image object
38 private ImageView bgThumbImage = null;
39 // the low indicator image object
40 private ImageView lowIndicatorImage = null;
41 // the high indicator image object
42 private ImageView highIndicatorImage = null;
43 // the low indicator text object
44 private TextLabel lowIndicatorText = null;
45 // the high indicator text object
46 private TextLabel highIndicatorText = null;
47 // the attributes of the slider
48 private SliderAttributes sliderAttrs = null;
50 private DirectionType direction = DirectionType.Horizontal;
52 private IndicatorType indicatorType = IndicatorType.None;
53 private const float round = 0.5f;
55 private float? minValue = null;
57 private float? maxValue = null;
59 private float? curValue = null;
60 // the size of the low indicator
61 private Size2D lowIndicatorSize = null;
62 // the size of the high indicator
63 private Size2D highIndicatorSize = null;
64 // the track thickness value
65 private uint? trackThickness = null;
66 // the value of the space between track and indicator object
67 private uint? spaceBetweenTrackAndIndicator = null;
69 private PanGestureDetector panGestureDetector = null;
70 private float currentSlidedOffset;
71 private EventHandler<ValueChangedArgs> valueChangedHandler;
72 private EventHandler<SlidingFinishedArgs> slidingFinishedHandler;
73 private EventHandler<StateChangedArgs> stateChangedHandler;
75 bool isFocused = false;
76 bool isPressed = false;
79 /// The constructor of the Slider class.
81 /// <since_tizen> 6 </since_tizen>
82 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
83 [EditorBrowsable(EditorBrowsableState.Never)]
90 /// The constructor of the Slider class with specific style.
92 /// <param name="style">The string to initialize the Slider</param>
93 /// <since_tizen> 6 </since_tizen>
94 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
95 [EditorBrowsable(EditorBrowsableState.Never)]
96 public Slider(string style) : base(style)
102 /// The constructor of the Slider class with specific Attributes.
104 /// <param name="attributes">The Attributes object to initialize the Slider</param>
105 /// <since_tizen> 6 </since_tizen>
106 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
107 [EditorBrowsable(EditorBrowsableState.Never)]
108 public Slider(SliderAttributes attributes) : base(attributes)
114 /// The value changed event handler.
116 /// <since_tizen> 6 </since_tizen>
117 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public event EventHandler<ValueChangedArgs> ValueChangedEvent
123 valueChangedHandler += value;
127 valueChangedHandler -= value;
132 /// The sliding finished event handler.
134 /// <since_tizen> 6 </since_tizen>
135 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public event EventHandler<SlidingFinishedArgs> SlidingFinishedEvent
141 slidingFinishedHandler += value;
145 slidingFinishedHandler -= value;
150 /// The state changed event handler.
152 /// <since_tizen> 6 </since_tizen>
153 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
154 [EditorBrowsable(EditorBrowsableState.Never)]
155 public event EventHandler<StateChangedArgs> StateChangedEvent
159 stateChangedHandler += value;
163 stateChangedHandler -= value;
168 /// The direction type of slider.
170 /// <since_tizen> 6 </since_tizen>
171 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
172 [EditorBrowsable(EditorBrowsableState.Never)]
173 public enum DirectionType
176 /// The Horizontal type.
178 /// <since_tizen> 6 </since_tizen>
179 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
180 [EditorBrowsable(EditorBrowsableState.Never)]
184 /// The Vertical type.
186 /// <since_tizen> 6 </since_tizen>
187 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
188 [EditorBrowsable(EditorBrowsableState.Never)]
193 /// The indicator type of slider.
195 /// <since_tizen> 6 </since_tizen>
196 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
197 [EditorBrowsable(EditorBrowsableState.Never)]
198 public enum IndicatorType
200 /// <summary> Only contains slider bar.</summary>
201 /// <since_tizen> 6 </since_tizen>
202 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
203 [EditorBrowsable(EditorBrowsableState.Never)]
206 /// <summary> Contains slider bar, IndicatorImage.</summary>
207 /// <since_tizen> 6 </since_tizen>
208 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
209 [EditorBrowsable(EditorBrowsableState.Never)]
212 /// <summary> Contains slider bar, IndicatorText.</summary>
213 /// <since_tizen> 6 </since_tizen>
214 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
215 [EditorBrowsable(EditorBrowsableState.Never)]
220 /// Gets or sets the direction type of slider.
222 /// <since_tizen> 6 </since_tizen>
223 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
224 [EditorBrowsable(EditorBrowsableState.Never)]
225 public DirectionType Direction
233 if (direction == value)
238 RelayoutBaseComponent(false);
240 UpdateBgTrackPosition();
246 /// Gets or sets the indicator type, arrow or sign.
248 /// <since_tizen> 6 </since_tizen>
249 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public IndicatorType Indicator
255 return indicatorType;
259 if (indicatorType == value)
263 indicatorType = value;
264 RelayoutBaseComponent(false);
266 UpdateBgTrackPosition();
272 /// Gets or sets the minimum value of slider.
274 /// <since_tizen> 6 </since_tizen>
275 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
276 [EditorBrowsable(EditorBrowsableState.Never)]
277 public float MinValue
281 return minValue ?? 0;
291 /// Gets or sets the maximum value of slider.
293 /// <since_tizen> 6 </since_tizen>
294 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
295 [EditorBrowsable(EditorBrowsableState.Never)]
296 public float MaxValue
300 return maxValue ?? 100;
310 /// Gets or sets the current value of slider.
312 /// <since_tizen> 6 </since_tizen>
313 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
314 [EditorBrowsable(EditorBrowsableState.Never)]
315 public float CurrentValue
319 return curValue ?? 0;
329 /// Gets or sets the size of the thumb image object.
331 /// <since_tizen> 6 </since_tizen>
332 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public Size2D ThumbSize
338 return sliderAttrs.ThumbAttributes?.Size2D;
342 CreateThumbAttributes();
343 sliderAttrs.ThumbAttributes.Size2D = value;
349 /// Gets or sets the resource url selector of the thumb image background object.
351 /// <since_tizen> 6 </since_tizen>
352 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
353 [EditorBrowsable(EditorBrowsableState.Never)]
354 public StringSelector ThumbImageBackgroundURLSelector
358 return sliderAttrs.ThumbBackgroundAttributes?.ResourceURL;
362 CreateThumbBackgroundAttributes();
365 sliderAttrs.ThumbBackgroundAttributes.ResourceURL = value.Clone() as StringSelector;
372 /// Gets or sets the resource url of the thumb image object.
374 /// <since_tizen> 6 </since_tizen>
375 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public string ThumbImageURL
381 return sliderAttrs.ThumbAttributes?.ResourceURL?.All;
385 CreateThumbAttributes();
386 if (sliderAttrs.ThumbAttributes.ResourceURL == null)
388 sliderAttrs.ThumbAttributes.ResourceURL = new StringSelector();
390 sliderAttrs.ThumbAttributes.ResourceURL.All = value;
396 /// Gets or sets the resource url selector of the thumb image object.
398 /// <since_tizen> 6 </since_tizen>
399 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
400 [EditorBrowsable(EditorBrowsableState.Never)]
401 public StringSelector ThumbImageURLSelector
405 return sliderAttrs.ThumbAttributes?.ResourceURL;
409 CreateThumbAttributes();
412 sliderAttrs.ThumbAttributes.ResourceURL = value.Clone() as StringSelector;
419 /// Gets or sets the color of the background track image object.
421 /// <since_tizen> 6 </since_tizen>
422 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public Color BgTrackColor
428 return sliderAttrs.BackgroundTrackAttributes?.BackgroundColor?.All;
432 CreateBackgroundTrackAttributes();
433 if (sliderAttrs.BackgroundTrackAttributes.BackgroundColor == null)
435 sliderAttrs.BackgroundTrackAttributes.BackgroundColor = new ColorSelector();
437 sliderAttrs.BackgroundTrackAttributes.BackgroundColor.All = value;
443 /// Gets or sets the color of the slided track image object.
445 /// <since_tizen> 6 </since_tizen>
446 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
447 [EditorBrowsable(EditorBrowsableState.Never)]
448 public Color SlidedTrackColor
452 return sliderAttrs.SlidedTrackAttributes?.BackgroundColor?.All;
456 CreateSlidedTrackAttributes();
457 if (sliderAttrs.SlidedTrackAttributes.BackgroundColor == null)
459 sliderAttrs.SlidedTrackAttributes.BackgroundColor = new ColorSelector();
461 sliderAttrs.SlidedTrackAttributes.BackgroundColor.All = value;
467 /// Gets or sets the thickness value of the track.
469 /// <since_tizen> 6 </since_tizen>
470 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
471 [EditorBrowsable(EditorBrowsableState.Never)]
472 public uint TrackThickness
476 return trackThickness ?? 0;
480 trackThickness = value;
481 if (bgTrackImage != null)
483 if (direction == DirectionType.Horizontal)
485 bgTrackImage.SizeHeight = (float)trackThickness.Value;
487 else if (direction == DirectionType.Vertical)
489 bgTrackImage.SizeWidth = (float)trackThickness.Value;
492 if (slidedTrackImage != null)
494 if (direction == DirectionType.Horizontal)
496 slidedTrackImage.SizeHeight = (float)trackThickness.Value;
498 else if (direction == DirectionType.Vertical)
500 slidedTrackImage.SizeWidth = (float)trackThickness.Value;
507 /// Gets or sets the resource url of the low indicator image object.
509 /// <since_tizen> 6 </since_tizen>
510 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
511 [EditorBrowsable(EditorBrowsableState.Never)]
512 public string LowIndicatorImageURL
516 return sliderAttrs.LowIndicatorImageAttributes?.ResourceURL?.All;
520 CreateLowIndicatorImageAttributes();
521 if (sliderAttrs.LowIndicatorImageAttributes.ResourceURL == null)
523 sliderAttrs.LowIndicatorImageAttributes.ResourceURL = new StringSelector();
525 sliderAttrs.LowIndicatorImageAttributes.ResourceURL.All = value;
531 /// Gets or sets the resource url of the high indicator image object.
533 /// <since_tizen> 6 </since_tizen>
534 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
535 [EditorBrowsable(EditorBrowsableState.Never)]
536 public string HighIndicatorImageURL
540 return sliderAttrs.HighIndicatorImageAttributes?.ResourceURL?.All;
544 CreateHighIndicatorImageAttributes();
545 if (sliderAttrs.HighIndicatorImageAttributes.ResourceURL == null)
547 sliderAttrs.HighIndicatorImageAttributes.ResourceURL = new StringSelector();
549 sliderAttrs.HighIndicatorImageAttributes.ResourceURL.All = value;
555 /// Gets or sets the text content of the low indicator text object.
557 /// <since_tizen> 6 </since_tizen>
558 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
559 [EditorBrowsable(EditorBrowsableState.Never)]
560 public string LowIndicatorTextContent
564 return sliderAttrs.LowIndicatorTextAttributes?.Text?.All;
568 CreateLowIndicatorTextAttributes();
569 if (sliderAttrs.LowIndicatorTextAttributes.Text == null)
571 sliderAttrs.LowIndicatorTextAttributes.Text = new StringSelector();
573 sliderAttrs.LowIndicatorTextAttributes.Text.All = value;
579 /// Gets or sets the text content of the high indicator text object.
581 /// <since_tizen> 6 </since_tizen>
582 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
583 [EditorBrowsable(EditorBrowsableState.Never)]
584 public string HighIndicatorTextContent
588 return sliderAttrs.HighIndicatorTextAttributes?.Text?.All;
592 CreateHighIndicatorTextAttributes();
593 if (sliderAttrs.HighIndicatorTextAttributes.Text == null)
595 sliderAttrs.HighIndicatorTextAttributes.Text = new StringSelector();
597 sliderAttrs.HighIndicatorTextAttributes.Text.All = value;
603 /// Gets or sets the size of the low indicator object(image or text).
605 /// <since_tizen> 6 </since_tizen>
606 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
607 [EditorBrowsable(EditorBrowsableState.Never)]
608 public Size2D LowIndicatorSize
612 return lowIndicatorSize;
616 lowIndicatorSize = value;
617 UpdateLowIndicatorSize();
619 UpdateBgTrackPosition();
625 /// Gets or sets the size of the high indicator object(image or text).
627 /// <since_tizen> 6 </since_tizen>
628 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
629 [EditorBrowsable(EditorBrowsableState.Never)]
630 public Size2D HighIndicatorSize
634 return highIndicatorSize;
638 highIndicatorSize = value;
639 UpdateHighIndicatorSize();
641 UpdateBgTrackPosition();
647 /// Gets or sets the value of the space between track and indicator.
649 /// <since_tizen> 6 </since_tizen>
650 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
651 [EditorBrowsable(EditorBrowsableState.Never)]
652 public uint SpaceBetweenTrackAndIndicator
656 return spaceBetweenTrackAndIndicator.Value;
660 spaceBetweenTrackAndIndicator = value;
661 UpdateComponentByIndicatorTypeChanged();
663 UpdateBgTrackPosition();
669 /// Focus gained callback.
671 /// <since_tizen> 6 </since_tizen>
672 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
673 [EditorBrowsable(EditorBrowsableState.Never)]
674 public override void OnFocusGained()
676 //State = ControlStates.Focused;
677 UpdateState(true, isPressed);
678 base.OnFocusGained();
682 /// Focus Lost callback.
684 /// <since_tizen> 6 </since_tizen>
685 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
686 [EditorBrowsable(EditorBrowsableState.Never)]
687 public override void OnFocusLost()
689 //State = ControlStates.Normal;
690 UpdateState(false, isPressed);
695 /// Get Slider attribues.
697 /// <since_tizen> 6 </since_tizen>
698 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
699 [EditorBrowsable(EditorBrowsableState.Never)]
700 protected override Attributes GetAttributes()
702 return new SliderAttributes();
708 /// <param name="type">Dispose type.</param>
709 /// <since_tizen> 6 </since_tizen>
710 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
711 [EditorBrowsable(EditorBrowsableState.Never)]
712 protected override void Dispose(DisposeTypes type)
719 if (type == DisposeTypes.Explicit)
721 if (null != panGestureDetector)
723 if (null != thumbImage)
725 panGestureDetector.Detach(thumbImage);
727 panGestureDetector.Detected -= OnPanGestureDetected;
728 panGestureDetector.Dispose();
729 panGestureDetector = null;
732 if (null != thumbImage)
734 thumbImage.TouchEvent -= OnTouchEventForThumb;
735 Utility.Dispose(thumbImage);
737 Utility.Dispose(bgThumbImage);
738 Utility.Dispose(slidedTrackImage);
739 if (null != bgTrackImage)
741 bgTrackImage.TouchEvent -= OnTouchEventForBgTrack;
742 Utility.Dispose(bgTrackImage);
744 Utility.Dispose(lowIndicatorImage);
745 Utility.Dispose(highIndicatorImage);
746 Utility.Dispose(lowIndicatorText);
747 Utility.Dispose(highIndicatorText);
754 /// Update Slider by attributes.
756 /// <since_tizen> 6 </since_tizen>
757 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 protected override void OnUpdate()
761 if (sliderAttrs.BackgroundTrackAttributes != null && bgTrackImage == null)
763 bgTrackImage = new ImageView()
765 WidthResizePolicy = ResizePolicyType.Fixed,
766 HeightResizePolicy = ResizePolicyType.Fixed,
767 ParentOrigin = Tizen.NUI.ParentOrigin.Center,
768 PivotPoint = Tizen.NUI.PivotPoint.Center,
769 PositionUsesPivotPoint = true
771 this.Add(bgTrackImage);
772 bgTrackImage.TouchEvent += OnTouchEventForBgTrack;
774 if (sliderAttrs.SlidedTrackAttributes != null && slidedTrackImage == null)
776 slidedTrackImage = new ImageView()
778 WidthResizePolicy = ResizePolicyType.Fixed,
779 HeightResizePolicy = ResizePolicyType.Fixed
781 if (bgTrackImage != null)
783 bgTrackImage.Add(slidedTrackImage);
786 if (sliderAttrs.ThumbBackgroundAttributes != null && bgThumbImage == null)
788 bgThumbImage = new ImageView()
790 WidthResizePolicy = ResizePolicyType.Fixed,
791 HeightResizePolicy = ResizePolicyType.Fixed
793 if (slidedTrackImage != null)
795 slidedTrackImage.Add(bgThumbImage);
798 if (sliderAttrs.ThumbAttributes != null && thumbImage == null)
800 thumbImage = new ImageView()
802 WidthResizePolicy = ResizePolicyType.FillToParent,
803 HeightResizePolicy = ResizePolicyType.FillToParent,
804 ParentOrigin = NUI.ParentOrigin.Center,
805 PivotPoint = NUI.PivotPoint.Center,
806 PositionUsesPivotPoint = true
808 if (bgThumbImage != null)
810 bgThumbImage.Add(thumbImage);
812 thumbImage.TouchEvent += OnTouchEventForThumb;
814 panGestureDetector = new PanGestureDetector();
815 panGestureDetector.Attach(thumbImage);
816 panGestureDetector.Detected += OnPanGestureDetected;
818 if (sliderAttrs.LowIndicatorImageAttributes != null && lowIndicatorImage == null)
820 lowIndicatorImage = new ImageView()
822 WidthResizePolicy = ResizePolicyType.Fixed,
823 HeightResizePolicy = ResizePolicyType.Fixed
825 this.Add(lowIndicatorImage);
827 if (sliderAttrs.HighIndicatorImageAttributes != null && highIndicatorImage == null)
829 highIndicatorImage = new ImageView()
831 WidthResizePolicy = ResizePolicyType.Fixed,
832 HeightResizePolicy = ResizePolicyType.Fixed
834 this.Add(highIndicatorImage);
836 if (sliderAttrs.LowIndicatorTextAttributes != null && lowIndicatorText == null)
838 lowIndicatorText = new TextLabel()
840 WidthResizePolicy = ResizePolicyType.Fixed,
841 HeightResizePolicy = ResizePolicyType.Fixed
843 this.Add(lowIndicatorText);
845 if (sliderAttrs.HighIndicatorTextAttributes != null && highIndicatorText == null)
847 highIndicatorText = new TextLabel()
849 WidthResizePolicy = ResizePolicyType.Fixed,
850 HeightResizePolicy = ResizePolicyType.Fixed
852 this.Add(highIndicatorText);
855 ApplyAttributes(bgTrackImage, sliderAttrs.BackgroundTrackAttributes);
856 ApplyAttributes(slidedTrackImage, sliderAttrs.SlidedTrackAttributes);
857 ApplyAttributes(bgThumbImage, sliderAttrs.ThumbBackgroundAttributes);
858 ApplyAttributes(thumbImage, sliderAttrs.ThumbAttributes);
859 ApplyAttributes(lowIndicatorImage, sliderAttrs.LowIndicatorImageAttributes);
860 ApplyAttributes(highIndicatorImage, sliderAttrs.HighIndicatorImageAttributes);
861 ApplyAttributes(lowIndicatorText, sliderAttrs.LowIndicatorTextAttributes);
862 ApplyAttributes(highIndicatorText, sliderAttrs.HighIndicatorTextAttributes);
864 RelayoutBaseComponent();
866 UpdateComponentByIndicatorTypeChanged();
868 UpdateBgTrackPosition();
869 UpdateLowIndicatorSize();
870 UpdateHighIndicatorSize();
875 /// Theme change callback when theme is changed, this callback will be trigger.
877 /// <param name="sender">serder object</param>
878 /// <param name="e">ThemeChangeEventArgs</param>
879 /// <since_tizen> 6 </since_tizen>
880 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
881 [EditorBrowsable(EditorBrowsableState.Never)]
882 protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
884 SliderAttributes tempAttributes = StyleManager.Instance.GetAttributes(style) as SliderAttributes;
885 if (tempAttributes != null)
887 attributes = sliderAttrs = tempAttributes;
892 private void Initialize()
894 sliderAttrs = attributes as SliderAttributes;
895 if (null == sliderAttrs)
897 throw new Exception("Fail to get the slider attributes.");
900 ApplyAttributes(this, sliderAttrs);
902 currentSlidedOffset = 0;
905 LayoutDirectionChanged += OnLayoutDirectionChanged;
908 private void OnLayoutDirectionChanged(object sender, LayoutDirectionChangedEventArgs e)
913 private void CreateSlidedTrackAttributes()
915 if (null == sliderAttrs.SlidedTrackAttributes)
917 sliderAttrs.SlidedTrackAttributes = new ImageAttributes();
921 private void CreateLowIndicatorImageAttributes()
923 if (null == sliderAttrs.LowIndicatorImageAttributes)
925 sliderAttrs.LowIndicatorImageAttributes = new ImageAttributes();
929 private void CreateLowIndicatorTextAttributes()
931 if (null == sliderAttrs.LowIndicatorTextAttributes)
933 sliderAttrs.LowIndicatorTextAttributes = new TextAttributes();
937 private void CreateHighIndicatorTextAttributes()
939 if (null == sliderAttrs.HighIndicatorTextAttributes)
941 sliderAttrs.HighIndicatorTextAttributes = new TextAttributes();
945 private void CreateHighIndicatorImageAttributes()
947 if (null == sliderAttrs.HighIndicatorImageAttributes)
949 sliderAttrs.HighIndicatorImageAttributes = new ImageAttributes();
953 private void CreateBackgroundTrackAttributes()
955 if (null == sliderAttrs.BackgroundTrackAttributes)
957 sliderAttrs.BackgroundTrackAttributes = new ImageAttributes();
961 private void CreateThumbAttributes()
963 if (null == sliderAttrs.ThumbAttributes)
965 sliderAttrs.ThumbAttributes = new ImageAttributes();
969 private void CreateThumbBackgroundAttributes()
971 if (null == sliderAttrs.ThumbBackgroundAttributes)
973 sliderAttrs.ThumbBackgroundAttributes = new ImageAttributes();
977 private void OnPanGestureDetected(object source, PanGestureDetector.DetectedEventArgs e)
979 if (e.PanGesture.State == Gesture.StateType.Started)
981 if (direction == DirectionType.Horizontal)
983 currentSlidedOffset = slidedTrackImage.SizeWidth;
985 else if (direction == DirectionType.Vertical)
987 currentSlidedOffset = slidedTrackImage.SizeHeight;
989 UpdateState(isFocused, true);
992 if (e.PanGesture.State == Gesture.StateType.Continuing || e.PanGesture.State == Gesture.StateType.Started)
994 if (direction == DirectionType.Horizontal)
996 CalculateCurrentValueByGesture(e.PanGesture.Displacement.X);
998 else if (direction == DirectionType.Vertical)
1000 CalculateCurrentValueByGesture(-e.PanGesture.Displacement.Y);
1005 if (e.PanGesture.State == Gesture.StateType.Finished)
1007 if (null != slidingFinishedHandler)
1009 SlidingFinishedArgs args = new SlidingFinishedArgs();
1010 args.CurrentValue = curValue.Value;
1011 slidingFinishedHandler(this, args);
1014 UpdateState(isFocused, false);
1018 // Relayout basic component: track, thumb and indicator
1019 private void RelayoutBaseComponent(bool isInitial = true)
1021 if (direction == DirectionType.Horizontal)
1023 if (slidedTrackImage != null)
1025 slidedTrackImage.ParentOrigin = NUI.ParentOrigin.CenterLeft;
1026 slidedTrackImage.PivotPoint = NUI.PivotPoint.CenterLeft;
1027 slidedTrackImage.PositionUsesPivotPoint = true;
1029 if (bgThumbImage != null)
1031 bgThumbImage.ParentOrigin = NUI.ParentOrigin.CenterRight;
1032 bgThumbImage.PivotPoint = NUI.PivotPoint.Center;
1033 bgThumbImage.PositionUsesPivotPoint = true;
1035 if (lowIndicatorImage != null)
1037 lowIndicatorImage.ParentOrigin = NUI.ParentOrigin.CenterLeft;
1038 lowIndicatorImage.PivotPoint = NUI.PivotPoint.CenterLeft;
1039 lowIndicatorImage.PositionUsesPivotPoint = true;
1041 if (highIndicatorImage != null)
1043 highIndicatorImage.ParentOrigin = NUI.ParentOrigin.CenterRight;
1044 highIndicatorImage.PivotPoint = NUI.PivotPoint.CenterRight;
1045 highIndicatorImage.PositionUsesPivotPoint = true;
1047 if (lowIndicatorText != null)
1049 lowIndicatorText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
1050 lowIndicatorText.PivotPoint = NUI.PivotPoint.CenterLeft;
1051 lowIndicatorText.PositionUsesPivotPoint = true;
1053 if (highIndicatorText != null)
1055 highIndicatorText.ParentOrigin = NUI.ParentOrigin.CenterRight;
1056 highIndicatorText.PivotPoint = NUI.PivotPoint.CenterRight;
1057 highIndicatorText.PositionUsesPivotPoint = true;
1059 if (panGestureDetector != null)
1063 panGestureDetector.RemoveDirection(PanGestureDetector.DirectionVertical);
1065 panGestureDetector.AddDirection(PanGestureDetector.DirectionHorizontal);
1068 else if (direction == DirectionType.Vertical)
1070 if (slidedTrackImage != null)
1072 slidedTrackImage.ParentOrigin = NUI.ParentOrigin.BottomCenter;
1073 slidedTrackImage.PivotPoint = NUI.PivotPoint.BottomCenter;
1074 slidedTrackImage.PositionUsesPivotPoint = true;
1076 if (bgThumbImage != null)
1078 bgThumbImage.ParentOrigin = NUI.ParentOrigin.TopCenter;
1079 bgThumbImage.PivotPoint = NUI.PivotPoint.Center;
1080 bgThumbImage.PositionUsesPivotPoint = true;
1082 if (lowIndicatorImage != null)
1084 lowIndicatorImage.ParentOrigin = NUI.ParentOrigin.BottomCenter;
1085 lowIndicatorImage.PivotPoint = NUI.PivotPoint.BottomCenter;
1086 lowIndicatorImage.PositionUsesPivotPoint = true;
1088 if (highIndicatorImage != null)
1090 highIndicatorImage.ParentOrigin = NUI.ParentOrigin.TopCenter;
1091 highIndicatorImage.PivotPoint = NUI.PivotPoint.TopCenter;
1092 highIndicatorImage.PositionUsesPivotPoint = true;
1094 if (lowIndicatorText != null)
1096 lowIndicatorText.ParentOrigin = NUI.ParentOrigin.BottomCenter;
1097 lowIndicatorText.PivotPoint = NUI.PivotPoint.BottomCenter;
1098 lowIndicatorText.PositionUsesPivotPoint = true;
1100 if (highIndicatorText != null)
1102 highIndicatorText.ParentOrigin = NUI.ParentOrigin.TopCenter;
1103 highIndicatorText.PivotPoint = NUI.PivotPoint.TopCenter;
1104 highIndicatorText.PositionUsesPivotPoint = true;
1106 if (panGestureDetector != null)
1110 panGestureDetector.RemoveDirection(PanGestureDetector.DirectionHorizontal);
1112 panGestureDetector.AddDirection(PanGestureDetector.DirectionVertical);
1117 private int BgTrackLength()
1119 int bgTrackLength = 0;
1120 IndicatorType type = CurrentIndicatorType();
1122 if (type == IndicatorType.None)
1124 if (direction == DirectionType.Horizontal)
1126 bgTrackLength = this.Size2D.Width;
1128 else if (direction == DirectionType.Vertical)
1130 bgTrackLength = this.Size2D.Height;
1133 else if (type == IndicatorType.Image)
1134 {// <lowIndicatorImage> <spaceBetweenTrackAndIndicator> <bgTrack> <spaceBetweenTrackAndIndicator> <highIndicatorImage>
1135 Size2D lowIndicatorImageSize = LowIndicatorImageSize();
1136 Size2D highIndicatorImageSize = HighIndicatorImageSize();
1137 int curSpace = (int)CurrentSpaceBetweenTrackAndIndicator();
1138 if (direction == DirectionType.Horizontal)
1140 int lowIndicatorSpace = ((lowIndicatorImageSize.Width == 0) ? (0) : (curSpace + lowIndicatorImageSize.Width));
1141 int highIndicatorSpace = ((highIndicatorImageSize.Width == 0) ? (0) : (curSpace + highIndicatorImageSize.Width));
1142 bgTrackLength = this.Size2D.Width - lowIndicatorSpace - highIndicatorSpace;
1144 else if (direction == DirectionType.Vertical)
1146 int lowIndicatorSpace = ((lowIndicatorImageSize.Height == 0) ? (0) : (curSpace + lowIndicatorImageSize.Height));
1147 int highIndicatorSpace = ((highIndicatorImageSize.Height == 0) ? (0) : (curSpace + highIndicatorImageSize.Height));
1148 bgTrackLength = this.Size2D.Height - lowIndicatorSpace - highIndicatorSpace;
1151 else if (type == IndicatorType.Text)
1152 {// <lowIndicatorText> <spaceBetweenTrackAndIndicator> <bgTrack> <spaceBetweenTrackAndIndicator> <highIndicatorText>
1153 Size2D lowIndicatorTextSize = LowIndicatorTextSize();
1154 Size2D highIndicatorTextSize = HighIndicatorTextSize();
1155 int curSpace = (int)CurrentSpaceBetweenTrackAndIndicator();
1156 if (direction == DirectionType.Horizontal)
1158 int lowIndicatorSpace = ((lowIndicatorTextSize.Width == 0) ? (0) : (curSpace + lowIndicatorTextSize.Width));
1159 int highIndicatorSpace = ((highIndicatorTextSize.Width == 0) ? (0) : (curSpace + highIndicatorTextSize.Width));
1160 bgTrackLength = this.Size2D.Width - lowIndicatorSpace - highIndicatorSpace;
1162 else if (direction == DirectionType.Vertical)
1164 int lowIndicatorSpace = ((lowIndicatorTextSize.Height == 0) ? (0) : (curSpace + lowIndicatorTextSize.Height));
1165 int highIndicatorSpace = ((highIndicatorTextSize.Height == 0) ? (0) : (curSpace + highIndicatorTextSize.Height));
1166 bgTrackLength = this.Size2D.Height - lowIndicatorSpace - highIndicatorSpace;
1169 return bgTrackLength;
1172 private void UpdateLowIndicatorSize()
1174 if (lowIndicatorSize != null)
1176 if (lowIndicatorImage != null)
1178 lowIndicatorImage.Size2D = lowIndicatorSize;
1180 if (lowIndicatorText != null)
1182 lowIndicatorText.Size2D = lowIndicatorSize;
1187 if (lowIndicatorImage != null && sliderAttrs != null && sliderAttrs.LowIndicatorImageAttributes != null && sliderAttrs.LowIndicatorImageAttributes.Size2D != null)
1189 lowIndicatorImage.Size2D = sliderAttrs.LowIndicatorImageAttributes.Size2D;
1191 if (lowIndicatorText != null && sliderAttrs != null && sliderAttrs.LowIndicatorTextAttributes != null && sliderAttrs.LowIndicatorTextAttributes.Size2D != null)
1193 lowIndicatorText.Size2D = sliderAttrs.LowIndicatorTextAttributes.Size2D;
1198 private void UpdateHighIndicatorSize()
1200 if (highIndicatorSize != null)
1202 if (highIndicatorImage != null)
1204 highIndicatorImage.Size2D = highIndicatorSize;
1206 if (highIndicatorText != null)
1208 highIndicatorText.Size2D = highIndicatorSize;
1213 if (highIndicatorImage != null && sliderAttrs != null && sliderAttrs.HighIndicatorImageAttributes != null && sliderAttrs.HighIndicatorImageAttributes.Size2D != null)
1215 highIndicatorImage.Size2D = sliderAttrs.HighIndicatorImageAttributes.Size2D;
1217 if (highIndicatorText != null && sliderAttrs != null && sliderAttrs.HighIndicatorTextAttributes != null && sliderAttrs.HighIndicatorTextAttributes.Size2D != null)
1219 highIndicatorText.Size2D = sliderAttrs.HighIndicatorTextAttributes.Size2D;
1224 private void UpdateBgTrackSize()
1226 if(bgTrackImage == null)
1230 int curTrackThickness = (int)CurrentTrackThickness();
1231 int bgTrackLength = BgTrackLength();
1232 if (direction == DirectionType.Horizontal)
1234 bgTrackImage.Size2D = new Size2D(bgTrackLength, curTrackThickness);
1236 else if (direction == DirectionType.Vertical)
1238 bgTrackImage.Size2D = new Size2D(curTrackThickness, bgTrackLength);
1242 private void UpdateBgTrackPosition()
1244 if (bgTrackImage == null)
1248 IndicatorType type = CurrentIndicatorType();
1250 if (type == IndicatorType.None)
1252 bgTrackImage.Position2D = new Position2D(0, 0);
1254 else if (type == IndicatorType.Image)
1256 Size2D lowIndicatorImageSize = LowIndicatorImageSize();
1257 Size2D highIndicatorImageSize = HighIndicatorImageSize();
1258 int curSpace = (int)CurrentSpaceBetweenTrackAndIndicator();
1259 if (direction == DirectionType.Horizontal)
1261 int lowIndicatorSpace = ((lowIndicatorImageSize.Width == 0) ? (0) : (curSpace + lowIndicatorImageSize.Width));
1262 int highIndicatorSpace = ((highIndicatorImageSize.Width == 0) ? (0) : (curSpace + highIndicatorImageSize.Width));
1263 bgTrackImage.Position2D = new Position2D(lowIndicatorSpace - (lowIndicatorSpace + highIndicatorSpace) / 2, 0);
1265 else if (direction == DirectionType.Vertical)
1267 int lowIndicatorSpace = ((lowIndicatorImageSize.Height == 0) ? (0) : (curSpace + lowIndicatorImageSize.Height));
1268 int highIndicatorSpace = ((highIndicatorImageSize.Height == 0) ? (0) : (curSpace + highIndicatorImageSize.Height));
1269 bgTrackImage.Position2D = new Position2D(0, lowIndicatorSpace - (lowIndicatorSpace + highIndicatorSpace) / 2);
1272 else if (type == IndicatorType.Text)
1274 Size2D lowIndicatorTextSize = LowIndicatorTextSize();
1275 Size2D highIndicatorTextSize = HighIndicatorTextSize();
1276 int curSpace = (int)CurrentSpaceBetweenTrackAndIndicator();
1277 if (direction == DirectionType.Horizontal)
1279 int lowIndicatorSpace = ((lowIndicatorTextSize.Width == 0) ? (0) : (curSpace + lowIndicatorTextSize.Width));
1280 int highIndicatorSpace = ((highIndicatorTextSize.Width == 0) ? (0) : (curSpace + highIndicatorTextSize.Width));
1281 bgTrackImage.Position2D = new Position2D(lowIndicatorSpace - (lowIndicatorSpace + highIndicatorSpace) / 2, 0);
1283 else if (direction == DirectionType.Vertical)
1285 int lowIndicatorSpace = ((lowIndicatorTextSize.Height == 0) ? (0) : (curSpace + lowIndicatorTextSize.Height));
1286 int highIndicatorSpace = ((highIndicatorTextSize.Height == 0) ? (0) : (curSpace + highIndicatorTextSize.Height));
1287 bgTrackImage.Position2D = new Position2D(0, -(lowIndicatorSpace - (lowIndicatorSpace + highIndicatorSpace) / 2));
1292 private void UpdateValue()
1294 if (slidedTrackImage == null || curValue == null || minValue == null || maxValue == null)
1298 if (curValue < minValue || curValue > maxValue || minValue >= maxValue)
1304 ratio = (float)(curValue - minValue) / (float)(maxValue - minValue);
1306 uint curTrackThickness = CurrentTrackThickness();
1308 if (direction == DirectionType.Horizontal)
1310 if (LayoutDirection == ViewLayoutDirectionType.RTL)
1312 ratio = 1.0f - ratio;
1314 float slidedTrackLength = (float)BgTrackLength() * ratio;
1315 slidedTrackImage.Size2D = new Size2D((int)(slidedTrackLength + round), (int)curTrackThickness); //Add const round to reach Math.Round function.
1317 else if (direction == DirectionType.Vertical)
1319 float slidedTrackLength = (float)BgTrackLength() * ratio;
1320 slidedTrackImage.Size2D = new Size2D((int)(curTrackThickness + round), (int)slidedTrackLength); //Add const round to reach Math.Round function.
1324 private uint CurrentTrackThickness()
1326 uint curTrackThickness = 0;
1327 if (trackThickness != null)
1329 curTrackThickness = trackThickness.Value;
1333 if (sliderAttrs != null && sliderAttrs.TrackThickness != null)
1335 curTrackThickness = sliderAttrs.TrackThickness.Value;
1338 return curTrackThickness;
1341 private uint CurrentSpaceBetweenTrackAndIndicator()
1344 if (spaceBetweenTrackAndIndicator != null)
1346 curSpace = spaceBetweenTrackAndIndicator.Value;
1350 if (sliderAttrs != null && sliderAttrs.SpaceBetweenTrackAndIndicator != null)
1352 curSpace = sliderAttrs.SpaceBetweenTrackAndIndicator.Value;
1358 private IndicatorType CurrentIndicatorType()
1360 IndicatorType type = IndicatorType.None;
1361 if (sliderAttrs != null)
1363 type = sliderAttrs.IndicatorType;
1368 private Size2D LowIndicatorImageSize()
1370 Size2D size = new Size2D(0, 0);
1371 if (lowIndicatorSize != null)
1373 size = lowIndicatorSize;
1377 if (sliderAttrs != null && sliderAttrs.LowIndicatorImageAttributes != null && sliderAttrs.LowIndicatorImageAttributes.Size2D != null)
1379 size = sliderAttrs.LowIndicatorImageAttributes.Size2D;
1385 private Size2D HighIndicatorImageSize()
1387 Size2D size = new Size2D(0, 0);
1388 if (highIndicatorSize != null)
1390 size = highIndicatorSize;
1394 if (sliderAttrs != null && sliderAttrs.HighIndicatorImageAttributes != null && sliderAttrs.HighIndicatorImageAttributes.Size2D != null)
1396 size = sliderAttrs.HighIndicatorImageAttributes.Size2D;
1402 private Size2D LowIndicatorTextSize()
1404 Size2D size = new Size2D(0, 0);
1405 if (lowIndicatorSize != null)
1407 size = lowIndicatorSize;
1411 if (sliderAttrs != null && sliderAttrs.LowIndicatorTextAttributes != null && sliderAttrs.LowIndicatorTextAttributes.Size2D != null)
1413 size = sliderAttrs.LowIndicatorTextAttributes.Size2D;
1419 private Size2D HighIndicatorTextSize()
1421 Size2D size = new Size2D(0, 0);
1422 if (highIndicatorSize != null)
1424 size = highIndicatorSize;
1428 if (sliderAttrs != null && sliderAttrs.HighIndicatorTextAttributes != null && sliderAttrs.HighIndicatorTextAttributes.Size2D != null)
1430 size = sliderAttrs.HighIndicatorTextAttributes.Size2D;
1436 private void CalculateCurrentValueByGesture(float offset)
1438 currentSlidedOffset += offset;
1440 if (currentSlidedOffset <= 0)
1442 curValue = minValue;
1444 else if (currentSlidedOffset >= BgTrackLength())
1446 curValue = maxValue;
1450 int bgTrackLength = BgTrackLength();
1451 if (bgTrackLength != 0)
1453 curValue = ((currentSlidedOffset / (float)bgTrackLength) * (float)(maxValue - minValue)) + minValue;
1456 if (valueChangedHandler != null)
1458 ValueChangedArgs args = new ValueChangedArgs();
1459 args.CurrentValue = curValue.Value;
1460 valueChangedHandler(this, args);
1464 private bool OnTouchEventForBgTrack(object source, TouchEventArgs e)
1466 PointStateType state = e.Touch.GetState(0);
1467 if (state == PointStateType.Down)
1469 Vector2 pos = e.Touch.GetLocalPosition(0);
1470 CalculateCurrentValueByTouch(pos);
1472 if (null != slidingFinishedHandler)
1474 SlidingFinishedArgs args = new SlidingFinishedArgs();
1475 args.CurrentValue = curValue.Value;
1476 slidingFinishedHandler(this, args);
1482 private bool OnTouchEventForThumb(object source, TouchEventArgs e)
1484 PointStateType state = e.Touch.GetState(0);
1485 if (state == PointStateType.Down)
1487 UpdateState(isFocused, true);
1489 else if (state == PointStateType.Up)
1491 UpdateState(isFocused, false);
1496 private void CalculateCurrentValueByTouch(Vector2 pos)
1498 int bgTrackLength = BgTrackLength();
1499 if (direction == DirectionType.Horizontal)
1501 currentSlidedOffset = pos.X;
1503 else if (direction == DirectionType.Vertical)
1505 currentSlidedOffset = bgTrackLength - pos.Y;
1507 if (bgTrackLength != 0)
1509 curValue = ((currentSlidedOffset / (float)bgTrackLength) * (maxValue - minValue)) + minValue;
1510 if (null != valueChangedHandler)
1512 ValueChangedArgs args = new ValueChangedArgs();
1513 args.CurrentValue = curValue.Value;
1514 valueChangedHandler(this, args);
1519 private void UpdateState(bool isFocusedNew, bool isPressedNew)
1521 if (isFocused == isFocusedNew && isPressed == isPressedNew)
1525 if (thumbImage == null || sliderAttrs == null)
1529 isFocused = isFocusedNew;
1530 isPressed = isPressedNew;
1532 if (!isFocused && !isPressed)
1534 State = ControlStates.Normal;
1535 ApplyAttributes(bgThumbImage, sliderAttrs.ThumbBackgroundAttributes);
1536 ApplyAttributes(thumbImage, sliderAttrs.ThumbAttributes);
1537 if (stateChangedHandler != null)
1539 StateChangedArgs args = new StateChangedArgs();
1540 args.CurrentState = ControlStates.Normal;
1541 stateChangedHandler(this, args);
1546 State = ControlStates.Pressed;
1547 ApplyAttributes(bgThumbImage, sliderAttrs.ThumbBackgroundAttributes);
1548 ApplyAttributes(thumbImage, sliderAttrs.ThumbAttributes);
1550 if (stateChangedHandler != null)
1552 StateChangedArgs args = new StateChangedArgs();
1553 args.CurrentState = ControlStates.Pressed;
1554 stateChangedHandler(this, args);
1557 else if (!isPressed && isFocused)
1559 State = ControlStates.Focused;
1560 ApplyAttributes(bgThumbImage, sliderAttrs.ThumbBackgroundAttributes);
1561 ApplyAttributes(thumbImage, sliderAttrs.ThumbAttributes);
1563 if (stateChangedHandler != null)
1565 StateChangedArgs args = new StateChangedArgs();
1566 args.CurrentState = ControlStates.Focused;
1567 stateChangedHandler(this, args);
1572 private void UpdateComponentByIndicatorTypeChanged()
1574 IndicatorType type = CurrentIndicatorType();
1575 if (type == IndicatorType.None)
1577 if (lowIndicatorImage != null)
1579 lowIndicatorImage.Hide();
1581 if (highIndicatorImage != null)
1583 highIndicatorImage.Hide();
1585 if (lowIndicatorText != null)
1587 lowIndicatorText.Hide();
1589 if (highIndicatorText != null)
1591 highIndicatorText.Hide();
1594 else if (type == IndicatorType.Image)
1596 if (lowIndicatorImage != null)
1598 lowIndicatorImage.Show();
1600 if (highIndicatorImage != null)
1602 highIndicatorImage.Show();
1604 if (lowIndicatorText != null)
1606 lowIndicatorText.Hide();
1608 if (highIndicatorText != null)
1610 highIndicatorText.Hide();
1613 else if (type == IndicatorType.Text)
1615 if (lowIndicatorText != null)
1617 lowIndicatorText.Show();
1619 if (highIndicatorText != null)
1621 highIndicatorText.Show();
1623 if (lowIndicatorImage != null)
1625 lowIndicatorImage.Hide();
1627 if (highIndicatorImage != null)
1629 highIndicatorImage.Hide();
1635 /// Value Changed event data.
1637 /// <since_tizen> 6 </since_tizen>
1638 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1639 [EditorBrowsable(EditorBrowsableState.Never)]
1640 public class ValueChangedArgs : EventArgs
1645 /// <since_tizen> 6 </since_tizen>
1646 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1647 [EditorBrowsable(EditorBrowsableState.Never)]
1648 public float CurrentValue;
1652 /// Value Changed event data.
1654 /// <since_tizen> 6 </since_tizen>
1655 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1656 [EditorBrowsable(EditorBrowsableState.Never)]
1657 public class SlidingFinishedArgs : EventArgs
1662 /// <since_tizen> 6 </since_tizen>
1663 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1664 [EditorBrowsable(EditorBrowsableState.Never)]
1665 public float CurrentValue;
1669 /// State Changed event data.
1671 /// <since_tizen> 6 </since_tizen>
1672 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1673 [EditorBrowsable(EditorBrowsableState.Never)]
1674 public class StateChangedArgs : EventArgs
1679 /// <since_tizen> 6 </since_tizen>
1680 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1681 [EditorBrowsable(EditorBrowsableState.Never)]
1682 public ControlStates CurrentState;