1 using System.ComponentModel;
2 using Tizen.NUI.Binding;
4 namespace Tizen.NUI.Components
6 public partial class ScrollableBase
9 /// ScrollingDirectionProperty
11 [EditorBrowsable(EditorBrowsableState.Never)]
12 public static readonly BindableProperty ScrollingDirectionProperty = BindableProperty.Create(nameof(ScrollingDirection), typeof(Direction), typeof(ScrollableBase), default(Direction), propertyChanged: (bindable, oldValue, newValue) =>
14 var instance = (ScrollableBase)bindable;
17 instance.InternalScrollingDirection = (Direction)newValue;
20 defaultValueCreator: (bindable) =>
22 var instance = (ScrollableBase)bindable;
23 return instance.InternalScrollingDirection;
27 /// ScrollEnabledProperty
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public static readonly BindableProperty ScrollEnabledProperty = BindableProperty.Create(nameof(ScrollEnabled), typeof(bool), typeof(ScrollableBase), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
32 var instance = (ScrollableBase)bindable;
35 instance.InternalScrollEnabled = (bool)newValue;
38 defaultValueCreator: (bindable) =>
40 var instance = (ScrollableBase)bindable;
41 return instance.InternalScrollEnabled;
45 /// SnapToPageProperty
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public static readonly BindableProperty SnapToPageProperty = BindableProperty.Create(nameof(SnapToPage), typeof(bool), typeof(ScrollableBase), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
50 var instance = (ScrollableBase)bindable;
53 instance.InternalSnapToPage = (bool)newValue;
56 defaultValueCreator: (bindable) =>
58 var instance = (ScrollableBase)bindable;
59 return instance.InternalSnapToPage;
63 /// ScrollDurationProperty
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public static readonly BindableProperty ScrollDurationProperty = BindableProperty.Create(nameof(ScrollDuration), typeof(int), typeof(ScrollableBase), default(int), propertyChanged: (bindable, oldValue, newValue) =>
68 var instance = (ScrollableBase)bindable;
71 instance.InternalScrollDuration = (int)newValue;
74 defaultValueCreator: (bindable) =>
76 var instance = (ScrollableBase)bindable;
77 return instance.InternalScrollDuration;
81 /// ScrollAvailableAreaProperty
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public static readonly BindableProperty ScrollAvailableAreaProperty = BindableProperty.Create(nameof(ScrollAvailableArea), typeof(Vector2), typeof(ScrollableBase), null, propertyChanged: (bindable, oldValue, newValue) =>
86 var instance = (ScrollableBase)bindable;
89 instance.InternalScrollAvailableArea = newValue as Vector2;
92 defaultValueCreator: (bindable) =>
94 var instance = (ScrollableBase)bindable;
95 return instance.InternalScrollAvailableArea;
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public static readonly BindableProperty ScrollbarProperty = BindableProperty.Create(nameof(Scrollbar), typeof(ScrollbarBase), typeof(ScrollableBase), null, propertyChanged: (bindable, oldValue, newValue) =>
104 var instance = (ScrollableBase)bindable;
105 if (newValue != null)
107 instance.InternalScrollbar = newValue as ScrollbarBase;
110 defaultValueCreator: (bindable) =>
112 var instance = (ScrollableBase)bindable;
113 return instance.InternalScrollbar;
117 /// HideScrollbarProperty
119 [EditorBrowsable(EditorBrowsableState.Never)]
120 public static readonly BindableProperty HideScrollbarProperty = BindableProperty.Create(nameof(HideScrollbar), typeof(bool), typeof(ScrollableBase), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
122 var instance = (ScrollableBase)bindable;
123 if (newValue != null)
125 instance.InternalHideScrollbar = (bool)newValue;
128 defaultValueCreator: (bindable) =>
130 var instance = (ScrollableBase)bindable;
131 return instance.InternalHideScrollbar;
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public static readonly new BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(LayoutItem), typeof(ScrollableBase), null, propertyChanged: (bindable, oldValue, newValue) =>
140 var instance = (ScrollableBase)bindable;
141 if (newValue != null)
143 instance.InternalLayout = newValue as LayoutItem;
146 defaultValueCreator: (bindable) =>
148 var instance = (ScrollableBase)bindable;
149 return instance.InternalLayout;
153 /// DecelerationRateProperty
155 [EditorBrowsable(EditorBrowsableState.Never)]
156 public static readonly BindableProperty DecelerationRateProperty = BindableProperty.Create(nameof(DecelerationRate), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
158 var instance = (ScrollableBase)bindable;
159 if (newValue != null)
161 instance.InternalDecelerationRate = (float)newValue;
164 defaultValueCreator: (bindable) =>
166 var instance = (ScrollableBase)bindable;
167 return instance.InternalDecelerationRate;
171 /// DecelerationThresholdProperty
173 [EditorBrowsable(EditorBrowsableState.Never)]
174 public static readonly BindableProperty DecelerationThresholdProperty = BindableProperty.Create(nameof(DecelerationThreshold), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
176 var instance = (ScrollableBase)bindable;
177 if (newValue != null)
179 instance.InternalDecelerationThreshold = (float)newValue;
182 defaultValueCreator: (bindable) =>
184 var instance = (ScrollableBase)bindable;
185 return instance.InternalDecelerationThreshold;
189 /// ScrollingEventThresholdProperty
191 [EditorBrowsable(EditorBrowsableState.Never)]
192 public static readonly BindableProperty ScrollingEventThresholdProperty = BindableProperty.Create(nameof(ScrollingEventThreshold), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
194 var instance = (ScrollableBase)bindable;
195 if (newValue != null)
197 instance.InternalScrollingEventThreshold = (float)newValue;
200 defaultValueCreator: (bindable) =>
202 var instance = (ScrollableBase)bindable;
203 return instance.InternalScrollingEventThreshold;
207 /// PageFlickThresholdProperty
209 [EditorBrowsable(EditorBrowsableState.Never)]
210 public static readonly BindableProperty PageFlickThresholdProperty = BindableProperty.Create(nameof(PageFlickThreshold), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
212 var instance = (ScrollableBase)bindable;
213 if (newValue != null)
215 instance.InternalPageFlickThreshold = (float)newValue;
218 defaultValueCreator: (bindable) =>
220 var instance = (ScrollableBase)bindable;
221 return instance.InternalPageFlickThreshold;
227 [EditorBrowsable(EditorBrowsableState.Never)]
228 public static readonly new BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(ScrollableBase), null, propertyChanged: (bindable, oldValue, newValue) =>
230 var instance = (ScrollableBase)bindable;
231 if (newValue != null)
233 instance.InternalPadding = newValue as Extents;
236 defaultValueCreator: (bindable) =>
238 var instance = (ScrollableBase)bindable;
239 return instance.InternalPadding;
243 /// ScrollAlphaFunctionProperty
245 [EditorBrowsable(EditorBrowsableState.Never)]
246 public static readonly BindableProperty ScrollAlphaFunctionProperty = BindableProperty.Create(nameof(ScrollAlphaFunction), typeof(AlphaFunction), typeof(ScrollableBase), null, propertyChanged: (bindable, oldValue, newValue) =>
248 var instance = (ScrollableBase)bindable;
249 if (newValue != null)
251 instance.InternalScrollAlphaFunction = newValue as AlphaFunction;
254 defaultValueCreator: (bindable) =>
256 var instance = (ScrollableBase)bindable;
257 return instance.InternalScrollAlphaFunction;
261 /// NoticeAnimationEndBeforePositionProperty
263 [EditorBrowsable(EditorBrowsableState.Never)]
264 public static readonly BindableProperty NoticeAnimationEndBeforePositionProperty = BindableProperty.Create(nameof(NoticeAnimationEndBeforePosition), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
266 var instance = (ScrollableBase)bindable;
267 if (newValue != null)
269 instance.InternalNoticeAnimationEndBeforePosition = (float)newValue;
272 defaultValueCreator: (bindable) =>
274 var instance = (ScrollableBase)bindable;
275 return instance.InternalNoticeAnimationEndBeforePosition;
279 /// EnableOverShootingEffectProperty
281 [EditorBrowsable(EditorBrowsableState.Never)]
282 public static readonly BindableProperty EnableOverShootingEffectProperty = BindableProperty.Create(nameof(EnableOverShootingEffect), typeof(bool), typeof(ScrollableBase), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
284 var instance = (ScrollableBase)bindable;
285 if (newValue != null)
287 instance.InternalEnableOverShootingEffect = (bool)newValue;
290 defaultValueCreator: (bindable) =>
292 var instance = (ScrollableBase)bindable;
293 return instance.InternalEnableOverShootingEffect;
297 /// StepScrollDistanceProperty
299 [EditorBrowsable(EditorBrowsableState.Never)]
300 public static readonly BindableProperty StepScrollDistanceProperty = BindableProperty.Create(nameof(StepScrollDistance), typeof(float), typeof(ScrollableBase), default(float), propertyChanged: (bindable, oldValue, newValue) =>
302 var instance = (ScrollableBase)bindable;
303 if (newValue != null)
305 instance.stepScrollDistance = (float)newValue;
308 defaultValueCreator: (bindable) =>
310 var instance = (ScrollableBase)bindable;
311 return instance.stepScrollDistance;