Revert "[NUI] Fix build warning[CA1000]"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / Style / ViewStyle.cs
1 /*
2  * Copyright(c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using Tizen.NUI.Binding;
21
22 namespace Tizen.NUI.BaseComponents
23 {
24     /// <summary>
25     /// The base class for Children attributes in Components.
26     /// </summary>
27     /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
28     [EditorBrowsable(EditorBrowsableState.Never)]
29     public partial class ViewStyle : BindableObject
30     {
31         private string styleName;
32         private View.States? state;
33         private View.States? subState;
34         private float? flex;
35         private int? alignSelf;
36         private Vector4 flexMargin;
37         private Vector2 cellIndex;
38         private float? rowSpan;
39         private float? columnSpan;
40         private HorizontalAlignmentType? cellHorizontalAlignment;
41         private VerticalAlignmentType? cellVerticalAlignment;
42         private View leftFocusableView;
43         private View rightFocusableView;
44         private View upFocusableView;
45         private View downFocusableView;
46         private bool? focusable;
47         private bool? positionUsesPivotPoint;
48         private int? siblingOrder;
49         private Position parentOrigin;
50         private Position pivotPoint;
51         private Position position;
52         private Rotation orientation;
53         private Vector3 scale;
54         private string name;
55         private bool? sensitive;
56         private bool? leaveRequired;
57         private bool? inheritOrientation;
58         private bool? inheritScale;
59         private DrawModeType? drawMode;
60         private Vector3 sizeModeFactor;
61         private ResizePolicyType? widthResizePolicy;
62         private ResizePolicyType? heightResizePolicy;
63         private SizeScalePolicyType? sizeScalePolicy;
64         private bool? widthForHeight;
65         private bool? heightForWidth;
66         private Extents padding;
67         private Size2D minimumSize;
68         private Size2D maximumSize;
69         private bool? inheritPosition;
70         private ClippingModeType? clippingMode;
71         private Size size;
72         private bool? inheritLayoutDirection;
73         private ViewLayoutDirectionType? layoutDirection;
74         private Extents margin;
75         private float? weight;
76         private bool? enableControlState;
77         private bool? themeChangeSensitive;
78
79         private Selector<ImageShadow> imageShadow;
80         private Selector<Shadow> boxShadow;
81         private Selector<string> backgroundImageSelector;
82         private Selector<float?> cornerRadius;
83         private Selector<float?> opacitySelector;
84         private Selector<Color> backgroundColorSelector;
85         private Selector<Rectangle> backgroundImageBorderSelector;
86         private Selector<Color> colorSelector;
87         private VisualTransformPolicyType? cornerRadiusPolicy;
88
89         static ViewStyle() { }
90
91         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
92         [EditorBrowsable(EditorBrowsableState.Never)]
93         public ViewStyle() { }
94
95         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
96         [EditorBrowsable(EditorBrowsableState.Never)]
97         public ViewStyle(ViewStyle viewAttributes)
98         {
99             CopyFrom(viewAttributes);
100         }
101
102         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
103         [EditorBrowsable(EditorBrowsableState.Never)]
104         public string StyleName
105         {
106             get => (string)GetValue(StyleNameProperty);
107             set => SetValue(StyleNameProperty, value);
108         }
109
110         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
111         [EditorBrowsable(EditorBrowsableState.Never)]
112         public Selector<string> BackgroundImage
113         {
114             get
115             {
116                 Selector<string> image = (Selector<string>)GetValue(BackgroundImageSelectorProperty);
117                 return (null != image) ? image : backgroundImageSelector = new Selector<string>();
118             }
119             set => SetValue(BackgroundImageSelectorProperty, value);
120         }
121
122         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
123         [EditorBrowsable(EditorBrowsableState.Never)]
124         public View.States? State
125         {
126             get => (View.States?)GetValue(StateProperty);
127             set => SetValue(StateProperty, value);
128         }
129
130         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
131         [EditorBrowsable(EditorBrowsableState.Never)]
132         public View.States? SubState
133         {
134             get => (View.States?)GetValue(SubStateProperty);
135             set => SetValue(SubStateProperty, value);
136         }
137
138         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
139         [EditorBrowsable(EditorBrowsableState.Never)]
140         public float? Flex
141         {
142             get => (float?)GetValue(FlexProperty);
143             set => SetValue(FlexProperty, value);
144         }
145
146         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
147         [EditorBrowsable(EditorBrowsableState.Never)]
148         public int? AlignSelf
149         {
150             get => (int?)GetValue(AlignSelfProperty);
151             set => SetValue(AlignSelfProperty, value);
152         }
153
154         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
155         [EditorBrowsable(EditorBrowsableState.Never)]
156         public Vector4 FlexMargin
157         {
158             get => (Vector4)GetValue(FlexMarginProperty);
159             set => SetValue(FlexMarginProperty, value);
160         }
161
162         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
163         [EditorBrowsable(EditorBrowsableState.Never)]
164         public Vector2 CellIndex
165         {
166             get => (Vector2)GetValue(CellIndexProperty);
167             set => SetValue(CellIndexProperty, value);
168         }
169
170         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
171         [EditorBrowsable(EditorBrowsableState.Never)]
172         public float? RowSpan
173         {
174             get => (float?)GetValue(RowSpanProperty);
175             set => SetValue(RowSpanProperty, value);
176         }
177
178         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
179         [EditorBrowsable(EditorBrowsableState.Never)]
180         public float? ColumnSpan
181         {
182             get => (float?)GetValue(ColumnSpanProperty);
183             set => SetValue(ColumnSpanProperty, value);
184         }
185
186         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
187         [EditorBrowsable(EditorBrowsableState.Never)]
188         public HorizontalAlignmentType? CellHorizontalAlignment
189         {
190             get => (HorizontalAlignmentType?)GetValue(CellHorizontalAlignmentProperty);
191             set => SetValue(CellHorizontalAlignmentProperty, value);
192         }
193
194         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
195         [EditorBrowsable(EditorBrowsableState.Never)]
196         public VerticalAlignmentType? CellVerticalAlignment
197         {
198             get => (VerticalAlignmentType?)GetValue(CellVerticalAlignmentProperty);
199             set => SetValue(CellVerticalAlignmentProperty, value);
200         }
201
202         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
203         [EditorBrowsable(EditorBrowsableState.Never)]
204         public View LeftFocusableView
205         {
206             get => (View)GetValue(LeftFocusableViewProperty);
207             set => SetValue(LeftFocusableViewProperty, value);
208         }
209
210         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
211         [EditorBrowsable(EditorBrowsableState.Never)]
212         public View RightFocusableView
213         {
214             get => (View)GetValue(RightFocusableViewProperty);
215             set => SetValue(RightFocusableViewProperty, value);
216         }
217
218         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
219         [EditorBrowsable(EditorBrowsableState.Never)]
220         public View UpFocusableView
221         {
222             get => (View)GetValue(UpFocusableViewProperty);
223             set => SetValue(UpFocusableViewProperty, value);
224         }
225
226         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
227         [EditorBrowsable(EditorBrowsableState.Never)]
228         public View DownFocusableView
229         {
230             get => (View)GetValue(DownFocusableViewProperty);
231             set => SetValue(DownFocusableViewProperty, value);
232         }
233
234         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
235         [EditorBrowsable(EditorBrowsableState.Never)]
236         public bool? Focusable
237         {
238             get => (bool?)GetValue(FocusableProperty);
239             set => SetValue(FocusableProperty, value);
240         }
241
242         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
243         [EditorBrowsable(EditorBrowsableState.Never)]
244         public Size2D Size2D
245         {
246             get => (Size2D)GetValue(Size2DProperty);
247             set => SetValue(Size2DProperty, value);
248         }
249
250         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
251         [EditorBrowsable(EditorBrowsableState.Never)]
252         public Selector<float?> Opacity
253         {
254             get
255             {
256                 Selector<float?> opacity = (Selector<float?>)GetValue(OpacitySelectorProperty);
257                 return (null != opacity) ? opacity : opacitySelector = new Selector<float?>();
258             }
259             set => SetValue(OpacitySelectorProperty, value);
260         }
261
262         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
263         [EditorBrowsable(EditorBrowsableState.Never)]
264         public Position2D Position2D
265         {
266             get => (Position2D)GetValue(Position2DProperty);
267             set => SetValue(Position2DProperty, value);
268         }
269
270         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
271         [EditorBrowsable(EditorBrowsableState.Never)]
272         public bool? PositionUsesPivotPoint
273         {
274             get => (bool?)GetValue(PositionUsesPivotPointProperty);
275             set => SetValue(PositionUsesPivotPointProperty, value);
276         }
277
278         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
279         [EditorBrowsable(EditorBrowsableState.Never)]
280         public int? SiblingOrder
281         {
282             get => (int?)GetValue(SiblingOrderProperty);
283             set => SetValue(SiblingOrderProperty, value);
284         }
285
286         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
287         [EditorBrowsable(EditorBrowsableState.Never)]
288         public Position ParentOrigin
289         {
290             get => (Position)GetValue(ParentOriginProperty);
291             set => SetValue(ParentOriginProperty, value);
292         }
293
294         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
295         [EditorBrowsable(EditorBrowsableState.Never)]
296         public Position PivotPoint
297         {
298             get => (Position)GetValue(PivotPointProperty);
299             set => SetValue(PivotPointProperty, value);
300         }
301
302         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
303         [EditorBrowsable(EditorBrowsableState.Never)]
304         public float? SizeWidth
305         {
306             get => (float?)GetValue(SizeWidthProperty);
307             set => SetValue(SizeWidthProperty, value);
308         }
309
310         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
311         [EditorBrowsable(EditorBrowsableState.Never)]
312         public float? SizeHeight
313         {
314             get => (float?)GetValue(SizeHeightProperty);
315             set => SetValue(SizeHeightProperty, value);
316         }
317
318         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
319         [EditorBrowsable(EditorBrowsableState.Never)]
320         public Position Position
321         {
322             get => (Position)GetValue(PositionProperty);
323             set => SetValue(PositionProperty, value);
324         }
325
326         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
327         [EditorBrowsable(EditorBrowsableState.Never)]
328         public float? PositionX
329         {
330             get => (float?)GetValue(PositionXProperty);
331             set => SetValue(PositionXProperty, value);
332         }
333
334         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
335         [EditorBrowsable(EditorBrowsableState.Never)]
336         public float? PositionY
337         {
338             get => (float?)GetValue(PositionYProperty);
339             set => SetValue(PositionYProperty, value);
340         }
341
342         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public float? PositionZ
345         {
346             get => (float?)GetValue(PositionZProperty);
347             set => SetValue(PositionZProperty, value);
348         }
349
350         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
351         [EditorBrowsable(EditorBrowsableState.Never)]
352         public Rotation Orientation
353         {
354             get => (Rotation)GetValue(OrientationProperty);
355             set => SetValue(OrientationProperty, value);
356         }
357
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 Vector3 Scale
361         {
362             get => (Vector3)GetValue(ScaleProperty);
363             set => SetValue(ScaleProperty, value);
364         }
365
366         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
367         [EditorBrowsable(EditorBrowsableState.Never)]
368         public float? ScaleX
369         {
370             get => (float?)GetValue(ScaleXProperty);
371             set => SetValue(ScaleXProperty, value);
372         }
373
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 float? ScaleY
377         {
378             get => (float?)GetValue(ScaleYProperty);
379             set => SetValue(ScaleYProperty, value);
380         }
381
382         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
383         [EditorBrowsable(EditorBrowsableState.Never)]
384         public float? ScaleZ
385         {
386             get => (float?)GetValue(ScaleZProperty);
387             set => SetValue(ScaleZProperty, value);
388         }
389
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 string Name
393         {
394             get => (string)GetValue(NameProperty);
395             set => SetValue(NameProperty, value);
396         }
397
398         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
399         [EditorBrowsable(EditorBrowsableState.Never)]
400         public bool? Sensitive
401         {
402             get => (bool?)GetValue(SensitiveProperty);
403             set => SetValue(SensitiveProperty, value);
404         }
405
406         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
407         [EditorBrowsable(EditorBrowsableState.Never)]
408         public bool? LeaveRequired
409         {
410             get => (bool?)GetValue(LeaveRequiredProperty);
411             set => SetValue(LeaveRequiredProperty, value);
412         }
413
414         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
415         [EditorBrowsable(EditorBrowsableState.Never)]
416         public bool? InheritOrientation
417         {
418             get => (bool?)GetValue(InheritOrientationProperty);
419             set => SetValue(InheritOrientationProperty, value);
420         }
421
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 bool? InheritScale
425         {
426             get => (bool?)GetValue(InheritScaleProperty);
427             set => SetValue(InheritScaleProperty, value);
428         }
429
430         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
431         [EditorBrowsable(EditorBrowsableState.Never)]
432         public DrawModeType? DrawMode
433         {
434             get => (DrawModeType?)GetValue(DrawModeProperty);
435             set => SetValue(DrawModeProperty, value);
436         }
437
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 Vector3 SizeModeFactor
441         {
442             get => (Vector3)GetValue(SizeModeFactorProperty);
443             set => SetValue(SizeModeFactorProperty, value);
444         }
445
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 ResizePolicyType? WidthResizePolicy
449         {
450             get => (ResizePolicyType?)GetValue(WidthResizePolicyProperty);
451             set => SetValue(WidthResizePolicyProperty, value);
452         }
453
454         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
455         [EditorBrowsable(EditorBrowsableState.Never)]
456         public ResizePolicyType? HeightResizePolicy
457         {
458             get => (ResizePolicyType?)GetValue(HeightResizePolicyProperty);
459             set => SetValue(HeightResizePolicyProperty, value);
460         }
461
462         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
463         [EditorBrowsable(EditorBrowsableState.Never)]
464         public SizeScalePolicyType? SizeScalePolicy
465         {
466             get => (SizeScalePolicyType?)GetValue(SizeScalePolicyProperty);
467             set => SetValue(SizeScalePolicyProperty, value);
468         }
469
470         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
471         [EditorBrowsable(EditorBrowsableState.Never)]
472         public bool? WidthForHeight
473         {
474             get => (bool?)GetValue(WidthForHeightProperty);
475             set => SetValue(WidthForHeightProperty, value);
476         }
477
478         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
479         [EditorBrowsable(EditorBrowsableState.Never)]
480         public bool? HeightForWidth
481         {
482             get => (bool?)GetValue(HeightForWidthProperty);
483             set => SetValue(HeightForWidthProperty, value);
484         }
485
486         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
487         [EditorBrowsable(EditorBrowsableState.Never)]
488         public Extents Padding
489         {
490             get
491             {
492                 Extents tmp = (Extents)GetValue(PaddingProperty);
493                 return (null != tmp) ? tmp : padding = new Extents(OnPaddingChanged, 0, 0, 0, 0);
494             }
495             set => SetValue(PaddingProperty, value);
496         }
497
498         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
499         [EditorBrowsable(EditorBrowsableState.Never)]
500         public Size2D MinimumSize
501         {
502             get => (Size2D)GetValue(MinimumSizeProperty);
503             set => SetValue(MinimumSizeProperty, value);
504         }
505
506         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
507         [EditorBrowsable(EditorBrowsableState.Never)]
508         public Size2D MaximumSize
509         {
510             get => (Size2D)GetValue(MaximumSizeProperty);
511             set => SetValue(MaximumSizeProperty, value);
512         }
513
514         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
515         [EditorBrowsable(EditorBrowsableState.Never)]
516         public bool? InheritPosition
517         {
518             get => (bool?)GetValue(InheritPositionProperty);
519             set => SetValue(InheritPositionProperty, value);
520         }
521
522         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
523         [EditorBrowsable(EditorBrowsableState.Never)]
524         public ClippingModeType? ClippingMode
525         {
526             get => (ClippingModeType?)GetValue(ClippingModeProperty);
527             set => SetValue(ClippingModeProperty, value);
528         }
529
530         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
531         [EditorBrowsable(EditorBrowsableState.Never)]
532         public Size Size
533         {
534             get
535             {
536                 Size tmp = (Size)GetValue(SizeProperty);
537                 return (null != tmp) ? tmp : size = new Size((float? width, float? height, float? depth) =>
538                     {
539                         float targetWidth = 0;
540                         float targetHeight = 0;
541                         float targetDepth = 0;
542
543                         if (size != null)
544                         {
545                             targetWidth = size.Width;
546                             targetHeight = size.Height;
547                             targetDepth = size.Depth;
548                         }
549                         if (width != null) { targetWidth = (float)width; }
550                         if (height != null) { targetHeight = (float)height; }
551                         if (depth != null) { targetDepth = (float)depth; }
552
553                         Size = new Size(targetWidth, targetHeight, targetDepth);
554                     }, 0, 0, 0);
555             }
556             set => SetValue(SizeProperty, value);
557         }
558
559         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
560         [EditorBrowsable(EditorBrowsableState.Never)]
561         public bool? InheritLayoutDirection
562         {
563             get => (bool?)GetValue(InheritLayoutDirectionProperty);
564             set => SetValue(InheritLayoutDirectionProperty, value);
565         }
566
567         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
568         [EditorBrowsable(EditorBrowsableState.Never)]
569         public ViewLayoutDirectionType? LayoutDirection
570         {
571             get => (ViewLayoutDirectionType?)GetValue(LayoutDirectionProperty);
572             set => SetValue(LayoutDirectionProperty, value);
573         }
574
575         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
576         [EditorBrowsable(EditorBrowsableState.Never)]
577         public Extents Margin
578         {
579             get
580             {
581                 Extents tmp = (Extents)GetValue(MarginProperty);
582                 return (null != tmp) ? tmp : margin = new Extents(OnMarginChanged, 0, 0, 0, 0);
583             }
584             set => SetValue(MarginProperty, value);
585         }
586
587         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
588         [EditorBrowsable(EditorBrowsableState.Never)]
589         public float? Weight
590         {
591             get => (float?)GetValue(WeightProperty);
592             set => SetValue(WeightProperty, value);
593         }
594
595         /// <summary> View BackgroundColor </summary>
596         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
597         [EditorBrowsable(EditorBrowsableState.Never)]
598         public Selector<Color> BackgroundColor
599         {
600             get
601             {
602                 Selector<Color> color = (Selector<Color>)GetValue(BackgroundColorSelectorProperty);
603                 return (null != color) ? color : backgroundColorSelector = new Selector<Color>();
604             }
605             set => SetValue(BackgroundColorSelectorProperty, value);
606         }
607
608         /// <summary>
609         /// Color
610         /// </summary>
611         [EditorBrowsable(EditorBrowsableState.Never)]
612         public Selector<Color> Color
613         {
614             get
615             {
616                 Selector<Color> color = (Selector<Color>)GetValue(ColorSelectorProperty);
617                 return (null != color) ? color : colorSelector = new Selector<Color>();
618             }
619             set => SetValue(ColorSelectorProperty, value);
620         }
621
622         /// <summary>View BackgroundBorder</summary>
623         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
624         [EditorBrowsable(EditorBrowsableState.Never)]
625         public Selector<Rectangle> BackgroundImageBorder
626         {
627             get
628             {
629                 Selector<Rectangle> border = (Selector<Rectangle>)GetValue(BackgroundImageBorderSelectorProperty);
630                 return (null != border) ? border : backgroundImageBorderSelector = new Selector<Rectangle>();
631             }
632             set => SetValue(BackgroundImageBorderSelectorProperty, value);
633         }
634
635         /// <summary>
636         /// Describes a shadow as an image for a View.
637         /// It is null by default.
638         /// </summary>
639         /// <remarks>
640         /// If BoxShadow is not null, the ImageShadow value will be ignored.
641         /// </remarks>
642         [EditorBrowsable(EditorBrowsableState.Never)]
643         public Selector<ImageShadow> ImageShadow
644         {
645             get => (Selector<ImageShadow>)GetValue(ImageShadowSelectorProperty);
646             set => SetValue(ImageShadowSelectorProperty, value);
647         }
648
649         /// <summary>
650         /// Describes a box shaped shadow drawing for a View.
651         /// It is null by default.
652         /// </summary>
653         [EditorBrowsable(EditorBrowsableState.Never)]
654         public Selector<Shadow> BoxShadow
655         {
656             get => (Selector<Shadow>)GetValue(BoxShadowSelectorProperty);
657             set => SetValue(BoxShadowSelectorProperty, value);
658         }
659
660         /// <summary>
661         /// The radius for the rounded corners of the View
662         /// </summary>
663         [EditorBrowsable(EditorBrowsableState.Never)]
664         public Selector<float?> CornerRadius
665         {
666             get => (Selector<float?>)GetValue(CornerRadiusProperty);
667             set => SetValue(CornerRadiusProperty, value);
668         }
669
670         /// <summary>
671         /// Whether the CornerRadius property value is relative (percentage [0.0f to 1.0f] of the view size) or absolute (in world units).
672         /// It is absolute by default.
673         /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
674         /// </summary>
675         [EditorBrowsable(EditorBrowsableState.Never)]
676         public VisualTransformPolicyType? CornerRadiusPolicy
677         {
678             get => (VisualTransformPolicyType?)GetValue(CornerRadiusPolicyProperty);
679             set => SetValue(CornerRadiusPolicyProperty, value);
680         }
681
682         /// <summary>
683         /// The EnableControlState value of the View.
684         /// </summary>
685         [EditorBrowsable(EditorBrowsableState.Never)]
686         public bool? EnableControlState
687         {
688             get => (bool?)GetValue(EnableControlStateProperty);
689             set => SetValue(EnableControlStateProperty, value);
690         }
691
692         /// <summary>
693         /// The ThemeChangeSensitive value of the View.
694         /// </summary>
695         [EditorBrowsable(EditorBrowsableState.Never)]
696         public bool? ThemeChangeSensitive
697         {
698             get => (bool?)GetValue(ThemeChangeSensitiveProperty);
699             set => SetValue(ThemeChangeSensitiveProperty, value);
700         }
701
702
703         /// <summary>
704         /// Allow null properties when merging it into other Theme.
705         /// If the value is true, the null properties reset target properties of the other ViewStyle with same key when merge.
706         /// It is used in <seealso cref="Theme.Merge(string)"/>, <seealso cref="Theme.Merge(Theme)"/>.
707         /// It is also used in <seealso cref="Theme.GetStyle(string)"/> when the Theme has a parent and needs to merge.
708         /// Please note that it is false by default.
709         /// </summary>
710         [EditorBrowsable(EditorBrowsableState.Never)]
711         public bool SolidNull { get; set; } = false;
712
713         /// <summary>
714         /// Set style's bindable properties from the view.
715         /// </summary>
716         /// <param name="view">The view that includes property data.</param>
717         [EditorBrowsable(EditorBrowsableState.Never)]
718         public virtual void CopyPropertiesFromView(View view)
719         {
720             if (view == null) return;
721
722             BindableProperty.GetBindablePropertysOfType(GetType(), out var styleProperties);
723             BindableProperty.GetBindablePropertysOfType(view.GetType(), out var viewProperties);
724
725
726             if (styleProperties == null || viewProperties == null) return;
727
728             foreach (var stylePropertyItem in styleProperties)
729             {
730                 viewProperties.TryGetValue(stylePropertyItem.Key, out var viewProperty);
731
732                 if (viewProperty == null) continue;
733
734                 SetValue(stylePropertyItem.Value, view.GetValue(viewProperty));
735             }
736         }
737
738         /// <summary>Create a cloned ViewStyle.</summary>
739         [EditorBrowsable(EditorBrowsableState.Never)]
740         public ViewStyle Clone()
741         {
742             var cloned = CreateInstance();
743             cloned.CopyFrom(this);
744
745             return cloned;
746         }
747
748         /// <summary>Create a cloned ViewStyle.</summary>
749         [EditorBrowsable(EditorBrowsableState.Never)]
750         public void Merge(ViewStyle other)
751         {
752             AllowNullCopy = other?.SolidNull ?? false;
753             CopyFrom(other);
754             AllowNullCopy = false;
755         }
756
757         internal ViewStyle CreateInstance()
758         {
759             return (ViewStyle)Activator.CreateInstance(GetType());
760         }
761
762         private void OnPaddingChanged(ushort start, ushort end, ushort top, ushort bottom)
763         {
764             Padding = new Extents(start, end, top, bottom);
765         }
766
767         private void OnMarginChanged(ushort start, ushort end, ushort top, ushort bottom)
768         {
769             Margin = new Extents(start, end, top, bottom);
770         }
771     }
772 }