2 * Copyright(c) 2020 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.Binding;
20 namespace Tizen.NUI.BaseComponents
22 public partial class ViewStyle
24 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
28 var viewStyle = (ViewStyle)bindable;
29 viewStyle.styleName = (string)newValue;
31 defaultValueCreator: (bindable) =>
33 var viewStyle = (ViewStyle)bindable;
34 return viewStyle.styleName;
36 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public static readonly BindableProperty BackgroundImageSelectorProperty = BindableProperty.Create("BackgroundImageSelector", typeof(Selector<string>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
40 var viewStyle = (ViewStyle)bindable;
44 viewStyle.backgroundImageSelector = null;
48 viewStyle.backgroundImageSelector = ((Selector<string>)newValue).Clone();
49 viewStyle.backgroundColorSelector = null;
52 defaultValueCreator: (bindable) =>
54 var viewStyle = (ViewStyle)bindable;
55 return viewStyle.backgroundImageSelector;
57 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
58 [EditorBrowsable(EditorBrowsableState.Never)]
59 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(View.States?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
61 var viewStyle = (ViewStyle)bindable;
62 viewStyle.state = (View.States?)newValue;
64 defaultValueCreator: (bindable) =>
66 var viewStyle = (ViewStyle)bindable;
67 return viewStyle.state;
69 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(View.States?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
73 var viewStyle = (ViewStyle)bindable;
74 viewStyle.subState = (View.States?)newValue;
76 defaultValueCreator: (bindable) =>
78 var viewStyle = (ViewStyle)bindable;
79 return viewStyle.subState;
81 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
82 [EditorBrowsable(EditorBrowsableState.Never)]
83 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
85 var viewStyle = (ViewStyle)bindable;
86 viewStyle.flex = (float?)newValue;
88 defaultValueCreator: (bindable) =>
90 var viewStyle = (ViewStyle)bindable;
91 return viewStyle.flex;
93 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
94 [EditorBrowsable(EditorBrowsableState.Never)]
95 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
97 var viewStyle = (ViewStyle)bindable;
98 viewStyle.alignSelf = (int?)newValue;
100 defaultValueCreator: (bindable) =>
102 var viewStyle = (ViewStyle)bindable;
103 return viewStyle.alignSelf;
105 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
106 [EditorBrowsable(EditorBrowsableState.Never)]
107 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
109 var viewStyle = (ViewStyle)bindable;
110 viewStyle.flexMargin = (Vector4)newValue;
112 defaultValueCreator: (bindable) =>
114 var viewStyle = (ViewStyle)bindable;
115 return viewStyle.flexMargin;
117 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
121 var viewStyle = (ViewStyle)bindable;
122 viewStyle.cellIndex = (Vector2)newValue;
124 defaultValueCreator: (bindable) =>
126 var viewStyle = (ViewStyle)bindable;
127 return viewStyle.cellIndex;
129 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
133 var viewStyle = (ViewStyle)bindable;
134 viewStyle.rowSpan = (float?)newValue;
136 defaultValueCreator: (bindable) =>
138 var viewStyle = (ViewStyle)bindable;
139 return viewStyle.rowSpan;
141 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
142 [EditorBrowsable(EditorBrowsableState.Never)]
143 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
145 var viewStyle = (ViewStyle)bindable;
146 viewStyle.columnSpan = (float?)newValue;
148 defaultValueCreator: (bindable) =>
150 var viewStyle = (ViewStyle)bindable;
151 return viewStyle.columnSpan;
153 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
154 [EditorBrowsable(EditorBrowsableState.Never)]
155 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
157 var viewStyle = (ViewStyle)bindable;
158 viewStyle.cellHorizontalAlignment = (HorizontalAlignmentType?)newValue;
160 defaultValueCreator: (bindable) =>
162 var viewStyle = (ViewStyle)bindable;
163 return viewStyle.cellHorizontalAlignment;
165 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
166 [EditorBrowsable(EditorBrowsableState.Never)]
167 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
169 var viewStyle = (ViewStyle)bindable;
170 viewStyle.cellVerticalAlignment = (VerticalAlignmentType?)newValue;
172 defaultValueCreator: (bindable) =>
174 var viewStyle = (ViewStyle)bindable;
175 return viewStyle.cellVerticalAlignment;
177 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
178 [EditorBrowsable(EditorBrowsableState.Never)]
179 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(LeftFocusableView), typeof(View), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
181 var viewStyle = (ViewStyle)bindable;
182 viewStyle.leftFocusableView = (View)newValue;
184 defaultValueCreator: (bindable) =>
186 var viewStyle = (ViewStyle)bindable;
187 return viewStyle.leftFocusableView;
189 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
190 [EditorBrowsable(EditorBrowsableState.Never)]
191 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(RightFocusableView), typeof(View), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
193 var viewStyle = (ViewStyle)bindable;
194 viewStyle.rightFocusableView = (View)newValue;
196 defaultValueCreator: (bindable) =>
198 var viewStyle = (ViewStyle)bindable;
199 return viewStyle.rightFocusableView;
201 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
202 [EditorBrowsable(EditorBrowsableState.Never)]
203 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(UpFocusableView), typeof(View), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
205 var viewStyle = (ViewStyle)bindable;
206 viewStyle.upFocusableView = (View)newValue;
208 defaultValueCreator: (bindable) =>
210 var viewStyle = (ViewStyle)bindable;
211 return viewStyle.upFocusableView;
213 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(DownFocusableView), typeof(View), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
217 var viewStyle = (ViewStyle)bindable;
218 viewStyle.downFocusableView = (View)newValue;
220 defaultValueCreator: (bindable) =>
222 var viewStyle = (ViewStyle)bindable;
223 return viewStyle.downFocusableView;
225 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
229 var viewStyle = (ViewStyle)bindable;
230 viewStyle.focusable = (bool?)newValue;
232 defaultValueCreator: (bindable) =>
234 var viewStyle = (ViewStyle)bindable;
235 return viewStyle.focusable;
237 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
241 var viewStyle = (ViewStyle)bindable;
242 viewStyle.size = newValue == null ? null : new Size((Size2D)newValue);
244 defaultValueCreator: (bindable) =>
246 var viewStyle = (ViewStyle)bindable;
247 return viewStyle.size == null ? null : (Size2D)viewStyle.size;
249 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
253 ((ViewStyle)bindable).opacitySelector = ((Selector<float?>)newValue)?.Clone();
255 defaultValueCreator: (bindable) =>
257 var controlStyle = (ViewStyle)bindable;
258 return controlStyle.opacitySelector;
260 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
261 [EditorBrowsable(EditorBrowsableState.Never)]
262 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
264 var viewStyle = (ViewStyle)bindable;
265 viewStyle.position = newValue == null ? null : new Position((Position2D)newValue);
267 defaultValueCreator: (bindable) =>
269 var viewStyle = (ViewStyle)bindable;
270 return viewStyle.position == null ? null : new Position2D(viewStyle.position);
272 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
273 [EditorBrowsable(EditorBrowsableState.Never)]
274 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
276 var viewStyle = (ViewStyle)bindable;
277 viewStyle.positionUsesPivotPoint = (bool?)newValue;
279 defaultValueCreator: (bindable) =>
281 var viewStyle = (ViewStyle)bindable;
282 return viewStyle.positionUsesPivotPoint;
284 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
285 [EditorBrowsable(EditorBrowsableState.Never)]
286 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
288 var viewStyle = (ViewStyle)bindable;
289 viewStyle.siblingOrder = (int?)newValue;
291 defaultValueCreator: (bindable) =>
293 var viewStyle = (ViewStyle)bindable;
294 return viewStyle.siblingOrder;
296 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
297 [EditorBrowsable(EditorBrowsableState.Never)]
298 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
300 var viewStyle = (ViewStyle)bindable;
301 viewStyle.parentOrigin = (Position)newValue;
303 defaultValueCreator: (bindable) =>
305 var viewStyle = (ViewStyle)bindable;
306 return viewStyle.parentOrigin;
308 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
309 [EditorBrowsable(EditorBrowsableState.Never)]
310 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
312 var viewStyle = (ViewStyle)bindable;
313 viewStyle.pivotPoint = (Position)newValue;
315 defaultValueCreator: (bindable) =>
317 var viewStyle = (ViewStyle)bindable;
318 return viewStyle.pivotPoint;
320 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
321 [EditorBrowsable(EditorBrowsableState.Never)]
322 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
324 var viewStyle = (ViewStyle)bindable;
325 if (newValue != null)
327 if (viewStyle.size == null)
329 if ((float)newValue == 0) return;
331 viewStyle.size = new Size((float)newValue, viewStyle.size?.Height ?? 0);
334 defaultValueCreator: (bindable) =>
336 return ((ViewStyle)bindable).size?.Width;
338 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
339 [EditorBrowsable(EditorBrowsableState.Never)]
340 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
342 var viewStyle = (ViewStyle)bindable;
343 if (newValue != null)
345 if (viewStyle.size == null)
347 if ((float)newValue == 0) return;
349 viewStyle.size = new Size(viewStyle.size?.Width ?? 0, (float)newValue);
352 defaultValueCreator: (bindable) =>
354 return ((ViewStyle)bindable).size?.Height;
356 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
357 [EditorBrowsable(EditorBrowsableState.Never)]
358 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
360 var viewStyle = (ViewStyle)bindable;
361 viewStyle.position = (Position)newValue;
362 if (viewStyle.position != null && viewStyle.position.X == 0 && viewStyle.position.Y == 0)
364 viewStyle.position = null;
367 defaultValueCreator: (bindable) =>
369 var viewStyle = (ViewStyle)bindable;
370 return viewStyle.position;
372 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
373 [EditorBrowsable(EditorBrowsableState.Never)]
374 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
376 var viewStyle = (ViewStyle)bindable;
377 if (newValue != null)
379 if (viewStyle.position == null)
381 if ((float)newValue == 0) return;
383 viewStyle.position = new Position((float)newValue, viewStyle.position?.Y ?? 0);
386 defaultValueCreator: (bindable) =>
388 return ((ViewStyle)bindable).position?.X;
390 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
394 var viewStyle = (ViewStyle)bindable;
395 if (newValue != null)
397 if (viewStyle.position == null)
399 if ((float)newValue == 0) return;
401 viewStyle.position = new Position(viewStyle.position?.X ?? 0, (float)newValue);
404 defaultValueCreator: (bindable) =>
406 return ((ViewStyle)bindable).position?.Y;
408 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
409 [EditorBrowsable(EditorBrowsableState.Never)]
410 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
412 var viewStyle = (ViewStyle)bindable;
413 if (newValue != null)
415 if (viewStyle.position == null)
417 if ((float)newValue == 0) return;
419 viewStyle.position = new Position(viewStyle.Position?.X ?? 0, viewStyle.Position?.Y ?? 0, (float)newValue);
422 defaultValueCreator: (bindable) =>
424 return ((ViewStyle)bindable).position?.Z;
426 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
427 [EditorBrowsable(EditorBrowsableState.Never)]
428 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
430 var viewStyle = (ViewStyle)bindable;
431 viewStyle.orientation = (Rotation)newValue;
433 defaultValueCreator: (bindable) =>
435 var viewStyle = (ViewStyle)bindable;
436 return viewStyle.orientation;
438 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
439 [EditorBrowsable(EditorBrowsableState.Never)]
440 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
442 var viewStyle = (ViewStyle)bindable;
443 viewStyle.scale = (Vector3)newValue;
444 if (viewStyle.scale != null && viewStyle.scale.X == 1.0f && viewStyle.scale.Y == 1.0f && viewStyle.scale.Z == 1.0f) return;
446 defaultValueCreator: (bindable) =>
448 var viewStyle = (ViewStyle)bindable;
449 return viewStyle.scale;
451 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
455 var viewStyle = (ViewStyle)bindable;
456 if (newValue != null)
458 if (viewStyle.scale == null)
460 if ((float)newValue == 1.0f) return;
462 viewStyle.scale = new Vector3((float)newValue, viewStyle.scale?.Y ?? 0, viewStyle.scale?.Z ?? 0);
465 defaultValueCreator: (bindable) =>
467 return ((ViewStyle)bindable).scale?.X;
469 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
470 [EditorBrowsable(EditorBrowsableState.Never)]
471 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
473 var viewStyle = (ViewStyle)bindable;
474 if (newValue != null)
476 if (viewStyle.scale == null)
478 if ((float)newValue == 1.0f) return;
480 viewStyle.scale = new Vector3(viewStyle.scale?.X ?? 0, (float)newValue, viewStyle.scale?.Z ?? 0);
483 defaultValueCreator: (bindable) =>
485 return ((ViewStyle)bindable).scale?.Y;
487 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
488 [EditorBrowsable(EditorBrowsableState.Never)]
489 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
491 var viewStyle = (ViewStyle)bindable;
492 if (newValue != null)
494 if (viewStyle.scale == null)
496 if ((float)newValue == 1.0f) return;
498 viewStyle.scale = new Vector3(viewStyle.scale?.X ?? 0, viewStyle.scale?.Y ?? 0, (float)newValue);
501 defaultValueCreator: (bindable) =>
503 return ((ViewStyle)bindable).scale?.Z;
505 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
506 [EditorBrowsable(EditorBrowsableState.Never)]
507 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
509 var viewStyle = (ViewStyle)bindable;
510 viewStyle.name = (string)newValue;
512 defaultValueCreator: (bindable) =>
514 var viewStyle = (ViewStyle)bindable;
515 return viewStyle.name;
517 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
518 [EditorBrowsable(EditorBrowsableState.Never)]
519 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
521 var viewStyle = (ViewStyle)bindable;
522 viewStyle.sensitive = (bool?)newValue;
524 defaultValueCreator: (bindable) =>
526 var viewStyle = (ViewStyle)bindable;
527 return viewStyle.sensitive;
529 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
530 [EditorBrowsable(EditorBrowsableState.Never)]
531 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
533 var viewStyle = (ViewStyle)bindable;
534 viewStyle.leaveRequired = (bool?)newValue;
536 defaultValueCreator: (bindable) =>
538 var viewStyle = (ViewStyle)bindable;
539 return viewStyle.leaveRequired;
541 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
542 [EditorBrowsable(EditorBrowsableState.Never)]
543 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
545 var viewStyle = (ViewStyle)bindable;
546 viewStyle.inheritOrientation = (bool?)newValue;
548 defaultValueCreator: (bindable) =>
550 var viewStyle = (ViewStyle)bindable;
551 return viewStyle.inheritOrientation;
553 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
554 [EditorBrowsable(EditorBrowsableState.Never)]
555 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
557 var viewStyle = (ViewStyle)bindable;
558 viewStyle.inheritScale = (bool?)newValue;
560 defaultValueCreator: (bindable) =>
562 var viewStyle = (ViewStyle)bindable;
563 return viewStyle.inheritScale;
565 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
566 [EditorBrowsable(EditorBrowsableState.Never)]
567 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
569 var viewStyle = (ViewStyle)bindable;
570 viewStyle.drawMode = (DrawModeType?)newValue;
572 defaultValueCreator: (bindable) =>
574 var viewStyle = (ViewStyle)bindable;
575 return viewStyle.drawMode;
577 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
578 [EditorBrowsable(EditorBrowsableState.Never)]
579 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
581 var viewStyle = (ViewStyle)bindable;
582 viewStyle.sizeModeFactor = (Vector3)newValue;
584 defaultValueCreator: (bindable) =>
586 var viewStyle = (ViewStyle)bindable;
587 return viewStyle.sizeModeFactor;
589 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
590 [EditorBrowsable(EditorBrowsableState.Never)]
591 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
593 var viewStyle = (ViewStyle)bindable;
594 viewStyle.widthResizePolicy = (ResizePolicyType?)newValue;
596 defaultValueCreator: (bindable) =>
598 var viewStyle = (ViewStyle)bindable;
599 return viewStyle.widthResizePolicy;
601 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
602 [EditorBrowsable(EditorBrowsableState.Never)]
603 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
605 var viewStyle = (ViewStyle)bindable;
606 viewStyle.heightResizePolicy = (ResizePolicyType?)newValue;
608 defaultValueCreator: (bindable) =>
610 var viewStyle = (ViewStyle)bindable;
611 return viewStyle.heightResizePolicy;
613 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
614 [EditorBrowsable(EditorBrowsableState.Never)]
615 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
617 var viewStyle = (ViewStyle)bindable;
618 viewStyle.sizeScalePolicy = (SizeScalePolicyType?)newValue;
620 defaultValueCreator: (bindable) =>
622 var viewStyle = (ViewStyle)bindable;
623 return viewStyle.sizeScalePolicy;
625 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
626 [EditorBrowsable(EditorBrowsableState.Never)]
627 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
629 var viewStyle = (ViewStyle)bindable;
630 viewStyle.widthForHeight = (bool?)newValue;
632 defaultValueCreator: (bindable) =>
634 var viewStyle = (ViewStyle)bindable;
635 return viewStyle.widthForHeight;
637 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
638 [EditorBrowsable(EditorBrowsableState.Never)]
639 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
641 var viewStyle = (ViewStyle)bindable;
642 viewStyle.heightForWidth = (bool?)newValue;
644 defaultValueCreator: (bindable) =>
646 var viewStyle = (ViewStyle)bindable;
647 return viewStyle.heightForWidth;
649 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
650 [EditorBrowsable(EditorBrowsableState.Never)]
651 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
653 var viewStyle = (ViewStyle)bindable;
654 if (null == viewStyle.padding) viewStyle.padding = new Extents(viewStyle.OnPaddingChanged, 0, 0, 0, 0);
655 viewStyle.padding.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
657 defaultValueCreator: (bindable) =>
659 var viewStyle = (ViewStyle)bindable;
660 return viewStyle.padding;
662 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
663 [EditorBrowsable(EditorBrowsableState.Never)]
664 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
666 var viewStyle = (ViewStyle)bindable;
667 viewStyle.minimumSize = (Size2D)newValue;
669 defaultValueCreator: (bindable) =>
671 var viewStyle = (ViewStyle)bindable;
672 return viewStyle.minimumSize;
674 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
675 [EditorBrowsable(EditorBrowsableState.Never)]
676 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
678 var viewStyle = (ViewStyle)bindable;
679 viewStyle.maximumSize = (Size2D)newValue;
681 defaultValueCreator: (bindable) =>
683 var viewStyle = (ViewStyle)bindable;
684 return viewStyle.maximumSize;
686 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
687 [EditorBrowsable(EditorBrowsableState.Never)]
688 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
690 var viewStyle = (ViewStyle)bindable;
691 viewStyle.inheritPosition = (bool?)newValue;
693 defaultValueCreator: (bindable) =>
695 var viewStyle = (ViewStyle)bindable;
696 return viewStyle.inheritPosition;
698 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
699 [EditorBrowsable(EditorBrowsableState.Never)]
700 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
702 var viewStyle = (ViewStyle)bindable;
703 viewStyle.clippingMode = (ClippingModeType?)newValue;
705 defaultValueCreator: (bindable) =>
707 var viewStyle = (ViewStyle)bindable;
708 return viewStyle.clippingMode;
710 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
711 [EditorBrowsable(EditorBrowsableState.Never)]
712 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
714 var viewStyle = (ViewStyle)bindable;
715 viewStyle.size = (Size)newValue;
716 if (viewStyle.size != null && viewStyle.size.Width == 0 && viewStyle.size.Height == 0)
718 viewStyle.size = null;
721 defaultValueCreator: (bindable) =>
723 var viewStyle = (ViewStyle)bindable;
724 return viewStyle.size;
726 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
727 [EditorBrowsable(EditorBrowsableState.Never)]
728 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
730 var viewStyle = (ViewStyle)bindable;
731 viewStyle.inheritLayoutDirection = (bool?)newValue;
733 defaultValueCreator: (bindable) =>
735 var viewStyle = (ViewStyle)bindable;
736 return viewStyle.inheritLayoutDirection;
738 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
739 [EditorBrowsable(EditorBrowsableState.Never)]
740 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
742 var viewStyle = (ViewStyle)bindable;
743 viewStyle.layoutDirection = (ViewLayoutDirectionType?)newValue;
745 defaultValueCreator: (bindable) =>
747 var viewStyle = (ViewStyle)bindable;
748 return viewStyle.layoutDirection;
750 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
751 [EditorBrowsable(EditorBrowsableState.Never)]
752 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
754 var viewStyle = (ViewStyle)bindable;
755 if (null == viewStyle.margin) viewStyle.margin = new Extents(viewStyle.OnMarginChanged, 0, 0, 0, 0);
756 viewStyle.margin.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
758 defaultValueCreator: (bindable) =>
760 var viewStyle = (ViewStyle)bindable;
761 return viewStyle.margin;
763 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
764 [EditorBrowsable(EditorBrowsableState.Never)]
765 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
767 var viewStyle = (ViewStyle)bindable;
768 viewStyle.weight = (float?)newValue;
770 defaultValueCreator: (bindable) =>
772 var viewStyle = (ViewStyle)bindable;
773 return viewStyle.weight;
775 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
776 [EditorBrowsable(EditorBrowsableState.Never)]
777 public static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
779 var viewStyle = (ViewStyle)bindable;
781 if (newValue == null)
783 viewStyle.backgroundColorSelector = null;
787 viewStyle.backgroundColorSelector = ((Selector<Color>)newValue).Clone();
788 viewStyle.backgroundImageSelector = null;
792 defaultValueCreator: (bindable) =>
794 var viewStyle = (ViewStyle)bindable;
795 return viewStyle.backgroundColorSelector;
798 [EditorBrowsable(EditorBrowsableState.Never)]
799 public static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
801 ((ViewStyle)bindable).colorSelector = ((Selector<Color>)newValue)?.Clone();
803 defaultValueCreator: (bindable) =>
805 var viewStyle = (ViewStyle)bindable;
806 return viewStyle.colorSelector;
809 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
810 [EditorBrowsable(EditorBrowsableState.Never)]
811 public static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
813 ((ViewStyle)bindable).backgroundImageBorderSelector = ((Selector<Rectangle>)newValue)?.Clone();
815 defaultValueCreator: (bindable) =>
817 var viewStyle = (ViewStyle)bindable;
818 return viewStyle.backgroundImageBorderSelector;
821 /// A BindableProperty for ImageShadow
822 [EditorBrowsable(EditorBrowsableState.Never)]
823 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
825 var viewStyle = (ViewStyle)bindable;
827 viewStyle.imageShadow = ((Selector<ImageShadow>)newValue)?.Clone();
829 if (viewStyle.imageShadow != null)
831 viewStyle.boxShadow = null;
834 defaultValueCreator: (bindable) =>
836 var viewStyle = (ViewStyle)bindable;
837 return viewStyle.imageShadow;
840 /// A BindableProperty for BoxShadow
841 [EditorBrowsable(EditorBrowsableState.Never)]
842 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
844 var viewStyle = (ViewStyle)bindable;
846 viewStyle.boxShadow = ((Selector<Shadow>)newValue)?.Clone();
848 if (viewStyle.boxShadow != null)
850 viewStyle.imageShadow = null;
853 defaultValueCreator: (bindable) =>
855 var viewStyle = (ViewStyle)bindable;
856 return viewStyle.boxShadow;
859 /// A BindableProperty for CornerRadius
860 [EditorBrowsable(EditorBrowsableState.Never)]
861 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
863 ((ViewStyle)bindable).cornerRadius = ((Selector<float?>)(newValue))?.Clone();
865 defaultValueCreator: (bindable) =>
867 var viewStyle = (ViewStyle)bindable;
868 return viewStyle.cornerRadius;
871 /// <summary> A BindableProperty for CornerRadiusPolicy </summary>
872 [EditorBrowsable(EditorBrowsableState.Never)]
873 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType?), typeof(ViewStyle), null,
874 propertyChanged: (bindable, oldValue, newValue) => ((ViewStyle)bindable).cornerRadiusPolicy = (VisualTransformPolicyType?)newValue,
875 defaultValueCreator: (bindable) => ((ViewStyle)bindable).cornerRadiusPolicy
879 /// EnableControlState property
881 [EditorBrowsable(EditorBrowsableState.Never)]
882 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
884 ((ViewStyle)bindable).enableControlState = (bool?)newValue;
886 defaultValueCreator: (bindable) =>
888 return ((ViewStyle)bindable).enableControlState;
892 /// EnableControlState property
894 [EditorBrowsable(EditorBrowsableState.Never)]
895 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
897 ((ViewStyle)bindable).themeChangeSensitive = (bool?)newValue;
899 defaultValueCreator: (bindable) =>
901 return ((ViewStyle)bindable).themeChangeSensitive;