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 viewStyle.size = new Size();
331 viewStyle.size.Width = (float)newValue;
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 viewStyle.size = new Size();
349 viewStyle.size.Height = (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;
363 defaultValueCreator: (bindable) =>
365 var viewStyle = (ViewStyle)bindable;
366 return viewStyle.position;
368 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
369 [EditorBrowsable(EditorBrowsableState.Never)]
370 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
372 var viewStyle = (ViewStyle)bindable;
373 if (newValue != null)
375 if (viewStyle.position == null)
377 viewStyle.position = new Position();
379 viewStyle.position.X = (float)newValue;
382 defaultValueCreator: (bindable) =>
384 return ((ViewStyle)bindable).position?.X;
386 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
387 [EditorBrowsable(EditorBrowsableState.Never)]
388 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
390 var viewStyle = (ViewStyle)bindable;
391 if (newValue != null)
393 if (viewStyle.position == null)
395 viewStyle.position = new Position();
397 viewStyle.position.Y = (float)newValue;
400 defaultValueCreator: (bindable) =>
402 return ((ViewStyle)bindable).position?.Y;
404 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
408 var viewStyle = (ViewStyle)bindable;
409 if (newValue != null)
411 if (viewStyle.position == null)
413 viewStyle.position = new Position();
415 viewStyle.position.Z = (float)newValue;
418 defaultValueCreator: (bindable) =>
420 return ((ViewStyle)bindable).position?.Z;
422 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
426 var viewStyle = (ViewStyle)bindable;
427 viewStyle.orientation = (Rotation)newValue;
429 defaultValueCreator: (bindable) =>
431 var viewStyle = (ViewStyle)bindable;
432 return viewStyle.orientation;
434 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
435 [EditorBrowsable(EditorBrowsableState.Never)]
436 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
438 var viewStyle = (ViewStyle)bindable;
439 viewStyle.scale = (Vector3)newValue;
441 defaultValueCreator: (bindable) =>
443 var viewStyle = (ViewStyle)bindable;
444 return viewStyle.scale;
446 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
447 [EditorBrowsable(EditorBrowsableState.Never)]
448 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
450 var viewStyle = (ViewStyle)bindable;
451 if (newValue != null)
453 if (viewStyle.scale == null)
455 viewStyle.scale = new Vector3();
457 viewStyle.scale.X = (float)newValue;
460 defaultValueCreator: (bindable) =>
462 return ((ViewStyle)bindable).scale?.X;
464 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
465 [EditorBrowsable(EditorBrowsableState.Never)]
466 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
468 var viewStyle = (ViewStyle)bindable;
469 if (newValue != null)
471 if (viewStyle.scale == null)
473 viewStyle.scale = new Vector3();
475 viewStyle.scale.Y = (float)newValue;
478 defaultValueCreator: (bindable) =>
480 return ((ViewStyle)bindable).scale?.Y;
482 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
483 [EditorBrowsable(EditorBrowsableState.Never)]
484 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
486 var viewStyle = (ViewStyle)bindable;
487 if (newValue != null)
489 if (viewStyle.scale == null)
491 viewStyle.scale = new Vector3();
493 viewStyle.scale.Z = (float)newValue;
496 defaultValueCreator: (bindable) =>
498 return ((ViewStyle)bindable).scale?.Z;
500 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
501 [EditorBrowsable(EditorBrowsableState.Never)]
502 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
504 var viewStyle = (ViewStyle)bindable;
505 viewStyle.name = (string)newValue;
507 defaultValueCreator: (bindable) =>
509 var viewStyle = (ViewStyle)bindable;
510 return viewStyle.name;
512 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
513 [EditorBrowsable(EditorBrowsableState.Never)]
514 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
516 var viewStyle = (ViewStyle)bindable;
517 viewStyle.sensitive = (bool?)newValue;
519 defaultValueCreator: (bindable) =>
521 var viewStyle = (ViewStyle)bindable;
522 return viewStyle.sensitive;
524 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
525 [EditorBrowsable(EditorBrowsableState.Never)]
526 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
528 var viewStyle = (ViewStyle)bindable;
529 viewStyle.leaveRequired = (bool?)newValue;
531 defaultValueCreator: (bindable) =>
533 var viewStyle = (ViewStyle)bindable;
534 return viewStyle.leaveRequired;
536 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
537 [EditorBrowsable(EditorBrowsableState.Never)]
538 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
540 var viewStyle = (ViewStyle)bindable;
541 viewStyle.inheritOrientation = (bool?)newValue;
543 defaultValueCreator: (bindable) =>
545 var viewStyle = (ViewStyle)bindable;
546 return viewStyle.inheritOrientation;
548 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
549 [EditorBrowsable(EditorBrowsableState.Never)]
550 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
552 var viewStyle = (ViewStyle)bindable;
553 viewStyle.inheritScale = (bool?)newValue;
555 defaultValueCreator: (bindable) =>
557 var viewStyle = (ViewStyle)bindable;
558 return viewStyle.inheritScale;
560 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
561 [EditorBrowsable(EditorBrowsableState.Never)]
562 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
564 var viewStyle = (ViewStyle)bindable;
565 viewStyle.drawMode = (DrawModeType?)newValue;
567 defaultValueCreator: (bindable) =>
569 var viewStyle = (ViewStyle)bindable;
570 return viewStyle.drawMode;
572 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
573 [EditorBrowsable(EditorBrowsableState.Never)]
574 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
576 var viewStyle = (ViewStyle)bindable;
577 viewStyle.sizeModeFactor = (Vector3)newValue;
579 defaultValueCreator: (bindable) =>
581 var viewStyle = (ViewStyle)bindable;
582 return viewStyle.sizeModeFactor;
584 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
585 [EditorBrowsable(EditorBrowsableState.Never)]
586 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
588 var viewStyle = (ViewStyle)bindable;
589 viewStyle.widthResizePolicy = (ResizePolicyType?)newValue;
591 defaultValueCreator: (bindable) =>
593 var viewStyle = (ViewStyle)bindable;
594 return viewStyle.widthResizePolicy;
596 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
597 [EditorBrowsable(EditorBrowsableState.Never)]
598 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
600 var viewStyle = (ViewStyle)bindable;
601 viewStyle.heightResizePolicy = (ResizePolicyType?)newValue;
603 defaultValueCreator: (bindable) =>
605 var viewStyle = (ViewStyle)bindable;
606 return viewStyle.heightResizePolicy;
608 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
609 [EditorBrowsable(EditorBrowsableState.Never)]
610 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
612 var viewStyle = (ViewStyle)bindable;
613 viewStyle.sizeScalePolicy = (SizeScalePolicyType?)newValue;
615 defaultValueCreator: (bindable) =>
617 var viewStyle = (ViewStyle)bindable;
618 return viewStyle.sizeScalePolicy;
620 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
621 [EditorBrowsable(EditorBrowsableState.Never)]
622 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
624 var viewStyle = (ViewStyle)bindable;
625 viewStyle.widthForHeight = (bool?)newValue;
627 defaultValueCreator: (bindable) =>
629 var viewStyle = (ViewStyle)bindable;
630 return viewStyle.widthForHeight;
632 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
633 [EditorBrowsable(EditorBrowsableState.Never)]
634 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
636 var viewStyle = (ViewStyle)bindable;
637 viewStyle.heightForWidth = (bool?)newValue;
639 defaultValueCreator: (bindable) =>
641 var viewStyle = (ViewStyle)bindable;
642 return viewStyle.heightForWidth;
644 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
645 [EditorBrowsable(EditorBrowsableState.Never)]
646 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
648 var viewStyle = (ViewStyle)bindable;
649 if (null == viewStyle.padding) viewStyle.padding = new Extents(viewStyle.OnPaddingChanged, 0, 0, 0, 0);
650 viewStyle.padding.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
652 defaultValueCreator: (bindable) =>
654 var viewStyle = (ViewStyle)bindable;
655 return viewStyle.padding;
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 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
661 var viewStyle = (ViewStyle)bindable;
662 viewStyle.minimumSize = (Size2D)newValue;
664 defaultValueCreator: (bindable) =>
666 var viewStyle = (ViewStyle)bindable;
667 return viewStyle.minimumSize;
669 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
673 var viewStyle = (ViewStyle)bindable;
674 viewStyle.maximumSize = (Size2D)newValue;
676 defaultValueCreator: (bindable) =>
678 var viewStyle = (ViewStyle)bindable;
679 return viewStyle.maximumSize;
681 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
682 [EditorBrowsable(EditorBrowsableState.Never)]
683 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
685 var viewStyle = (ViewStyle)bindable;
686 viewStyle.inheritPosition = (bool?)newValue;
688 defaultValueCreator: (bindable) =>
690 var viewStyle = (ViewStyle)bindable;
691 return viewStyle.inheritPosition;
693 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
694 [EditorBrowsable(EditorBrowsableState.Never)]
695 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
697 var viewStyle = (ViewStyle)bindable;
698 viewStyle.clippingMode = (ClippingModeType?)newValue;
700 defaultValueCreator: (bindable) =>
702 var viewStyle = (ViewStyle)bindable;
703 return viewStyle.clippingMode;
705 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
709 var viewStyle = (ViewStyle)bindable;
710 viewStyle.size = (Size)newValue;
712 defaultValueCreator: (bindable) =>
714 var viewStyle = (ViewStyle)bindable;
715 return viewStyle.size;
717 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
718 [EditorBrowsable(EditorBrowsableState.Never)]
719 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
721 var viewStyle = (ViewStyle)bindable;
722 viewStyle.inheritLayoutDirection = (bool?)newValue;
724 defaultValueCreator: (bindable) =>
726 var viewStyle = (ViewStyle)bindable;
727 return viewStyle.inheritLayoutDirection;
729 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
730 [EditorBrowsable(EditorBrowsableState.Never)]
731 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
733 var viewStyle = (ViewStyle)bindable;
734 viewStyle.layoutDirection = (ViewLayoutDirectionType?)newValue;
736 defaultValueCreator: (bindable) =>
738 var viewStyle = (ViewStyle)bindable;
739 return viewStyle.layoutDirection;
741 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
742 [EditorBrowsable(EditorBrowsableState.Never)]
743 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
745 var viewStyle = (ViewStyle)bindable;
746 if (null == viewStyle.margin) viewStyle.margin = new Extents(viewStyle.OnMarginChanged, 0, 0, 0, 0);
747 viewStyle.margin.CopyFrom(null == newValue ? new Extents() : (Extents)newValue);
749 defaultValueCreator: (bindable) =>
751 var viewStyle = (ViewStyle)bindable;
752 return viewStyle.margin;
754 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
755 [EditorBrowsable(EditorBrowsableState.Never)]
756 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
758 var viewStyle = (ViewStyle)bindable;
759 viewStyle.weight = (float?)newValue;
761 defaultValueCreator: (bindable) =>
763 var viewStyle = (ViewStyle)bindable;
764 return viewStyle.weight;
766 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
767 [EditorBrowsable(EditorBrowsableState.Never)]
768 public static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
770 var viewStyle = (ViewStyle)bindable;
772 if (newValue == null)
774 viewStyle.backgroundColorSelector = null;
778 viewStyle.backgroundColorSelector = ((Selector<Color>)newValue).Clone();
779 viewStyle.backgroundImageSelector = null;
783 defaultValueCreator: (bindable) =>
785 var viewStyle = (ViewStyle)bindable;
786 return viewStyle.backgroundColorSelector;
789 [EditorBrowsable(EditorBrowsableState.Never)]
790 public static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
792 ((ViewStyle)bindable).colorSelector = ((Selector<Color>)newValue)?.Clone();
794 defaultValueCreator: (bindable) =>
796 var viewStyle = (ViewStyle)bindable;
797 return viewStyle.colorSelector;
800 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
801 [EditorBrowsable(EditorBrowsableState.Never)]
802 public static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
804 ((ViewStyle)bindable).backgroundImageBorderSelector = ((Selector<Rectangle>)newValue)?.Clone();
806 defaultValueCreator: (bindable) =>
808 var viewStyle = (ViewStyle)bindable;
809 return viewStyle.backgroundImageBorderSelector;
812 /// A BindableProperty for ImageShadow
813 [EditorBrowsable(EditorBrowsableState.Never)]
814 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
816 var viewStyle = (ViewStyle)bindable;
818 viewStyle.imageShadow = ((Selector<ImageShadow>)newValue)?.Clone();
819 viewStyle.boxShadow = null;
821 defaultValueCreator: (bindable) =>
823 var viewStyle = (ViewStyle)bindable;
824 return viewStyle.imageShadow;
827 /// A BindableProperty for BoxShadow
828 [EditorBrowsable(EditorBrowsableState.Never)]
829 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
831 var viewStyle = (ViewStyle)bindable;
833 viewStyle.boxShadow = ((Selector<Shadow>)newValue)?.Clone();
834 viewStyle.imageShadow = null;
836 defaultValueCreator: (bindable) =>
838 var viewStyle = (ViewStyle)bindable;
839 return viewStyle.boxShadow;
842 /// A BindableProperty for CornerRadius
843 [EditorBrowsable(EditorBrowsableState.Never)]
844 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
846 ((ViewStyle)bindable).cornerRadius = ((Selector<float?>)(newValue))?.Clone();
848 defaultValueCreator: (bindable) =>
850 var viewStyle = (ViewStyle)bindable;
851 return viewStyle.cornerRadius;
855 /// EnableControlState property
857 [EditorBrowsable(EditorBrowsableState.Never)]
858 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create("EnableControlState", typeof(bool?), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
860 ((ViewStyle)bindable).enableControlState = (bool?)newValue;
862 defaultValueCreator: (bindable) =>
864 return ((ViewStyle)bindable).enableControlState;