[NUI] Fix some SVACE issues.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / SliderBindableProperty.cs
1 using System.ComponentModel;
2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Binding;
4
5 namespace Tizen.NUI.Components
6 {
7     public partial class Slider
8     {
9         /// <summary>
10         /// DirectionProperty
11         /// </summary>
12         [EditorBrowsable(EditorBrowsableState.Never)]
13         public static readonly BindableProperty DirectionProperty = BindableProperty.Create(nameof(Direction), typeof(DirectionType), typeof(Slider), default(DirectionType), propertyChanged: (bindable, oldValue, newValue) =>
14         {
15             var instance = (Slider)bindable;
16             if (newValue != null)
17             {
18                 instance.InternalDirection = (DirectionType)newValue;
19             }
20         },
21         defaultValueCreator: (bindable) =>
22         {
23             var instance = (Slider)bindable;
24             return instance.InternalDirection;
25         });
26
27         /// <summary>
28         /// MinValueProperty
29         /// </summary>
30         [EditorBrowsable(EditorBrowsableState.Never)]
31         public static readonly BindableProperty MinValueProperty = BindableProperty.Create(nameof(MinValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
32         {
33             var instance = (Slider)bindable;
34             if (newValue != null)
35             {
36                 instance.InternalMinValue = (float)newValue;
37             }
38         },
39         defaultValueCreator: (bindable) =>
40         {
41             var instance = (Slider)bindable;
42             return instance.InternalMinValue;
43         });
44
45         /// <summary>
46         /// MaxValueProperty
47         /// </summary>
48         [EditorBrowsable(EditorBrowsableState.Never)]
49         public static readonly BindableProperty MaxValueProperty = BindableProperty.Create(nameof(MaxValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
50         {
51             var instance = (Slider)bindable;
52             if (newValue != null)
53             {
54                 instance.InternalMaxValue = (float)newValue;
55             }
56         },
57         defaultValueCreator: (bindable) =>
58         {
59             var instance = (Slider)bindable;
60             return instance.InternalMaxValue;
61         });
62
63         /// <summary>
64         /// ThumbSizeProperty
65         /// </summary>
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public static readonly BindableProperty ThumbSizeProperty = BindableProperty.Create(nameof(ThumbSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
68         {
69             var instance = (Slider)bindable;
70             if (newValue != null)
71             {
72                 instance.InternalThumbSize = newValue as Size;
73             }
74         },
75         defaultValueCreator: (bindable) =>
76         {
77             var instance = (Slider)bindable;
78             return instance.InternalThumbSize;
79         });
80
81         /// <summary>
82         /// ThumbImageURLProperty
83         /// </summary>
84         [EditorBrowsable(EditorBrowsableState.Never)]
85         public static readonly BindableProperty ThumbImageURLProperty = BindableProperty.Create(nameof(ThumbImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
86         {
87             var instance = (Slider)bindable;
88             if (newValue != null)
89             {
90                 instance.InternalThumbImageURL = newValue as string;
91             }
92         },
93         defaultValueCreator: (bindable) =>
94         {
95             var instance = (Slider)bindable;
96             return instance.InternalThumbImageURL;
97         });
98
99         /// <summary>
100         /// ThumbImageURLSelectorProperty
101         /// </summary>
102         [EditorBrowsable(EditorBrowsableState.Never)]
103         public static readonly BindableProperty ThumbImageURLSelectorProperty = BindableProperty.Create(nameof(ThumbImageURLSelector), typeof(StringSelector), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
104         {
105             var instance = (Slider)bindable;
106             instance.InternalThumbImageURLSelector = newValue as StringSelector;
107         },
108         defaultValueCreator: (bindable) =>
109         {
110             var instance = (Slider)bindable;
111             return instance.InternalThumbImageURLSelector;
112         });
113
114         /// <summary>
115         /// ThumbImageUrlProperty
116         /// </summary>
117         [EditorBrowsable(EditorBrowsableState.Never)]
118         public static readonly BindableProperty ThumbImageUrlProperty = BindableProperty.Create(nameof(ThumbImageUrl), typeof(Selector<string>), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
119         {
120             var instance = (Slider)bindable;
121             if (newValue != null)
122             {
123                 instance.InternalThumbImageUrl = newValue as Tizen.NUI.BaseComponents.Selector<string>;
124             }
125         },
126         defaultValueCreator: (bindable) =>
127         {
128             var instance = (Slider)bindable;
129             return instance.InternalThumbImageUrl;
130         });
131
132         /// <summary>
133         /// ThumbColorProperty
134         /// </summary>
135         [EditorBrowsable(EditorBrowsableState.Never)]
136         public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
137         {
138             var instance = (Slider)bindable;
139             if (newValue != null)
140             {
141                 instance.InternalThumbColor = newValue as Color;
142             }
143         },
144         defaultValueCreator: (bindable) =>
145         {
146             var instance = (Slider)bindable;
147             return instance.InternalThumbColor;
148         });
149
150         /// <summary>
151         /// BgTrackColorProperty
152         /// </summary>
153         [EditorBrowsable(EditorBrowsableState.Never)]
154         public static readonly BindableProperty BgTrackColorProperty = BindableProperty.Create(nameof(BgTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
155         {
156             var instance = (Slider)bindable;
157             if (newValue != null)
158             {
159                 instance.InternalBgTrackColor = newValue as Color;
160             }
161         },
162         defaultValueCreator: (bindable) =>
163         {
164             var instance = (Slider)bindable;
165             return instance.InternalBgTrackColor;
166         });
167
168         /// <summary>
169         /// SlidedTrackColorProperty
170         /// </summary>
171         [EditorBrowsable(EditorBrowsableState.Never)]
172         public static readonly BindableProperty SlidedTrackColorProperty = BindableProperty.Create(nameof(SlidedTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
173         {
174             var instance = (Slider)bindable;
175             if (newValue != null)
176             {
177                 instance.InternalSlidedTrackColor = newValue as Color;
178             }
179         },
180         defaultValueCreator: (bindable) =>
181         {
182             var instance = (Slider)bindable;
183             return instance.InternalSlidedTrackColor;
184         });
185
186         /// <summary>
187         /// WarningStartValueProperty
188         /// </summary>
189         [EditorBrowsable(EditorBrowsableState.Never)]
190         public static readonly BindableProperty WarningStartValueProperty = BindableProperty.Create(nameof(WarningStartValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
191         {
192             var instance = (Slider)bindable;
193             if (newValue != null)
194             {
195                 instance.InternalWarningStartValue = (float)newValue;
196             }
197         },
198         defaultValueCreator: (bindable) =>
199         {
200             var instance = (Slider)bindable;
201             return instance.InternalWarningStartValue;
202         });
203
204         /// <summary>
205         /// WarningTrackColorProperty
206         /// </summary>
207         [EditorBrowsable(EditorBrowsableState.Never)]
208         public static readonly BindableProperty WarningTrackColorProperty = BindableProperty.Create(nameof(WarningTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
209         {
210             var instance = (Slider)bindable;
211             if (newValue != null)
212             {
213                 instance.InternalWarningTrackColor = newValue as Color;
214             }
215         },
216         defaultValueCreator: (bindable) =>
217         {
218             var instance = (Slider)bindable;
219             return instance.InternalWarningTrackColor;
220         });
221
222         /// <summary>
223         /// WarningSlidedTrackColorProperty
224         /// </summary>
225         [EditorBrowsable(EditorBrowsableState.Never)]
226         public static readonly BindableProperty WarningSlidedTrackColorProperty = BindableProperty.Create(nameof(WarningSlidedTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
227         {
228             var instance = (Slider)bindable;
229             if (newValue != null)
230             {
231                 instance.InternalWarningSlidedTrackColor = newValue as Color;
232             }
233         },
234         defaultValueCreator: (bindable) =>
235         {
236             var instance = (Slider)bindable;
237             return instance.InternalWarningSlidedTrackColor;
238         });
239
240         /// <summary>
241         /// WarningThumbImageUrlProperty
242         /// </summary>
243         [EditorBrowsable(EditorBrowsableState.Never)]
244         public static readonly BindableProperty WarningThumbImageUrlProperty = BindableProperty.Create(nameof(WarningThumbImageUrl), typeof(Tizen.NUI.BaseComponents.Selector<string>), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
245         {
246             var instance = (Slider)bindable;
247             if (newValue != null)
248             {
249                 instance.InternalWarningThumbImageUrl = newValue as Tizen.NUI.BaseComponents.Selector<string>;
250             }
251         },
252         defaultValueCreator: (bindable) =>
253         {
254             var instance = (Slider)bindable;
255             return instance.InternalWarningThumbImageUrl;
256         });
257
258         /// <summary>
259         /// WarningThumbColorProperty
260         /// </summary>
261         [EditorBrowsable(EditorBrowsableState.Never)]
262         public static readonly BindableProperty WarningThumbColorProperty = BindableProperty.Create(nameof(WarningThumbColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
263         {
264             var instance = (Slider)bindable;
265             if (newValue != null)
266             {
267                 instance.InternalWarningThumbColor = newValue as Color;
268             }
269         },
270         defaultValueCreator: (bindable) =>
271         {
272             var instance = (Slider)bindable;
273             return instance.InternalWarningThumbColor;
274         });
275
276         /// <summary>
277         /// LowIndicatorImageURLProperty
278         /// </summary>
279         [EditorBrowsable(EditorBrowsableState.Never)]
280         public static readonly BindableProperty LowIndicatorImageURLProperty = BindableProperty.Create(nameof(LowIndicatorImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
281         {
282             var instance = (Slider)bindable;
283             if (newValue != null)
284             {
285                 instance.InternalLowIndicatorImageURL = newValue as string;
286             }
287         },
288         defaultValueCreator: (bindable) =>
289         {
290             var instance = (Slider)bindable;
291             return instance.InternalLowIndicatorImageURL;
292         });
293
294         /// <summary>
295         /// HighIndicatorImageURLProperty
296         /// </summary>
297         [EditorBrowsable(EditorBrowsableState.Never)]
298         public static readonly BindableProperty HighIndicatorImageURLProperty = BindableProperty.Create(nameof(HighIndicatorImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
299         {
300             var instance = (Slider)bindable;
301             if (newValue != null)
302             {
303                 instance.InternalHighIndicatorImageURL = newValue as string;
304             }
305         },
306         defaultValueCreator: (bindable) =>
307         {
308             var instance = (Slider)bindable;
309             return instance.InternalHighIndicatorImageURL;
310         });
311
312         /// <summary>
313         /// LowIndicatorTextContentProperty
314         /// </summary>
315         [EditorBrowsable(EditorBrowsableState.Never)]
316         public static readonly BindableProperty LowIndicatorTextContentProperty = BindableProperty.Create(nameof(LowIndicatorTextContent), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
317         {
318             var instance = (Slider)bindable;
319             if (newValue != null)
320             {
321                 instance.InternalLowIndicatorTextContent = newValue as string;
322             }
323         },
324         defaultValueCreator: (bindable) =>
325         {
326             var instance = (Slider)bindable;
327             return instance.InternalLowIndicatorTextContent;
328         });
329
330         /// <summary>
331         /// HighIndicatorTextContentProperty
332         /// </summary>
333         [EditorBrowsable(EditorBrowsableState.Never)]
334         public static readonly BindableProperty HighIndicatorTextContentProperty = BindableProperty.Create(nameof(HighIndicatorTextContent), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
335         {
336             var instance = (Slider)bindable;
337             if (newValue != null)
338             {
339                 instance.InternalHighIndicatorTextContent = newValue as string;
340             }
341         },
342         defaultValueCreator: (bindable) =>
343         {
344             var instance = (Slider)bindable;
345             return instance.InternalHighIndicatorTextContent;
346         });
347
348         /// <summary>
349         /// LowIndicatorSizeProperty
350         /// </summary>
351         [EditorBrowsable(EditorBrowsableState.Never)]
352         public static readonly BindableProperty LowIndicatorSizeProperty = BindableProperty.Create(nameof(LowIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
353         {
354             var instance = (Slider)bindable;
355             if (newValue as Size is var nVal && nVal != null)
356             {
357                 instance.InternalLowIndicatorSize = nVal;
358             }
359         },
360         defaultValueCreator: (bindable) =>
361         {
362             var instance = (Slider)bindable;
363             return instance.InternalLowIndicatorSize;
364         });
365
366         /// <summary>
367         /// HighIndicatorSizeProperty
368         /// </summary>
369         [EditorBrowsable(EditorBrowsableState.Never)]
370         public static readonly BindableProperty HighIndicatorSizeProperty = BindableProperty.Create(nameof(HighIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
371         {
372             var instance = (Slider)bindable;
373             if (newValue as Size is var nVal && nVal != null)
374             {
375                 instance.InternalHighIndicatorSize = nVal;
376             }
377         },
378         defaultValueCreator: (bindable) =>
379         {
380             var instance = (Slider)bindable;
381             return instance.InternalHighIndicatorSize;
382         });
383
384         /// <summary>
385         /// ValueIndicatorSizeProperty
386         /// </summary>
387         [EditorBrowsable(EditorBrowsableState.Never)]
388         public static readonly BindableProperty ValueIndicatorSizeProperty = BindableProperty.Create(nameof(ValueIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
389         {
390             var instance = (Slider)bindable;
391             if (newValue as Size is var nVal && nVal != null)
392             {
393                 instance.InternalValueIndicatorSize = nVal;
394             }
395         },
396         defaultValueCreator: (bindable) =>
397         {
398             var instance = (Slider)bindable;
399             return instance.InternalValueIndicatorSize;
400         });
401
402         /// <summary>
403         /// ValueIndicatorUrlProperty
404         /// </summary>
405         [EditorBrowsable(EditorBrowsableState.Never)]
406         public static readonly BindableProperty ValueIndicatorUrlProperty = BindableProperty.Create(nameof(ValueIndicatorUrl), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
407         {
408             var instance = (Slider)bindable;
409             if (newValue != null)
410             {
411                 instance.InternalValueIndicatorUrl = newValue as string;
412             }
413         },
414         defaultValueCreator: (bindable) =>
415         {
416             var instance = (Slider)bindable;
417             return instance.InternalValueIndicatorUrl;
418         });
419
420         /// <summary>
421         /// IsDiscreteProperty
422         /// </summary>
423         [EditorBrowsable(EditorBrowsableState.Never)]
424         public static readonly BindableProperty IsDiscreteProperty = BindableProperty.Create(nameof(IsDiscrete), typeof(bool), typeof(Slider), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
425         {
426             var instance = (Slider)bindable;
427             if (newValue != null)
428             {
429                 instance.InternalIsDiscrete = (bool)newValue;
430             }
431         },
432         defaultValueCreator: (bindable) =>
433         {
434             var instance = (Slider)bindable;
435             return instance.InternalIsDiscrete;
436         });
437
438         /// <summary>
439         /// DiscreteValueProperty
440         /// </summary>
441         [EditorBrowsable(EditorBrowsableState.Never)]
442         public static readonly BindableProperty DiscreteValueProperty = BindableProperty.Create(nameof(DiscreteValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
443         {
444             var instance = (Slider)bindable;
445             if (newValue != null)
446             {
447                 instance.InternalDiscreteValue = (float)newValue;
448             }
449         },
450         defaultValueCreator: (bindable) =>
451         {
452             var instance = (Slider)bindable;
453             return instance.InternalDiscreteValue;
454         });
455
456     }
457 }