1 using System.ComponentModel;
2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Binding;
5 namespace Tizen.NUI.Components
7 public partial class Slider
12 [EditorBrowsable(EditorBrowsableState.Never)]
13 public static readonly BindableProperty DirectionProperty = BindableProperty.Create(nameof(Direction), typeof(DirectionType), typeof(Slider), default(DirectionType), propertyChanged: (bindable, oldValue, newValue) =>
15 var instance = (Slider)bindable;
18 instance.InternalDirection = (DirectionType)newValue;
21 defaultValueCreator: (bindable) =>
23 var instance = (Slider)bindable;
24 return instance.InternalDirection;
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 public static readonly BindableProperty MinValueProperty = BindableProperty.Create(nameof(MinValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
33 var instance = (Slider)bindable;
36 instance.InternalMinValue = (float)newValue;
39 defaultValueCreator: (bindable) =>
41 var instance = (Slider)bindable;
42 return instance.InternalMinValue;
48 [EditorBrowsable(EditorBrowsableState.Never)]
49 public static readonly BindableProperty MaxValueProperty = BindableProperty.Create(nameof(MaxValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
51 var instance = (Slider)bindable;
54 instance.InternalMaxValue = (float)newValue;
57 defaultValueCreator: (bindable) =>
59 var instance = (Slider)bindable;
60 return instance.InternalMaxValue;
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 public static readonly BindableProperty ThumbSizeProperty = BindableProperty.Create(nameof(ThumbSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
69 var instance = (Slider)bindable;
72 instance.InternalThumbSize = newValue as Size;
75 defaultValueCreator: (bindable) =>
77 var instance = (Slider)bindable;
78 return instance.InternalThumbSize;
82 /// ThumbImageURLProperty
84 [EditorBrowsable(EditorBrowsableState.Never)]
85 public static readonly BindableProperty ThumbImageURLProperty = BindableProperty.Create(nameof(ThumbImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
87 var instance = (Slider)bindable;
90 instance.InternalThumbImageURL = newValue as string;
93 defaultValueCreator: (bindable) =>
95 var instance = (Slider)bindable;
96 return instance.InternalThumbImageURL;
100 /// ThumbImageURLSelectorProperty
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public static readonly BindableProperty ThumbImageURLSelectorProperty = BindableProperty.Create(nameof(ThumbImageURLSelector), typeof(StringSelector), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
105 var instance = (Slider)bindable;
106 instance.InternalThumbImageURLSelector = newValue as StringSelector;
108 defaultValueCreator: (bindable) =>
110 var instance = (Slider)bindable;
111 return instance.InternalThumbImageURLSelector;
115 /// ThumbImageUrlProperty
117 [EditorBrowsable(EditorBrowsableState.Never)]
118 public static readonly BindableProperty ThumbImageUrlProperty = BindableProperty.Create(nameof(ThumbImageUrl), typeof(Selector<string>), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
120 var instance = (Slider)bindable;
121 if (newValue != null)
123 instance.InternalThumbImageUrl = newValue as Tizen.NUI.BaseComponents.Selector<string>;
126 defaultValueCreator: (bindable) =>
128 var instance = (Slider)bindable;
129 return instance.InternalThumbImageUrl;
133 /// ThumbColorProperty
135 [EditorBrowsable(EditorBrowsableState.Never)]
136 public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
138 var instance = (Slider)bindable;
139 if (newValue != null)
141 instance.InternalThumbColor = newValue as Color;
144 defaultValueCreator: (bindable) =>
146 var instance = (Slider)bindable;
147 return instance.InternalThumbColor;
151 /// BgTrackColorProperty
153 [EditorBrowsable(EditorBrowsableState.Never)]
154 public static readonly BindableProperty BgTrackColorProperty = BindableProperty.Create(nameof(BgTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
156 var instance = (Slider)bindable;
157 if (newValue != null)
159 instance.InternalBgTrackColor = newValue as Color;
162 defaultValueCreator: (bindable) =>
164 var instance = (Slider)bindable;
165 return instance.InternalBgTrackColor;
169 /// SlidedTrackColorProperty
171 [EditorBrowsable(EditorBrowsableState.Never)]
172 public static readonly BindableProperty SlidedTrackColorProperty = BindableProperty.Create(nameof(SlidedTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
174 var instance = (Slider)bindable;
175 if (newValue != null)
177 instance.InternalSlidedTrackColor = newValue as Color;
180 defaultValueCreator: (bindable) =>
182 var instance = (Slider)bindable;
183 return instance.InternalSlidedTrackColor;
187 /// WarningStartValueProperty
189 [EditorBrowsable(EditorBrowsableState.Never)]
190 public static readonly BindableProperty WarningStartValueProperty = BindableProperty.Create(nameof(WarningStartValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
192 var instance = (Slider)bindable;
193 if (newValue != null)
195 instance.InternalWarningStartValue = (float)newValue;
198 defaultValueCreator: (bindable) =>
200 var instance = (Slider)bindable;
201 return instance.InternalWarningStartValue;
205 /// WarningTrackColorProperty
207 [EditorBrowsable(EditorBrowsableState.Never)]
208 public static readonly BindableProperty WarningTrackColorProperty = BindableProperty.Create(nameof(WarningTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
210 var instance = (Slider)bindable;
211 if (newValue != null)
213 instance.InternalWarningTrackColor = newValue as Color;
216 defaultValueCreator: (bindable) =>
218 var instance = (Slider)bindable;
219 return instance.InternalWarningTrackColor;
223 /// WarningSlidedTrackColorProperty
225 [EditorBrowsable(EditorBrowsableState.Never)]
226 public static readonly BindableProperty WarningSlidedTrackColorProperty = BindableProperty.Create(nameof(WarningSlidedTrackColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
228 var instance = (Slider)bindable;
229 if (newValue != null)
231 instance.InternalWarningSlidedTrackColor = newValue as Color;
234 defaultValueCreator: (bindable) =>
236 var instance = (Slider)bindable;
237 return instance.InternalWarningSlidedTrackColor;
241 /// WarningThumbImageUrlProperty
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) =>
246 var instance = (Slider)bindable;
247 if (newValue != null)
249 instance.InternalWarningThumbImageUrl = newValue as Tizen.NUI.BaseComponents.Selector<string>;
252 defaultValueCreator: (bindable) =>
254 var instance = (Slider)bindable;
255 return instance.InternalWarningThumbImageUrl;
259 /// WarningThumbColorProperty
261 [EditorBrowsable(EditorBrowsableState.Never)]
262 public static readonly BindableProperty WarningThumbColorProperty = BindableProperty.Create(nameof(WarningThumbColor), typeof(Color), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
264 var instance = (Slider)bindable;
265 if (newValue != null)
267 instance.InternalWarningThumbColor = newValue as Color;
270 defaultValueCreator: (bindable) =>
272 var instance = (Slider)bindable;
273 return instance.InternalWarningThumbColor;
277 /// LowIndicatorImageURLProperty
279 [EditorBrowsable(EditorBrowsableState.Never)]
280 public static readonly BindableProperty LowIndicatorImageURLProperty = BindableProperty.Create(nameof(LowIndicatorImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
282 var instance = (Slider)bindable;
283 if (newValue != null)
285 instance.InternalLowIndicatorImageURL = newValue as string;
288 defaultValueCreator: (bindable) =>
290 var instance = (Slider)bindable;
291 return instance.InternalLowIndicatorImageURL;
295 /// HighIndicatorImageURLProperty
297 [EditorBrowsable(EditorBrowsableState.Never)]
298 public static readonly BindableProperty HighIndicatorImageURLProperty = BindableProperty.Create(nameof(HighIndicatorImageURL), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
300 var instance = (Slider)bindable;
301 if (newValue != null)
303 instance.InternalHighIndicatorImageURL = newValue as string;
306 defaultValueCreator: (bindable) =>
308 var instance = (Slider)bindable;
309 return instance.InternalHighIndicatorImageURL;
313 /// LowIndicatorTextContentProperty
315 [EditorBrowsable(EditorBrowsableState.Never)]
316 public static readonly BindableProperty LowIndicatorTextContentProperty = BindableProperty.Create(nameof(LowIndicatorTextContent), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
318 var instance = (Slider)bindable;
319 if (newValue != null)
321 instance.InternalLowIndicatorTextContent = newValue as string;
324 defaultValueCreator: (bindable) =>
326 var instance = (Slider)bindable;
327 return instance.InternalLowIndicatorTextContent;
331 /// HighIndicatorTextContentProperty
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public static readonly BindableProperty HighIndicatorTextContentProperty = BindableProperty.Create(nameof(HighIndicatorTextContent), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
336 var instance = (Slider)bindable;
337 if (newValue != null)
339 instance.InternalHighIndicatorTextContent = newValue as string;
342 defaultValueCreator: (bindable) =>
344 var instance = (Slider)bindable;
345 return instance.InternalHighIndicatorTextContent;
349 /// LowIndicatorSizeProperty
351 [EditorBrowsable(EditorBrowsableState.Never)]
352 public static readonly BindableProperty LowIndicatorSizeProperty = BindableProperty.Create(nameof(LowIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
354 var instance = (Slider)bindable;
355 if (newValue as Size is var nVal && nVal != null)
357 instance.InternalLowIndicatorSize = nVal;
360 defaultValueCreator: (bindable) =>
362 var instance = (Slider)bindable;
363 return instance.InternalLowIndicatorSize;
367 /// HighIndicatorSizeProperty
369 [EditorBrowsable(EditorBrowsableState.Never)]
370 public static readonly BindableProperty HighIndicatorSizeProperty = BindableProperty.Create(nameof(HighIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
372 var instance = (Slider)bindable;
373 if (newValue as Size is var nVal && nVal != null)
375 instance.InternalHighIndicatorSize = nVal;
378 defaultValueCreator: (bindable) =>
380 var instance = (Slider)bindable;
381 return instance.InternalHighIndicatorSize;
385 /// ValueIndicatorSizeProperty
387 [EditorBrowsable(EditorBrowsableState.Never)]
388 public static readonly BindableProperty ValueIndicatorSizeProperty = BindableProperty.Create(nameof(ValueIndicatorSize), typeof(Size), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
390 var instance = (Slider)bindable;
391 if (newValue as Size is var nVal && nVal != null)
393 instance.InternalValueIndicatorSize = nVal;
396 defaultValueCreator: (bindable) =>
398 var instance = (Slider)bindable;
399 return instance.InternalValueIndicatorSize;
403 /// ValueIndicatorUrlProperty
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public static readonly BindableProperty ValueIndicatorUrlProperty = BindableProperty.Create(nameof(ValueIndicatorUrl), typeof(string), typeof(Slider), default(string), propertyChanged: (bindable, oldValue, newValue) =>
408 var instance = (Slider)bindable;
409 if (newValue != null)
411 instance.InternalValueIndicatorUrl = newValue as string;
414 defaultValueCreator: (bindable) =>
416 var instance = (Slider)bindable;
417 return instance.InternalValueIndicatorUrl;
421 /// IsDiscreteProperty
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public static readonly BindableProperty IsDiscreteProperty = BindableProperty.Create(nameof(IsDiscrete), typeof(bool), typeof(Slider), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
426 var instance = (Slider)bindable;
427 if (newValue != null)
429 instance.InternalIsDiscrete = (bool)newValue;
432 defaultValueCreator: (bindable) =>
434 var instance = (Slider)bindable;
435 return instance.InternalIsDiscrete;
439 /// DiscreteValueProperty
441 [EditorBrowsable(EditorBrowsableState.Never)]
442 public static readonly BindableProperty DiscreteValueProperty = BindableProperty.Create(nameof(DiscreteValue), typeof(float), typeof(Slider), default(float), propertyChanged: (bindable, oldValue, newValue) =>
444 var instance = (Slider)bindable;
445 if (newValue != null)
447 instance.InternalDiscreteValue = (float)newValue;
450 defaultValueCreator: (bindable) =>
452 var instance = (Slider)bindable;
453 return instance.InternalDiscreteValue;