6783fe0ec03884d130bcbe308a783fef5dac3da3
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / Slider.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 namespace Tizen.NUI.UIComponents
18 {
19
20     using System;
21     using System.Runtime.InteropServices;
22     using Tizen.NUI.BaseComponents;
23
24     /// <summary>
25     /// Slider is a control to enable sliding an indicator between two values.
26     /// </summary>
27     public class Slider : View
28     {
29         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30
31         internal Slider(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Slider_SWIGUpcast(cPtr), cMemoryOwn)
32         {
33             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34         }
35
36         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Slider obj)
37         {
38             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
39         }
40
41         /// <summary>
42         /// Dispose
43         /// </summary>
44         protected override void Dispose(DisposeTypes type)
45         {
46             if (disposed)
47             {
48                 return;
49             }
50
51             if (type == DisposeTypes.Explicit)
52             {
53                 //Called by User
54                 //Release your own managed resources here.
55                 //You should release all of your own disposable objects here.
56
57             }
58
59             //Release your own unmanaged resources here.
60             //You should not access any managed member here except static instance.
61             //because the execution order of Finalizes is non-deterministic.
62
63             if (swigCPtr.Handle != global::System.IntPtr.Zero)
64             {
65                 if (swigCMemOwn)
66                 {
67                     swigCMemOwn = false;
68                     NDalicPINVOKE.delete_Slider(swigCPtr);
69                 }
70                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
71             }
72
73             base.Dispose(type);
74         }
75
76         /// <summary>
77         /// Value changed event arguments.
78         /// </summary>
79         public class ValueChangedEventArgs : EventArgs
80         {
81             private Slider _slider;
82             private float _slideValue;
83
84             /// <summary>
85             /// Slider.
86             /// </summary>
87             public Slider Slider
88             {
89                 get
90                 {
91                     return _slider;
92                 }
93                 set
94                 {
95                     _slider = value;
96                 }
97             }
98
99             /// <summary>
100             /// Slider value.
101             /// </summary>
102             public float SlideValue
103             {
104                 get
105                 {
106                     return _slideValue;
107                 }
108                 set
109                 {
110                     _slideValue = value;
111                 }
112             }
113         }
114
115         /// <summary>
116         /// Sliding finished event arguments.
117         /// </summary>
118         public class SlidingFinishedEventArgs : EventArgs
119         {
120             private Slider _slider;
121             private float _slideValue;
122
123             /// <summary>
124             /// Slider.
125             /// </summary>
126             public Slider Slider
127             {
128                 get
129                 {
130                     return _slider;
131                 }
132                 set
133                 {
134                     _slider = value;
135                 }
136             }
137
138             /// <summary>
139             /// Slider value.
140             /// </summary>
141             public float SlideValue
142             {
143                 get
144                 {
145                     return _slideValue;
146                 }
147                 set
148                 {
149                     _slideValue = value;
150                 }
151             }
152         }
153
154         /// <summary>
155         /// Mark reached event arguments.
156         /// </summary>
157         public class MarkReachedEventArgs : EventArgs
158         {
159             private Slider _slider;
160             private int _slideValue;
161
162             /// <summary>
163             /// Slider.
164             /// </summary>
165             public Slider Slider
166             {
167                 get
168                 {
169                     return _slider;
170                 }
171                 set
172                 {
173                     _slider = value;
174                 }
175             }
176
177             /// <summary>
178             /// Slider value.
179             /// </summary>
180             public int SlideValue
181             {
182                 get
183                 {
184                     return _slideValue;
185                 }
186                 set
187                 {
188                     _slideValue = value;
189                 }
190             }
191         }
192
193
194         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
195         private delegate bool ValueChangedCallbackDelegate(IntPtr slider, float slideValue);
196         private EventHandlerWithReturnType<object, ValueChangedEventArgs, bool> _sliderValueChangedEventHandler;
197         private ValueChangedCallbackDelegate _sliderValueChangedCallbackDelegate;
198
199         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
200         private delegate bool SlidingFinishedCallbackDelegate(IntPtr slider, float slideValue);
201         private EventHandlerWithReturnType<object, SlidingFinishedEventArgs, bool> _sliderSlidingFinishedEventHandler;
202         private SlidingFinishedCallbackDelegate _sliderSlidingFinishedCallbackDelegate;
203
204         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
205         private delegate bool MarkReachedCallbackDelegate(IntPtr slider, int slideValue);
206         private EventHandlerWithReturnType<object, MarkReachedEventArgs, bool> _sliderMarkReachedEventHandler;
207         private MarkReachedCallbackDelegate _sliderMarkReachedCallbackDelegate;
208
209         /// <summary>
210         /// Event emitted when the slider value changes.
211         /// </summary>
212         public event EventHandlerWithReturnType<object, ValueChangedEventArgs, bool> ValueChanged
213         {
214             add
215             {
216                 if (_sliderValueChangedEventHandler == null)
217                 {
218                     _sliderValueChangedCallbackDelegate = (OnValueChanged);
219                     ValueChangedSignal().Connect(_sliderValueChangedCallbackDelegate);
220                 }
221                 _sliderValueChangedEventHandler += value;
222             }
223             remove
224             {
225                 _sliderValueChangedEventHandler -= value;
226                 if (_sliderValueChangedEventHandler == null && ValueChangedSignal().Empty() == false)
227                 {
228                     ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate);
229                 }
230             }
231         }
232
233         // Callback for Slider ValueChanged signal
234         private bool OnValueChanged(IntPtr slider, float slideValue)
235         {
236             ValueChangedEventArgs e = new ValueChangedEventArgs();
237
238             // Populate all members of "e" (ValueChangedEventArgs) with real page
239             e.Slider = Slider.GetSliderFromPtr(slider);
240             e.SlideValue = slideValue;
241
242             if (_sliderValueChangedEventHandler != null)
243             {
244                 //here we send all page to user event handlers
245                 return _sliderValueChangedEventHandler(this, e);
246             }
247             return false;
248         }
249
250         /// <summary>
251         /// Event emitted when the sliding is finished.
252         /// </summary>
253         public event EventHandlerWithReturnType<object, SlidingFinishedEventArgs, bool> SlidingFinished
254         {
255             add
256             {
257                 if (_sliderSlidingFinishedEventHandler == null)
258                 {
259                     _sliderSlidingFinishedCallbackDelegate = (OnSlidingFinished);
260                     SlidingFinishedSignal().Connect(_sliderSlidingFinishedCallbackDelegate);
261                 }
262                 _sliderSlidingFinishedEventHandler += value;
263             }
264             remove
265             {
266                 _sliderSlidingFinishedEventHandler -= value;
267                 if (_sliderSlidingFinishedEventHandler == null && SlidingFinishedSignal().Empty() == false)
268                 {
269                     SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate);
270                 }
271             }
272         }
273
274         // Callback for Slider SlidingFinished signal
275         private bool OnSlidingFinished(IntPtr slider, float slideValue)
276         {
277             SlidingFinishedEventArgs e = new SlidingFinishedEventArgs();
278
279             // Populate all members of "e" (SlidingFinishedEventArgs) with real page
280             e.Slider = Slider.GetSliderFromPtr(slider);
281             e.SlideValue = slideValue;
282
283             if (_sliderSlidingFinishedEventHandler != null)
284             {
285                 //here we send all page to user event handlers
286                 return _sliderSlidingFinishedEventHandler(this, e);
287             }
288             return false;
289         }
290
291         /// <summary>
292         /// Event emitted when the slider handle reaches a mark.
293         /// </summary>
294         public event EventHandlerWithReturnType<object, MarkReachedEventArgs, bool> MarkReached
295         {
296             add
297             {
298                 if (_sliderMarkReachedEventHandler == null)
299                 {
300                     _sliderMarkReachedCallbackDelegate = (OnMarkReached);
301                     MarkReachedSignal().Connect(_sliderMarkReachedCallbackDelegate);
302                 }
303                 _sliderMarkReachedEventHandler += value;
304             }
305             remove
306             {
307                 _sliderMarkReachedEventHandler -= value;
308                 if (_sliderMarkReachedEventHandler == null && MarkReachedSignal().Empty() == false)
309                 {
310                     MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate);
311                 }
312             }
313         }
314
315         // Callback for Slider MarkReached signal
316         private bool OnMarkReached(IntPtr slider, int slideValue)
317         {
318             MarkReachedEventArgs e = new MarkReachedEventArgs();
319
320             // Populate all members of "e" (MarkReachedEventArgs) with real page
321             e.Slider = Slider.GetSliderFromPtr(slider);
322             e.SlideValue = slideValue;
323
324             if (_sliderMarkReachedEventHandler != null)
325             {
326                 //here we send all page to user event handlers
327                 return _sliderMarkReachedEventHandler(this, e);
328             }
329             return false;
330         }
331
332         /// <summary>
333         /// Get Slider from the pointer.
334         /// </summary>
335         /// <param name="cPtr">The pointer of Slider</param>
336         /// <returns>Object of Slider type</returns>
337         internal static Slider GetSliderFromPtr(global::System.IntPtr cPtr)
338         {
339             Slider ret = new Slider(cPtr, false);
340             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341             return ret;
342         }
343
344         internal class Property : global::System.IDisposable
345         {
346             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
347             protected bool swigCMemOwn;
348
349             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
350             {
351                 swigCMemOwn = cMemoryOwn;
352                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
353             }
354
355             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
356             {
357                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
358             }
359
360             //A Flag to check who called Dispose(). (By User or DisposeQueue)
361             private bool isDisposeQueued = false;
362             //A Flat to check if it is already disposed.
363             protected bool disposed = false;
364
365             ~Property()
366             {
367                 if (!isDisposeQueued)
368                 {
369                     isDisposeQueued = true;
370                     DisposeQueue.Instance.Add(this);
371                 }
372             }
373
374             public void Dispose()
375             {
376                 //Throw excpetion if Dispose() is called in separate thread.
377                 if (!Window.IsInstalled())
378                 {
379                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
380                 }
381
382                 if (isDisposeQueued)
383                 {
384                     Dispose(DisposeTypes.Implicit);
385                 }
386                 else
387                 {
388                     Dispose(DisposeTypes.Explicit);
389                     System.GC.SuppressFinalize(this);
390                 }
391             }
392
393             protected virtual void Dispose(DisposeTypes type)
394             {
395                 if (disposed)
396                 {
397                     return;
398                 }
399
400                 if (type == DisposeTypes.Explicit)
401                 {
402                     //Called by User
403                     //Release your own managed resources here.
404                     //You should release all of your own disposable objects here.
405
406                 }
407
408                 //Release your own unmanaged resources here.
409                 //You should not access any managed member here except static instance.
410                 //because the execution order of Finalizes is non-deterministic.
411
412                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
413                 {
414                     if (swigCMemOwn)
415                     {
416                         swigCMemOwn = false;
417                         NDalicPINVOKE.delete_Slider_Property(swigCPtr);
418                     }
419                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
420                 }
421
422                 disposed = true;
423             }
424
425             internal Property() : this(NDalicPINVOKE.new_Slider_Property(), true)
426             {
427                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428             }
429
430             internal static readonly int LOWER_BOUND = NDalicPINVOKE.Slider_Property_LOWER_BOUND_get();
431             internal static readonly int UPPER_BOUND = NDalicPINVOKE.Slider_Property_UPPER_BOUND_get();
432             internal static readonly int VALUE = NDalicPINVOKE.Slider_Property_VALUE_get();
433             internal static readonly int TRACK_VISUAL = NDalicPINVOKE.Slider_Property_TRACK_VISUAL_get();
434             internal static readonly int HANDLE_VISUAL = NDalicPINVOKE.Slider_Property_HANDLE_VISUAL_get();
435             internal static readonly int PROGRESS_VISUAL = NDalicPINVOKE.Slider_Property_PROGRESS_VISUAL_get();
436             internal static readonly int POPUP_VISUAL = NDalicPINVOKE.Slider_Property_POPUP_VISUAL_get();
437             internal static readonly int POPUP_ARROW_VISUAL = NDalicPINVOKE.Slider_Property_POPUP_ARROW_VISUAL_get();
438             internal static readonly int DISABLED_COLOR = NDalicPINVOKE.Slider_Property_DISABLED_COLOR_get();
439             internal static readonly int VALUE_PRECISION = NDalicPINVOKE.Slider_Property_VALUE_PRECISION_get();
440             internal static readonly int SHOW_POPUP = NDalicPINVOKE.Slider_Property_SHOW_POPUP_get();
441             internal static readonly int SHOW_VALUE = NDalicPINVOKE.Slider_Property_SHOW_VALUE_get();
442             internal static readonly int MARKS = NDalicPINVOKE.Slider_Property_MARKS_get();
443             internal static readonly int SNAP_TO_MARKS = NDalicPINVOKE.Slider_Property_SNAP_TO_MARKS_get();
444             internal static readonly int MARK_TOLERANCE = NDalicPINVOKE.Slider_Property_MARK_TOLERANCE_get();
445
446         }
447
448         /// <summary>
449         /// Creates the Slider control.
450         /// </summary>
451         public Slider() : this(NDalicPINVOKE.Slider_New(), true)
452         {
453             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454
455         }
456         internal Slider(Slider handle) : this(NDalicPINVOKE.new_Slider__SWIG_1(Slider.getCPtr(handle)), true)
457         {
458             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
459         }
460
461         internal Slider Assign(Slider handle)
462         {
463             Slider ret = new Slider(NDalicPINVOKE.Slider_Assign(swigCPtr, Slider.getCPtr(handle)), false);
464             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465             return ret;
466         }
467
468         /// <summary>
469         /// Downcasts an Object handle to Slider.<br>
470         /// If handle points to a Slider, the downcast produces valid handle.<br>
471         /// If not, the returned handle is left uninitialized.<br>
472         /// </summary>
473         /// <param name="handle">Handle to an object</param>
474         /// <returns>Handle to a Slider or an uninitialized handle</returns>
475         public new static Slider DownCast(BaseHandle handle)
476         {
477             Slider ret = new Slider(NDalicPINVOKE.Slider_DownCast(BaseHandle.getCPtr(handle)), true);
478             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
479             return ret;
480         }
481
482         internal SliderValueChangedSignal ValueChangedSignal()
483         {
484             SliderValueChangedSignal ret = new SliderValueChangedSignal(NDalicPINVOKE.Slider_ValueChangedSignal(swigCPtr), false);
485             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
486             return ret;
487         }
488
489         internal SliderValueChangedSignal SlidingFinishedSignal()
490         {
491             SliderValueChangedSignal ret = new SliderValueChangedSignal(NDalicPINVOKE.Slider_SlidingFinishedSignal(swigCPtr), false);
492             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
493             return ret;
494         }
495
496         internal SliderMarkReachedSignal MarkReachedSignal()
497         {
498             SliderMarkReachedSignal ret = new SliderMarkReachedSignal(NDalicPINVOKE.Slider_MarkReachedSignal(swigCPtr), false);
499             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
500             return ret;
501         }
502
503         /// <summary>
504         /// Lower bound property
505         /// </summary>
506         public float LowerBound
507         {
508             get
509             {
510                 float temp = 0.0f;
511                 GetProperty(Slider.Property.LOWER_BOUND).Get(out temp);
512                 return temp;
513             }
514             set
515             {
516                 SetProperty(Slider.Property.LOWER_BOUND, new Tizen.NUI.PropertyValue(value));
517             }
518         }
519
520         /// <summary>
521         /// Upper bound property
522         /// </summary>
523         public float UpperBound
524         {
525             get
526             {
527                 float temp = 0.0f;
528                 GetProperty(Slider.Property.UPPER_BOUND).Get(out temp);
529                 return temp;
530             }
531             set
532             {
533                 SetProperty(Slider.Property.UPPER_BOUND, new Tizen.NUI.PropertyValue(value));
534             }
535         }
536
537         /// <summary>
538         /// Value property
539         /// </summary>
540         public float Value
541         {
542             get
543             {
544                 float temp = 0.0f;
545                 GetProperty(Slider.Property.VALUE).Get(out temp);
546                 return temp;
547             }
548             set
549             {
550                 SetProperty(Slider.Property.VALUE, new Tizen.NUI.PropertyValue(value));
551             }
552         }
553
554         /// <summary>
555         /// Track visual property
556         /// </summary>
557         public PropertyMap TrackVisual
558         {
559             get
560             {
561                 PropertyMap temp = new PropertyMap();
562                 GetProperty(Slider.Property.TRACK_VISUAL).Get(temp);
563                 return temp;
564             }
565             set
566             {
567                 SetProperty(Slider.Property.TRACK_VISUAL, new Tizen.NUI.PropertyValue(value));
568             }
569         }
570
571         /// <summary>
572         /// Handle visual property
573         /// </summary>
574         public PropertyMap HandleVisual
575         {
576             get
577             {
578                 PropertyMap temp = new PropertyMap();
579                 GetProperty(Slider.Property.HANDLE_VISUAL).Get(temp);
580                 return temp;
581             }
582             set
583             {
584                 SetProperty(Slider.Property.HANDLE_VISUAL, new Tizen.NUI.PropertyValue(value));
585             }
586         }
587
588         /// <summary>
589         /// Progress visual property
590         /// </summary>
591         public PropertyMap ProgressVisual
592         {
593             get
594             {
595                 PropertyMap temp = new PropertyMap();
596                 GetProperty(Slider.Property.PROGRESS_VISUAL).Get(temp);
597                 return temp;
598             }
599             set
600             {
601                 SetProperty(Slider.Property.PROGRESS_VISUAL, new Tizen.NUI.PropertyValue(value));
602             }
603         }
604
605         /// <summary>
606         /// Popup visual property
607         /// </summary>
608         public PropertyMap PopupVisual
609         {
610             get
611             {
612                 PropertyMap temp = new PropertyMap();
613                 GetProperty(Slider.Property.POPUP_VISUAL).Get(temp);
614                 return temp;
615             }
616             set
617             {
618                 SetProperty(Slider.Property.POPUP_VISUAL, new Tizen.NUI.PropertyValue(value));
619             }
620         }
621
622         /// <summary>
623         /// Popup arrow visual property
624         /// </summary>
625         public PropertyMap PopupArrowVisual
626         {
627             get
628             {
629                 PropertyMap temp = new PropertyMap();
630                 GetProperty(Slider.Property.POPUP_ARROW_VISUAL).Get(temp);
631                 return temp;
632             }
633             set
634             {
635                 SetProperty(Slider.Property.POPUP_ARROW_VISUAL, new Tizen.NUI.PropertyValue(value));
636             }
637         }
638
639         /// <summary>
640         /// Disable color property
641         /// </summary>
642         public Vector4 DisabledColor
643         {
644             get
645             {
646                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
647                 GetProperty(Slider.Property.DISABLED_COLOR).Get(temp);
648                 return temp;
649             }
650             set
651             {
652                 SetProperty(Slider.Property.DISABLED_COLOR, new Tizen.NUI.PropertyValue(value));
653             }
654         }
655
656         /// <summary>
657         /// Value presicion property
658         /// </summary>
659         public int ValuePrecision
660         {
661             get
662             {
663                 int temp = 0;
664                 GetProperty(Slider.Property.VALUE_PRECISION).Get(out temp);
665                 return temp;
666             }
667             set
668             {
669                 SetProperty(Slider.Property.VALUE_PRECISION, new Tizen.NUI.PropertyValue(value));
670             }
671         }
672
673         /// <summary>
674         /// Show popup property
675         /// </summary>
676         public bool ShowPopup
677         {
678             get
679             {
680                 bool temp = false;
681                 GetProperty(Slider.Property.SHOW_POPUP).Get(out temp);
682                 return temp;
683             }
684             set
685             {
686                 SetProperty(Slider.Property.SHOW_POPUP, new Tizen.NUI.PropertyValue(value));
687             }
688         }
689
690         /// <summary>
691         /// Show value property
692         /// </summary>
693         public bool ShowValue
694         {
695             get
696             {
697                 bool temp = false;
698                 GetProperty(Slider.Property.SHOW_VALUE).Get(out temp);
699                 return temp;
700             }
701             set
702             {
703                 SetProperty(Slider.Property.SHOW_VALUE, new Tizen.NUI.PropertyValue(value));
704             }
705         }
706
707         /// <summary>
708         /// Marks property
709         /// </summary>
710         public Tizen.NUI.PropertyArray Marks
711         {
712             get
713             {
714                 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
715                 GetProperty(Slider.Property.MARKS).Get(temp);
716                 return temp;
717             }
718             set
719             {
720                 SetProperty(Slider.Property.MARKS, new Tizen.NUI.PropertyValue(value));
721             }
722         }
723
724         /// <summary>
725         /// Snap to marks property
726         /// </summary>
727         public bool SnapToMarks
728         {
729             get
730             {
731                 bool temp = false;
732                 GetProperty(Slider.Property.SNAP_TO_MARKS).Get(out temp);
733                 return temp;
734             }
735             set
736             {
737                 SetProperty(Slider.Property.SNAP_TO_MARKS, new Tizen.NUI.PropertyValue(value));
738             }
739         }
740
741         /// <summary>
742         /// Mark tolerance property
743         /// </summary>
744         public float MarkTolerance
745         {
746             get
747             {
748                 float temp = 0.0f;
749                 GetProperty(Slider.Property.MARK_TOLERANCE).Get(out temp);
750                 return temp;
751             }
752             set
753             {
754                 SetProperty(Slider.Property.MARK_TOLERANCE, new Tizen.NUI.PropertyValue(value));
755             }
756         }
757
758     }
759
760 }