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;
330 viewStyle.size = new Size();
332 viewStyle.size.Width = (float)newValue;
335 defaultValueCreator: (bindable) =>
337 return ((ViewStyle)bindable).size?.Width;
339 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
343 var viewStyle = (ViewStyle)bindable;
344 if (newValue != null)
346 if (viewStyle.size == null)
348 if ((float)newValue == 0) return;
349 viewStyle.size = new Size();
351 viewStyle.size.Height = (float)newValue;
354 defaultValueCreator: (bindable) =>
356 return ((ViewStyle)bindable).size?.Height;
358 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
359 [EditorBrowsable(EditorBrowsableState.Never)]
360 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
362 var viewStyle = (ViewStyle)bindable;
363 viewStyle.position = (Position)newValue;
364 if (viewStyle.position != null && viewStyle.position.X == 0 && viewStyle.position.Y == 0)
366 viewStyle.position = null;
369 defaultValueCreator: (bindable) =>
371 var viewStyle = (ViewStyle)bindable;
372 return viewStyle.position;
374 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
375 [EditorBrowsable(EditorBrowsableState.Never)]
376 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
378 var viewStyle = (ViewStyle)bindable;
379 if (newValue != null)
381 if (viewStyle.position == null)
383 if ((float)newValue == 0) return;
384 viewStyle.position = new Position();
386 viewStyle.position.X = (float)newValue;
389 defaultValueCreator: (bindable) =>
391 return ((ViewStyle)bindable).position?.X;
393 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
394 [EditorBrowsable(EditorBrowsableState.Never)]
395 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
397 var viewStyle = (ViewStyle)bindable;
398 if (newValue != null)
400 if (viewStyle.position == null)
402 if ((float)newValue == 0) return;
403 viewStyle.position = new Position();
405 viewStyle.position.Y = (float)newValue;
408 defaultValueCreator: (bindable) =>
410 return ((ViewStyle)bindable).position?.Y;
412 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
413 [EditorBrowsable(EditorBrowsableState.Never)]
414 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
416 var viewStyle = (ViewStyle)bindable;
417 if (newValue != null)
419 if (viewStyle.position == null)
421 if ((float)newValue == 0) return;
422 viewStyle.position = new Position();
424 viewStyle.position.Z = (float)newValue;
427 defaultValueCreator: (bindable) =>
429 return ((ViewStyle)bindable).position?.Z;
431 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
435 var viewStyle = (ViewStyle)bindable;
436 viewStyle.orientation = (Rotation)newValue;
438 defaultValueCreator: (bindable) =>
440 var viewStyle = (ViewStyle)bindable;
441 return viewStyle.orientation;
443 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
444 [EditorBrowsable(EditorBrowsableState.Never)]
445 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
447 var viewStyle = (ViewStyle)bindable;
448 viewStyle.scale = (Vector3)newValue;
449 if (viewStyle.scale != null && viewStyle.scale.X == 1.0f && viewStyle.scale.Y == 1.0f && viewStyle.scale.Z == 1.0f) return;
451 defaultValueCreator: (bindable) =>
453 var viewStyle = (ViewStyle)bindable;
454 return viewStyle.scale;
456 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
457 [EditorBrowsable(EditorBrowsableState.Never)]
458 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
460 var viewStyle = (ViewStyle)bindable;
461 if (newValue != null)
463 if (viewStyle.scale == null)
465 if ((float)newValue == 1.0f) return;
466 viewStyle.scale = new Vector3();
468 viewStyle.scale.X = (float)newValue;
471 defaultValueCreator: (bindable) =>
473 return ((ViewStyle)bindable).scale?.X;
475 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
476 [EditorBrowsable(EditorBrowsableState.Never)]
477 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
479 var viewStyle = (ViewStyle)bindable;
480 if (newValue != null)
482 if (viewStyle.scale == null)
484 if ((float)newValue == 1.0f) return;
485 viewStyle.scale = new Vector3();
487 viewStyle.scale.Y = (float)newValue;
490 defaultValueCreator: (bindable) =>
492 return ((ViewStyle)bindable).scale?.Y;
494 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
495 [EditorBrowsable(EditorBrowsableState.Never)]
496 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
498 var viewStyle = (ViewStyle)bindable;
499 if (newValue != null)
501 if (viewStyle.scale == null)
503 if ((float)newValue == 1.0f) return;
504 viewStyle.scale = new Vector3();
506 viewStyle.scale.Z = (float)newValue;
509 defaultValueCreator: (bindable) =>
511 return ((ViewStyle)bindable).scale?.Z;
513 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
514 [EditorBrowsable(EditorBrowsableState.Never)]
515 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
517 var viewStyle = (ViewStyle)bindable;
518 viewStyle.name = (string)newValue;
520 defaultValueCreator: (bindable) =>
522 var viewStyle = (ViewStyle)bindable;
523 return viewStyle.name;
525 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
526 [EditorBrowsable(EditorBrowsableState.Never)]
527 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
529 var viewStyle = (ViewStyle)bindable;
530 viewStyle.sensitive = (bool?)newValue;
532 defaultValueCreator: (bindable) =>
534 var viewStyle = (ViewStyle)bindable;
535 return viewStyle.sensitive;
537 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
541 var viewStyle = (ViewStyle)bindable;
542 viewStyle.leaveRequired = (bool?)newValue;
544 defaultValueCreator: (bindable) =>
546 var viewStyle = (ViewStyle)bindable;
547 return viewStyle.leaveRequired;
549 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
550 [EditorBrowsable(EditorBrowsableState.Never)]
551 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
553 var viewStyle = (ViewStyle)bindable;
554 viewStyle.inheritOrientation = (bool?)newValue;
556 defaultValueCreator: (bindable) =>
558 var viewStyle = (ViewStyle)bindable;
559 return viewStyle.inheritOrientation;
561 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
562 [EditorBrowsable(EditorBrowsableState.Never)]
563 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
565 var viewStyle = (ViewStyle)bindable;
566 viewStyle.inheritScale = (bool?)newValue;
568 defaultValueCreator: (bindable) =>
570 var viewStyle = (ViewStyle)bindable;
571 return viewStyle.inheritScale;
573 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
574 [EditorBrowsable(EditorBrowsableState.Never)]
575 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
577 var viewStyle = (ViewStyle)bindable;
578 viewStyle.drawMode = (DrawModeType?)newValue;
580 defaultValueCreator: (bindable) =>
582 var viewStyle = (ViewStyle)bindable;
583 return viewStyle.drawMode;
585 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
586 [EditorBrowsable(EditorBrowsableState.Never)]
587 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
589 var viewStyle = (ViewStyle)bindable;
590 viewStyle.sizeModeFactor = (Vector3)newValue;
592 defaultValueCreator: (bindable) =>
594 var viewStyle = (ViewStyle)bindable;
595 return viewStyle.sizeModeFactor;
597 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
598 [EditorBrowsable(EditorBrowsableState.Never)]
599 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
601 var viewStyle = (ViewStyle)bindable;
602 viewStyle.widthResizePolicy = (ResizePolicyType?)newValue;
604 defaultValueCreator: (bindable) =>
606 var viewStyle = (ViewStyle)bindable;
607 return viewStyle.widthResizePolicy;
609 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
610 [EditorBrowsable(EditorBrowsableState.Never)]
611 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
613 var viewStyle = (ViewStyle)bindable;
614 viewStyle.heightResizePolicy = (ResizePolicyType?)newValue;
616 defaultValueCreator: (bindable) =>
618 var viewStyle = (ViewStyle)bindable;
619 return viewStyle.heightResizePolicy;
621 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
625 var viewStyle = (ViewStyle)bindable;
626 viewStyle.sizeScalePolicy = (SizeScalePolicyType?)newValue;
628 defaultValueCreator: (bindable) =>
630 var viewStyle = (ViewStyle)bindable;
631 return viewStyle.sizeScalePolicy;
633 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
634 [EditorBrowsable(EditorBrowsableState.Never)]
635 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
637 var viewStyle = (ViewStyle)bindable;
638 viewStyle.widthForHeight = (bool?)newValue;
640 defaultValueCreator: (bindable) =>
642 var viewStyle = (ViewStyle)bindable;
643 return viewStyle.widthForHeight;
645 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
646 [EditorBrowsable(EditorBrowsableState.Never)]
647 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
649 var viewStyle = (ViewStyle)bindable;
650 viewStyle.heightForWidth = (bool?)newValue;
652 defaultValueCreator: (bindable) =>
654 var viewStyle = (ViewStyle)bindable;
655 return viewStyle.heightForWidth;
657 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
658 [EditorBrowsable(EditorBrowsableState.Never)]
659 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
661 var viewStyle = (ViewStyle)bindable;
662 if (null == viewStyle.padding) viewStyle.padding = new Extents(viewStyle.OnPaddingChanged, 0, 0, 0, 0);
663 viewStyle.padding.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
665 defaultValueCreator: (bindable) =>
667 var viewStyle = (ViewStyle)bindable;
668 return viewStyle.padding;
670 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
671 [EditorBrowsable(EditorBrowsableState.Never)]
672 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
674 var viewStyle = (ViewStyle)bindable;
675 viewStyle.minimumSize = (Size2D)newValue;
677 defaultValueCreator: (bindable) =>
679 var viewStyle = (ViewStyle)bindable;
680 return viewStyle.minimumSize;
682 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
683 [EditorBrowsable(EditorBrowsableState.Never)]
684 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
686 var viewStyle = (ViewStyle)bindable;
687 viewStyle.maximumSize = (Size2D)newValue;
689 defaultValueCreator: (bindable) =>
691 var viewStyle = (ViewStyle)bindable;
692 return viewStyle.maximumSize;
694 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
695 [EditorBrowsable(EditorBrowsableState.Never)]
696 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
698 var viewStyle = (ViewStyle)bindable;
699 viewStyle.inheritPosition = (bool?)newValue;
701 defaultValueCreator: (bindable) =>
703 var viewStyle = (ViewStyle)bindable;
704 return viewStyle.inheritPosition;
706 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
710 var viewStyle = (ViewStyle)bindable;
711 viewStyle.clippingMode = (ClippingModeType?)newValue;
713 defaultValueCreator: (bindable) =>
715 var viewStyle = (ViewStyle)bindable;
716 return viewStyle.clippingMode;
718 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
719 [EditorBrowsable(EditorBrowsableState.Never)]
720 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
722 var viewStyle = (ViewStyle)bindable;
723 viewStyle.size = (Size)newValue;
724 if (viewStyle.size != null && viewStyle.size.Width == 0 && viewStyle.size.Height == 0)
726 viewStyle.size = null;
729 defaultValueCreator: (bindable) =>
731 var viewStyle = (ViewStyle)bindable;
732 return viewStyle.size;
734 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
735 [EditorBrowsable(EditorBrowsableState.Never)]
736 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
738 var viewStyle = (ViewStyle)bindable;
739 viewStyle.inheritLayoutDirection = (bool?)newValue;
741 defaultValueCreator: (bindable) =>
743 var viewStyle = (ViewStyle)bindable;
744 return viewStyle.inheritLayoutDirection;
746 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
750 var viewStyle = (ViewStyle)bindable;
751 viewStyle.layoutDirection = (ViewLayoutDirectionType?)newValue;
753 defaultValueCreator: (bindable) =>
755 var viewStyle = (ViewStyle)bindable;
756 return viewStyle.layoutDirection;
758 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
759 [EditorBrowsable(EditorBrowsableState.Never)]
760 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
762 var viewStyle = (ViewStyle)bindable;
763 if (null == viewStyle.margin) viewStyle.margin = new Extents(viewStyle.OnMarginChanged, 0, 0, 0, 0);
764 viewStyle.margin.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
766 defaultValueCreator: (bindable) =>
768 var viewStyle = (ViewStyle)bindable;
769 return viewStyle.margin;
771 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
772 [EditorBrowsable(EditorBrowsableState.Never)]
773 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
775 var viewStyle = (ViewStyle)bindable;
776 viewStyle.weight = (float?)newValue;
778 defaultValueCreator: (bindable) =>
780 var viewStyle = (ViewStyle)bindable;
781 return viewStyle.weight;
783 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
784 [EditorBrowsable(EditorBrowsableState.Never)]
785 public static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
787 var viewStyle = (ViewStyle)bindable;
789 if (newValue == null)
791 viewStyle.backgroundColorSelector = null;
795 viewStyle.backgroundColorSelector = ((Selector<Color>)newValue).Clone();
796 viewStyle.backgroundImageSelector = null;
800 defaultValueCreator: (bindable) =>
802 var viewStyle = (ViewStyle)bindable;
803 return viewStyle.backgroundColorSelector;
806 [EditorBrowsable(EditorBrowsableState.Never)]
807 public static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
809 ((ViewStyle)bindable).colorSelector = ((Selector<Color>)newValue)?.Clone();
811 defaultValueCreator: (bindable) =>
813 var viewStyle = (ViewStyle)bindable;
814 return viewStyle.colorSelector;
817 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
818 [EditorBrowsable(EditorBrowsableState.Never)]
819 public static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
821 ((ViewStyle)bindable).backgroundImageBorderSelector = ((Selector<Rectangle>)newValue)?.Clone();
823 defaultValueCreator: (bindable) =>
825 var viewStyle = (ViewStyle)bindable;
826 return viewStyle.backgroundImageBorderSelector;
829 /// A BindableProperty for ImageShadow
830 [EditorBrowsable(EditorBrowsableState.Never)]
831 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
833 var viewStyle = (ViewStyle)bindable;
835 viewStyle.imageShadow = ((Selector<ImageShadow>)newValue)?.Clone();
837 if (viewStyle.imageShadow != null)
839 viewStyle.boxShadow = null;
842 defaultValueCreator: (bindable) =>
844 var viewStyle = (ViewStyle)bindable;
845 return viewStyle.imageShadow;
848 /// A BindableProperty for BoxShadow
849 [EditorBrowsable(EditorBrowsableState.Never)]
850 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
852 var viewStyle = (ViewStyle)bindable;
854 viewStyle.boxShadow = ((Selector<Shadow>)newValue)?.Clone();
856 if (viewStyle.boxShadow != null)
858 viewStyle.imageShadow = null;
861 defaultValueCreator: (bindable) =>
863 var viewStyle = (ViewStyle)bindable;
864 return viewStyle.boxShadow;
867 /// A BindableProperty for CornerRadius
868 [EditorBrowsable(EditorBrowsableState.Never)]
869 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
871 ((ViewStyle)bindable).cornerRadius = ((Selector<float?>)(newValue))?.Clone();
873 defaultValueCreator: (bindable) =>
875 var viewStyle = (ViewStyle)bindable;
876 return viewStyle.cornerRadius;
880 /// EnableControlState property
882 [EditorBrowsable(EditorBrowsableState.Never)]
883 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create("EnableControlState", typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
885 ((ViewStyle)bindable).enableControlState = (bool?)newValue;
887 defaultValueCreator: (bindable) =>
889 return ((ViewStyle)bindable).enableControlState;
893 /// EnableControlState property
895 [EditorBrowsable(EditorBrowsableState.Never)]
896 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create("ThemeChangeSensitive", typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
898 ((ViewStyle)bindable).themeChangeSensitive = (bool?)newValue;
900 defaultValueCreator: (bindable) =>
902 return ((ViewStyle)bindable).themeChangeSensitive;