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.
17 using System.ComponentModel;
18 using Tizen.NUI.Components;
19 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.Wearable
25 /// CircularScrollbarStyle is a class which saves CircularScrollbar's ux data.
27 [Obsolete("This has been deprecated in API12")]
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class CircularScrollbarStyle : ControlStyle
33 /// <summary>Bindable property of Thickness</summary>
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public static readonly BindableProperty ThicknessProperty = BindableProperty.Create(nameof(Thickness), typeof(float?), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
37 ((CircularScrollbarStyle)bindable).thickness = (float?)newValue;
39 defaultValueCreator: (bindable) =>
41 return ((CircularScrollbarStyle)bindable).thickness;
44 /// <summary>Bindable property of TrackSweepAngle</summary>
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 public static readonly BindableProperty TrackSweepAngleProperty = BindableProperty.Create(nameof(TrackSweepAngle), typeof(float?), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
48 ((CircularScrollbarStyle)bindable).trackSweepAngle = (float?)newValue;
50 defaultValueCreator: (bindable) =>
52 return ((CircularScrollbarStyle)bindable).trackSweepAngle;
55 /// <summary>Bindable property of TrackColor</summary>
56 [EditorBrowsable(EditorBrowsableState.Never)]
57 public static readonly BindableProperty TrackColorProperty = BindableProperty.Create(nameof(TrackColor), typeof(Color), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
59 ((CircularScrollbarStyle)bindable).trackColor = newValue == null ? null : new Color((Color)newValue);
61 defaultValueCreator: (bindable) =>
63 return ((CircularScrollbarStyle)bindable).trackColor;
66 /// <summary>Bindable property of ThumbColor</summary>
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(CircularScrollbarStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
70 ((CircularScrollbarStyle)bindable).thumbColor = newValue == null ? null : new Color((Color)newValue);
72 defaultValueCreator: (bindable) =>
74 return ((CircularScrollbarStyle)bindable).thumbColor;
77 private float? thickness;
78 private float? trackSweepAngle;
79 private Color trackColor;
80 private Color thumbColor;
88 /// Creates a new instance of a CircularScrollbarStyle.
90 [Obsolete("This has been deprecated in API12")]
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public CircularScrollbarStyle() : base()
99 /// <param name="style">Create ScrollbarStyle by style customized by user.</param>
100 [Obsolete("This has been deprecated in API12")]
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public CircularScrollbarStyle(CircularScrollbarStyle style) : base(style)
107 /// Static constructor to initialize bindable properties when loading.
109 static CircularScrollbarStyle()
113 #endregion Constructors
119 /// The thickness of the scrollbar and track.
121 [Obsolete("This has been deprecated in API12")]
122 [EditorBrowsable(EditorBrowsableState.Never)]
123 public float? Thickness
125 get => (float?)GetValue(ThicknessProperty);
126 set => SetValue(ThicknessProperty, value);
130 /// The sweep angle of track area in degrees.
133 /// Values below 6 degrees are treated as 6 degrees.
134 /// Values exceeding 180 degrees are treated as 180 degrees.
136 [Obsolete("This has been deprecated in API12")]
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public float? TrackSweepAngle
140 get => (float?)GetValue(TrackSweepAngleProperty);
141 set => SetValue(TrackSweepAngleProperty, value);
145 /// The color of the track part.
147 [Obsolete("This has been deprecated in API12")]
148 [EditorBrowsable(EditorBrowsableState.Never)]
149 public Color TrackColor
151 get => (Color)GetValue(TrackColorProperty);
152 set => SetValue(TrackColorProperty, value);
156 /// The color of the thumb part.
158 [Obsolete("This has been deprecated in API12")]
159 [EditorBrowsable(EditorBrowsableState.Never)]
160 public Color ThumbColor
162 get => (Color)GetValue(ThumbColorProperty);
163 set => SetValue(ThumbColorProperty, value);
166 #endregion Properties