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