[NUI] Fix some view properties are not overwritten when the view has created with...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2019 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 System.Runtime.InteropServices;
21 using Tizen.NUI.Binding;
22 using Tizen.NUI.Components;
23
24 namespace Tizen.NUI.BaseComponents
25 {
26     /// <summary>
27     /// View is the base class for all views.
28     /// </summary>
29     /// <since_tizen> 3 </since_tizen>
30     public partial class View : Container, IResourcesProvider
31     {
32         /// <summary>
33         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
34         /// </summary>
35         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
36         [EditorBrowsable(EditorBrowsableState.Never)]
37         public bool layoutSet = false;
38
39         /// <summary>
40         /// Flag to allow Layouting to be disabled for Views.
41         /// Once a View has a Layout set then any children added to Views from then on will receive
42         /// automatic Layouts.
43         /// </summary>
44         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
45         [EditorBrowsable(EditorBrowsableState.Never)]
46         public static bool layoutingDisabled{get; set;} = true;
47
48         private LayoutItem _layout; // Exclusive layout assigned to this View.
49
50         // List of transitions paired with the condition that uses the transition.
51         private Dictionary<TransitionCondition, TransitionList> _layoutTransitions;
52         private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
53         private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
54         private int _oldWidthPolicy = LayoutParamPolicies.MatchParent; // // Store Layout width to compare against later
55         private int _oldHeightPolicy = LayoutParamPolicies.MatchParent; // Store Layout height to compare against later
56         private float _weight = 0.0f; // Weighting of child View in a Layout
57         private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
58         private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
59         private bool _backgroundImageSynchronosLoading = false;
60         private Dictionary<string, Transition> transDictionary = new Dictionary<string, Transition>();
61         private string[] transitionNames;
62         private bool controlStatePropagation = false;
63
64         internal Size2D sizeSetExplicitly = new Size2D(); // Store size set by API, will be used in place of NaturalSize if not set.
65         internal BackgroundExtraData backgroundExtraData;
66
67         static View() {}
68
69         /// <summary>
70         /// The Style instance binded with this View.
71         /// </summary>
72         [EditorBrowsable(EditorBrowsableState.Never)]
73         protected ViewStyle viewStyle;
74
75         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
76         [EditorBrowsable(EditorBrowsableState.Never)]
77         public ViewStyle ViewStyle
78         {
79             get
80             {
81                 if (null == viewStyle)
82                 {
83                     ApplyStyle(GetViewStyle());
84                 }
85
86                 return viewStyle;
87             }
88         }
89
90         /// <summary>
91         /// Creates a new instance of a view.
92         /// </summary>
93         /// <since_tizen> 3 </since_tizen>
94         public View() : this(Interop.View.View_New(), true)
95         {
96             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97         }
98
99         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
100         [EditorBrowsable(EditorBrowsableState.Never)]
101         public View(ViewStyle viewStyle) : this(Interop.View.View_New(), true)
102         {
103             this.ViewStyle.CopyFrom(viewStyle);
104         }
105
106         /// <summary>
107         /// Create a new instance of a View with setting the status of shown or hidden.
108         /// </summary>
109         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
110         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
111         [EditorBrowsable(EditorBrowsableState.Never)]
112         public View(bool shown) : this(Interop.View.View_New(), true)
113         {
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115             SetVisible(shown);
116         }
117
118         internal View(View uiControl, bool shown = true) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
119         {
120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121             if(!shown)
122             {
123                 SetVisible(false);
124             }
125
126             backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
127         }
128
129         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
130         {
131             if (this.viewStyle == null)
132             {
133                 ApplyStyle((viewStyle == null) ? GetViewStyle() : viewStyle.Clone());
134             }
135             else
136             {
137                 this.viewStyle.CopyFrom(viewStyle);
138             }
139         }
140
141         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
142         {
143             if (HasBody())
144             {
145                 PositionUsesPivotPoint = false;
146             }
147
148             _onWindowSendEventCallback = SendViewAddedEventToWindow;
149             this.OnWindowSignal().Connect(_onWindowSendEventCallback);
150
151             if (!shown)
152             {
153                 SetVisible(false);
154             }
155         }
156
157         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
158         {
159             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160
161             if (!shown)
162             {
163                 SetVisible(false);
164             }
165         }
166
167         /// <summary>
168         /// The event that is triggered when the View's ControlState is changed.
169         /// </summary>
170         [EditorBrowsable(EditorBrowsableState.Never)]
171         public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
172
173         internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
174
175         private ControlStates controlStates;
176         /// <summary>
177         /// Get/Set the control state.
178         /// </summary>
179         /// <since_tizen> 6 </since_tizen>
180         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
181         [EditorBrowsable(EditorBrowsableState.Never)]
182         public ControlStates ControlState
183         {
184             get
185             {
186                 return controlStates;
187             }
188             set
189             {
190                 if (controlStates == value)
191                 {
192                     return;
193                 }
194
195                 var prevState = controlStates;
196
197                 controlStates = value;
198
199                 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
200
201                 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
202
203                 OnControlStateChanged(changeInfo);
204
205                 if (controlStatePropagation)
206                 {
207                     foreach (View child in Children)
208                     {
209                         child.ControlState = value;
210                     }
211                 }
212
213                 ControlStateChangedEvent?.Invoke(this, changeInfo);
214             }
215         }
216
217         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
218         [EditorBrowsable(EditorBrowsableState.Never)]
219         public bool IsResourcesCreated
220         {
221             get
222             {
223                 return Application.Current.IsResourcesCreated;
224             }
225         }
226
227         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
228         [EditorBrowsable(EditorBrowsableState.Never)]
229         public ResourceDictionary XamlResources
230         {
231             get
232             {
233                 return Application.Current.XamlResources;
234             }
235             set
236             {
237                 Application.Current.XamlResources = value;
238             }
239         }
240
241         /// <summary>
242         /// The StyleName, type string.
243         /// </summary>
244         /// <since_tizen> 3 </since_tizen>
245         public string StyleName
246         {
247             get
248             {
249                 return (string)GetValue(StyleNameProperty);
250             }
251             set
252             {
253                 SetValue(StyleNameProperty, value);
254                 NotifyPropertyChanged();
255             }
256         }
257
258         /// <summary>
259         /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
260         /// </summary>
261         /// <remarks>
262         /// The property cascade chaining set is possible. For example, this (view.BackgroundColor.X = 0.1f;) is possible.
263         /// </remarks>
264         /// <since_tizen> 3 </since_tizen>
265         public Color BackgroundColor
266         {
267             get
268             {
269                 Color temp = (Color)GetValue(BackgroundColorProperty);
270                 return new Color(OnBackgroundColorChanged, temp.R, temp.G, temp.B, temp.A);
271             }
272             set
273             {
274                 if (viewStyle != null)
275                 {
276                     viewStyle.BackgroundImage = null;
277                     viewStyle.BackgroundColor = value;
278                 }
279                 else
280                 {
281                     SetValue(BackgroundColorProperty, value);
282                 }
283
284                 NotifyPropertyChanged();
285             }
286         }
287
288         /// <summary>
289         /// The mutually exclusive with "backgroundColor" and "background" type Map.
290         /// </summary>
291         /// <since_tizen> 3 </since_tizen>
292         public string BackgroundImage
293         {
294             get
295             {
296                 return (string)GetValue(BackgroundImageProperty);
297             }
298             set
299             {
300                 if (viewStyle != null)
301                 {
302                     viewStyle.BackgroundColor = null;
303                     viewStyle.BackgroundImage = value;
304                 }
305                 else
306                 {
307                     SetValue(BackgroundImageProperty, value);
308                 }
309
310                 NotifyPropertyChanged();
311             }
312         }
313
314         /// <summary>
315         /// Get or set the border of background image.
316         /// </summary>
317         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
318         [EditorBrowsable(EditorBrowsableState.Never)]
319         public Rectangle BackgroundImageBorder
320         {
321             get
322             {
323                 return (Rectangle)GetValue(BackgroundImageBorderProperty);
324             }
325             set
326             {
327                 if (viewStyle != null)
328                 {
329                     viewStyle.BackgroundImageBorder = value;
330                 }
331                 else
332                 {
333                     SetValue(BackgroundImageBorderProperty, value);
334                 }
335
336                 NotifyPropertyChanged();
337             }
338         }
339
340         /// <summary>
341         /// The background of view.
342         /// </summary>
343         /// <since_tizen> 3 </since_tizen>
344         public Tizen.NUI.PropertyMap Background
345         {
346             get
347             {
348                 return (PropertyMap)GetValue(BackgroundProperty);
349             }
350             set
351             {
352                 SetValue(BackgroundProperty, value);
353                 NotifyPropertyChanged();
354             }
355         }
356
357         /// <summary>
358         /// Describes a shadow as an image for a View.
359         /// It is null by default.
360         /// </summary>
361         /// <remarks>
362         /// Gettter returns copied instance of current shadow.
363         /// </remarks>
364         /// <remarks>
365         /// The mutually exclusive with "BoxShadow".
366         /// </remarks>
367         [EditorBrowsable(EditorBrowsableState.Never)]
368         public ImageShadow ImageShadow
369         {
370             get
371             {
372                 return (ImageShadow)GetValue(ImageShadowProperty);
373             }
374             set
375             {
376                 SetValue(ImageShadowProperty, value);
377                 NotifyPropertyChanged();
378             }
379         }
380
381         /// <summary>
382         /// Describes a box shaped shadow drawing for a View.
383         /// It is null by default.
384         /// </summary>
385         /// <remarks>
386         /// Gettter returns copied instance of current shadow.
387         /// </remarks>
388         /// <remarks>
389         /// The mutually exclusive with "ImageShadow".
390         /// </remarks>
391         [EditorBrowsable(EditorBrowsableState.Never)]
392         public Shadow BoxShadow
393         {
394             get
395             {
396                 return (Shadow)GetValue(BoxShadowProperty);
397             }
398             set
399             {
400                 SetValue(BoxShadowProperty, value);
401                 NotifyPropertyChanged();
402             }
403         }
404
405         /// <summary>
406         /// The radius for the rounded corners of the View.
407         /// This will rounds background and shadow edges.
408         /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
409         /// </summary>
410         [EditorBrowsable(EditorBrowsableState.Never)]
411         public float CornerRadius
412         {
413             get
414             {
415                 return (float)GetValue(CornerRadiusProperty);
416             }
417             set
418             {
419                 SetValue(CornerRadiusProperty, value);
420                 NotifyPropertyChanged();
421             }
422         }
423
424         /// <summary>
425         /// The current state of the view.
426         /// </summary>
427         /// <since_tizen> 3 </since_tizen>
428         public States State
429         {
430             get
431             {
432                 return (States)GetValue(StateProperty);
433             }
434             set
435             {
436                 SetValue(StateProperty, value);
437                 NotifyPropertyChanged();
438             }
439         }
440
441         /// <summary>
442         /// The current sub state of the view.
443         /// </summary>
444         /// <since_tizen> 3 </since_tizen>
445         public States SubState
446         {
447             get
448             {
449                 return (States)GetValue(SubStateProperty);
450             }
451             set
452             {
453                 SetValue(SubStateProperty, value);
454                 NotifyPropertyChanged();
455             }
456         }
457
458         /// <summary>
459         /// Displays a tooltip
460         /// </summary>
461         /// <since_tizen> 3 </since_tizen>
462         public Tizen.NUI.PropertyMap Tooltip
463         {
464             get
465             {
466                 return (PropertyMap)GetValue(TooltipProperty);
467             }
468             set
469             {
470                 SetValue(TooltipProperty, value);
471                 NotifyPropertyChanged();
472             }
473         }
474
475         /// <summary>
476         /// Displays a tooltip as a text.
477         /// </summary>
478         /// <since_tizen> 3 </since_tizen>
479         public string TooltipText
480         {
481             set
482             {
483                 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
484                 NotifyPropertyChanged();
485             }
486         }
487
488         /// <summary>
489         /// The Child property of FlexContainer.<br />
490         /// The proportion of the free space in the container, the flex item will receive.<br />
491         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
492         /// </summary>
493         /// <since_tizen> 3 </since_tizen>
494         public float Flex
495         {
496             get
497             {
498                 return (float)GetValue(FlexProperty);
499             }
500             set
501             {
502                 SetValue(FlexProperty, value);
503                 NotifyPropertyChanged();
504             }
505         }
506
507         /// <summary>
508         /// The Child property of FlexContainer.<br />
509         /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
510         /// </summary>
511         /// <since_tizen> 3 </since_tizen>
512         public int AlignSelf
513         {
514             get
515             {
516                 return (int)GetValue(AlignSelfProperty);
517             }
518             set
519             {
520                 SetValue(AlignSelfProperty, value);
521                 NotifyPropertyChanged();
522             }
523         }
524
525         /// <summary>
526         /// The Child property of FlexContainer.<br />
527         /// The space around the flex item.<br />
528         /// </summary>
529         /// <remarks>
530         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
531         /// </remarks>
532         /// <since_tizen> 3 </since_tizen>
533         public Vector4 FlexMargin
534         {
535             get
536             {
537                 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
538                 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
539             }
540             set
541             {
542                 SetValue(FlexMarginProperty, value);
543                 NotifyPropertyChanged();
544             }
545         }
546
547         /// <summary>
548         /// The top-left cell this child occupies, if not set, the first available cell is used.
549         /// </summary>
550         /// <remarks>
551         /// The property cascade chaining set is possible. For example, this (view.CellIndex.X = 0.1f;) is possible.
552         /// </remarks>
553         /// <since_tizen> 3 </since_tizen>
554         public Vector2 CellIndex
555         {
556             get
557             {
558                 Vector2 temp = (Vector2)GetValue(CellIndexProperty);
559                 return new Vector2(OnCellIndexChanged, temp.X, temp.Y);
560             }
561             set
562             {
563                 SetValue(CellIndexProperty, value);
564                 NotifyPropertyChanged();
565             }
566         }
567
568         /// <summary>
569         /// The number of rows this child occupies, if not set, the default value is 1.
570         /// </summary>
571         /// <since_tizen> 3 </since_tizen>
572         public float RowSpan
573         {
574             get
575             {
576                 return (float)GetValue(RowSpanProperty);
577             }
578             set
579             {
580                 SetValue(RowSpanProperty, value);
581                 NotifyPropertyChanged();
582             }
583         }
584
585         /// <summary>
586         /// The number of columns this child occupies, if not set, the default value is 1.
587         /// </summary>
588         /// <since_tizen> 3 </since_tizen>
589         public float ColumnSpan
590         {
591             get
592             {
593                 return (float)GetValue(ColumnSpanProperty);
594             }
595             set
596             {
597                 SetValue(ColumnSpanProperty, value);
598                 NotifyPropertyChanged();
599             }
600         }
601
602         /// <summary>
603         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
604         /// </summary>
605         /// <since_tizen> 3 </since_tizen>
606         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
607         {
608             get
609             {
610                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
611             }
612             set
613             {
614                 SetValue(CellHorizontalAlignmentProperty, value);
615                 NotifyPropertyChanged();
616             }
617         }
618
619         /// <summary>
620         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
621         /// </summary>
622         /// <since_tizen> 3 </since_tizen>
623         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
624         {
625             get
626             {
627                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
628             }
629             set
630             {
631                 SetValue(CellVerticalAlignmentProperty, value);
632                 NotifyPropertyChanged();
633             }
634         }
635
636         /// <summary>
637         /// The left focusable view.<br />
638         /// This will return null if not set.<br />
639         /// This will also return null if the specified left focusable view is not on a window.<br />
640         /// </summary>
641         /// <since_tizen> 3 </since_tizen>
642         public View LeftFocusableView
643         {
644             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
645             get
646             {
647                 return (View)GetValue(LeftFocusableViewProperty);
648             }
649             set
650             {
651                 SetValue(LeftFocusableViewProperty, value);
652                 NotifyPropertyChanged();
653             }
654         }
655
656         /// <summary>
657         /// The right focusable view.<br />
658         /// This will return null if not set.<br />
659         /// This will also return null if the specified right focusable view is not on a window.<br />
660         /// </summary>
661         /// <since_tizen> 3 </since_tizen>
662         public View RightFocusableView
663         {
664             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
665             get
666             {
667                 return (View)GetValue(RightFocusableViewProperty);
668             }
669             set
670             {
671                 SetValue(RightFocusableViewProperty, value);
672                 NotifyPropertyChanged();
673             }
674         }
675
676         /// <summary>
677         /// The up focusable view.<br />
678         /// This will return null if not set.<br />
679         /// This will also return null if the specified up focusable view is not on a window.<br />
680         /// </summary>
681         /// <since_tizen> 3 </since_tizen>
682         public View UpFocusableView
683         {
684             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
685             get
686             {
687                 return (View)GetValue(UpFocusableViewProperty);
688             }
689             set
690             {
691                 SetValue(UpFocusableViewProperty, value);
692                 NotifyPropertyChanged();
693             }
694         }
695
696         /// <summary>
697         /// The down focusable view.<br />
698         /// This will return null if not set.<br />
699         /// This will also return null if the specified down focusable view is not on a window.<br />
700         /// </summary>
701         /// <since_tizen> 3 </since_tizen>
702         public View DownFocusableView
703         {
704             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
705             get
706             {
707                 return (View)GetValue(DownFocusableViewProperty);
708             }
709             set
710             {
711                 SetValue(DownFocusableViewProperty, value);
712                 NotifyPropertyChanged();
713             }
714         }
715
716         /// <summary>
717         /// Whether the view should be focusable by keyboard navigation.
718         /// </summary>
719         /// <since_tizen> 3 </since_tizen>
720         public bool Focusable
721         {
722             set
723             {
724                 SetValue(FocusableProperty, value);
725                 NotifyPropertyChanged();
726             }
727             get
728             {
729                 return (bool)GetValue(FocusableProperty);
730             }
731         }
732
733         /// <summary>
734         ///  Retrieves the position of the view.<br />
735         ///  The coordinates are relative to the view's parent.<br />
736         /// </summary>
737         /// <since_tizen> 3 </since_tizen>
738         public Position CurrentPosition
739         {
740             get
741             {
742                 return GetCurrentPosition();
743             }
744         }
745
746         /// <summary>
747         /// Sets the size of a view for the width and the height.<br />
748         /// Geometry can be scaled to fit within this area.<br />
749         /// This does not interfere with the view's scale factor.<br />
750         /// The views default depth is the minimum of width and height.<br />
751         /// </summary>
752         /// <remarks>
753         /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
754         /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
755         /// </remarks>
756         /// <since_tizen> 3 </since_tizen>
757         public Size2D Size2D
758         {
759             get
760             {
761                 Size2D temp = (Size2D)GetValue(Size2DProperty);
762                 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
763             }
764             set
765             {
766                 sizeSetExplicitly = value;  // Store size set by API, will be used in place of NaturalSize if not set.
767                 SetValue(Size2DProperty, value);
768                 // Set Specification so when layouts measure this View it matches the value set here.
769                 // All Views are currently Layouts.
770                 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
771                 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
772                 _widthPolicy = value.Width;
773                 _heightPolicy = value.Height;
774                 _layout?.RequestLayout();
775                 NotifyPropertyChanged();
776             }
777         }
778
779         /// <summary>
780         ///  Retrieves the size of the view.<br />
781         ///  The coordinates are relative to the view's parent.<br />
782         /// </summary>
783         /// <since_tizen> 3 </since_tizen>
784         public Size2D CurrentSize
785         {
786             get
787             {
788                 return GetCurrentSize();
789             }
790         }
791
792         /// <summary>
793         /// Retrieves and sets the view's opacity.<br />
794         /// </summary>
795         /// <since_tizen> 3 </since_tizen>
796         public float Opacity
797         {
798             get
799             {
800                 return (float)GetValue(OpacityProperty);
801             }
802             set
803             {
804                 if (viewStyle != null)
805                 {
806                     viewStyle.Opacity = value;
807                 }
808                 else
809                 {
810                     SetValue(OpacityProperty, value);
811                 }
812
813                 NotifyPropertyChanged();
814             }
815         }
816
817         /// <summary>
818         /// Sets the position of the view for X and Y.<br />
819         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
820         /// If the position inheritance is disabled, sets the world position.<br />
821         /// </summary>
822         /// <remarks>
823         /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
824         /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
825         /// </remarks>
826         /// <since_tizen> 3 </since_tizen>
827         public Position2D Position2D
828         {
829             get
830             {
831                 Position2D temp = (Position2D)GetValue(Position2DProperty);
832                 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
833             }
834             set
835             {
836                 SetValue(Position2DProperty, value);
837                 NotifyPropertyChanged();
838             }
839         }
840
841         /// <summary>
842         /// Retrieves the screen postion of the view.<br />
843         /// </summary>
844         /// <since_tizen> 3 </since_tizen>
845         public Vector2 ScreenPosition
846         {
847             get
848             {
849                 Vector2 temp = new Vector2(0.0f, 0.0f);
850                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
851                 return temp;
852             }
853         }
854
855         /// <summary>
856         /// Determines whether the pivot point should be used to determine the position of the view.
857         /// This is true by default.
858         /// </summary>
859         /// <remarks>If false, then the top-left of the view is used for the position.
860         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
861         /// </remarks>
862         /// <since_tizen> 3 </since_tizen>
863         public bool PositionUsesPivotPoint
864         {
865             get
866             {
867                 return (bool)GetValue(PositionUsesPivotPointProperty);
868             }
869             set
870             {
871                 SetValue(PositionUsesPivotPointProperty, value);
872                 NotifyPropertyChanged();
873             }
874         }
875
876         /// <summary>
877         /// Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead!
878         /// </summary>
879         /// <since_tizen> 3 </since_tizen>
880         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead! " +
881             "Like: " +
882             "View view = new View(); " +
883             "view.PivotPoint = PivotPoint.Center; " +
884             "view.PositionUsesPivotPoint = true;" +
885             " Deprecated in API5: Will be removed in API8")]
886         [EditorBrowsable(EditorBrowsableState.Never)]
887         public bool PositionUsesAnchorPoint
888         {
889             get
890             {
891                 bool temp = false;
892                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
893                 return temp;
894             }
895             set
896             {
897                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
898                 NotifyPropertyChanged();
899             }
900         }
901
902         /// <summary>
903         /// Queries whether the view is connected to the stage.<br />
904         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
905         /// </summary>
906         /// <since_tizen> 3 </since_tizen>
907         public bool IsOnWindow
908         {
909             get
910             {
911                 return OnWindow();
912             }
913         }
914
915         /// <summary>
916         /// Gets the depth in the hierarchy for the view.
917         /// </summary>
918         /// <since_tizen> 3 </since_tizen>
919         public int HierarchyDepth
920         {
921             get
922             {
923                 return GetHierarchyDepth();
924             }
925         }
926
927         /// <summary>
928         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
929         /// </summary>
930         /// <remarks>
931         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
932         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
933         /// The values set by this property will likely change.
934         /// </remarks>
935         /// <since_tizen> 3 </since_tizen>
936         public int SiblingOrder
937         {
938             get
939             {
940                 return (int)GetValue(SiblingOrderProperty);
941             }
942             set
943             {
944                 SetValue(SiblingOrderProperty, value);
945
946                 LayoutGroup layout = Layout as LayoutGroup;
947                 layout?.ChangeLayoutSiblingOrder(value);
948
949                 NotifyPropertyChanged();
950             }
951         }
952
953         /// <summary>
954         /// Returns the natural size of the view.
955         /// </summary>
956         /// <remarks>
957         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
958         /// </remarks>
959         /// <since_tizen> 5 </since_tizen>
960         public Vector3 NaturalSize
961         {
962             get
963             {
964                 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
965                 if (NDalicPINVOKE.SWIGPendingException.Pending)
966                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967                 return ret;
968             }
969         }
970
971         /// <summary>
972         /// Returns the natural size (Size2D) of the view.
973         /// </summary>
974         /// <remarks>
975         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
976         /// </remarks>
977         /// <since_tizen> 4 </since_tizen>
978         public Size2D NaturalSize2D
979         {
980             get
981             {
982                 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
983                 if (NDalicPINVOKE.SWIGPendingException.Pending)
984                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985
986                 return new Size2D((int)temp.Width, (int)temp.Height);
987             }
988         }
989
990         /// <summary>
991         /// Gets or sets the origin of a view within its parent's area.<br />
992         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
993         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
994         /// A view's position is the distance between this origin and the view's anchor-point.<br />
995         /// </summary>
996         /// <pre>The view has been initialized.</pre>
997         /// <since_tizen> 3 </since_tizen>
998         public Position ParentOrigin
999         {
1000             get
1001             {
1002                 Position tmp = (Position)GetValue(ParentOriginProperty);
1003                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1004             }
1005             set
1006             {
1007                 SetValue(ParentOriginProperty, value);
1008                 NotifyPropertyChanged();
1009             }
1010         }
1011
1012         /// <summary>
1013         /// Gets or sets the anchor-point of a view.<br />
1014         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
1015         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1016         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1017         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1018         /// <pre>The view has been initialized.</pre>
1019         /// </summary>
1020         /// <remarks>
1021         /// The property cascade chaining set is possible. For example, this (view.PivotPoint.X = 0.1f;) is possible.
1022         /// </remarks>
1023         /// <since_tizen> 3 </since_tizen>
1024         public Position PivotPoint
1025         {
1026             get
1027             {
1028                 Position tmp = (Position)GetValue(PivotPointProperty);
1029                 return new Position(OnPivotPointChanged, tmp.X, tmp.Y, tmp.Z);
1030             }
1031             set
1032             {
1033                 SetValue(PivotPointProperty, value);
1034                 NotifyPropertyChanged();
1035             }
1036         }
1037
1038         /// <summary>
1039         /// Gets or sets the size width of the view.
1040         /// </summary>
1041         /// <remarks>
1042         /// <para>
1043         /// Animatable - This property can be animated using <c>Animation</c> class.
1044         /// </para>
1045         /// </remarks>
1046         /// <since_tizen> 3 </since_tizen>
1047         public float SizeWidth
1048         {
1049             get
1050             {
1051                 return (float)GetValue(SizeWidthProperty);
1052             }
1053             set
1054             {
1055                 SetValue(SizeWidthProperty, value);
1056                 WidthSpecification = (int)Math.Ceiling(value);
1057                 NotifyPropertyChanged();
1058             }
1059         }
1060
1061         /// <summary>
1062         /// Gets or sets the size height of the view.
1063         /// </summary>
1064         /// <remarks>
1065         /// <para>
1066         /// Animatable - This property can be animated using <c>Animation</c> class.
1067         /// </para>
1068         /// </remarks>
1069         /// <since_tizen> 3 </since_tizen>
1070         public float SizeHeight
1071         {
1072             get
1073             {
1074                 return (float)GetValue(SizeHeightProperty);
1075             }
1076             set
1077             {
1078                 SetValue(SizeHeightProperty, value);
1079                 HeightSpecification = (int)Math.Ceiling(value);
1080                 NotifyPropertyChanged();
1081             }
1082         }
1083
1084         /// <summary>
1085         /// Gets or sets the position of the view.<br />
1086         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1087         /// If the position inheritance is disabled, sets the world position.<br />
1088         /// </summary>
1089         /// <remarks>
1090         /// <para>
1091         /// Animatable - This property can be animated using <c>Animation</c> class.
1092         /// </para>
1093         /// The property cascade chaining set is possible. For example, this (view.Position.X = 1.0f;) is possible.
1094         /// </remarks>
1095         /// <since_tizen> 3 </since_tizen>
1096         public Position Position
1097         {
1098             get
1099             {
1100                 Position tmp = (Position)GetValue(PositionProperty);
1101                 return new Position(OnPositionChanged, tmp.X, tmp.Y, tmp.Z);
1102             }
1103             set
1104             {
1105                 SetValue(PositionProperty, value);
1106                 NotifyPropertyChanged();
1107             }
1108         }
1109
1110         /// <summary>
1111         /// Gets or sets the position X of the view.
1112         /// </summary>
1113         /// <remarks>
1114         /// <para>
1115         /// Animatable - This property can be animated using <c>Animation</c> class.
1116         /// </para>
1117         /// </remarks>
1118         /// <since_tizen> 3 </since_tizen>
1119         public float PositionX
1120         {
1121             get
1122             {
1123                 return (float)GetValue(PositionXProperty);
1124             }
1125             set
1126             {
1127                 SetValue(PositionXProperty, value);
1128                 NotifyPropertyChanged();
1129             }
1130         }
1131
1132         /// <summary>
1133         /// Gets or sets the position Y of the view.
1134         /// </summary>
1135         /// <remarks>
1136         /// <para>
1137         /// Animatable - This property can be animated using <c>Animation</c> class.
1138         /// </para>
1139         /// </remarks>
1140         /// <since_tizen> 3 </since_tizen>
1141         public float PositionY
1142         {
1143             get
1144             {
1145                 return (float)GetValue(PositionYProperty);
1146             }
1147             set
1148             {
1149                 SetValue(PositionYProperty, value);
1150                 NotifyPropertyChanged();
1151             }
1152         }
1153
1154         /// <summary>
1155         /// Gets or sets the position Z of the view.
1156         /// </summary>
1157         /// <remarks>
1158         /// <para>
1159         /// Animatable - This property can be animated using <c>Animation</c> class.
1160         /// </para>
1161         /// </remarks>
1162         /// <since_tizen> 3 </since_tizen>
1163         public float PositionZ
1164         {
1165             get
1166             {
1167                 return (float)GetValue(PositionZProperty);
1168             }
1169             set
1170             {
1171                 SetValue(PositionZProperty, value);
1172                 NotifyPropertyChanged();
1173             }
1174         }
1175
1176         /// <summary>
1177         /// Gets or sets the world position of the view.
1178         /// </summary>
1179         /// <since_tizen> 3 </since_tizen>
1180         public Vector3 WorldPosition
1181         {
1182             get
1183             {
1184                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1185                 GetProperty(View.Property.WORLD_POSITION).Get(temp);
1186                 return temp;
1187             }
1188         }
1189
1190         /// <summary>
1191         /// Gets or sets the orientation of the view.<br />
1192         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1193         /// </summary>
1194         /// <remarks>
1195         /// <para>
1196         /// This is an asynchronous method.
1197         /// </para>
1198         /// <para>
1199         /// Animatable - This property can be animated using <c>Animation</c> class.
1200         /// </para>
1201         /// </remarks>
1202         /// <since_tizen> 3 </since_tizen>
1203         public Rotation Orientation
1204         {
1205             get
1206             {
1207                 return (Rotation)GetValue(OrientationProperty);
1208             }
1209             set
1210             {
1211                 SetValue(OrientationProperty, value);
1212                 NotifyPropertyChanged();
1213             }
1214         }
1215
1216         /// <summary>
1217         /// Gets or sets the world orientation of the view.<br />
1218         /// </summary>
1219         /// <since_tizen> 3 </since_tizen>
1220         public Rotation WorldOrientation
1221         {
1222             get
1223             {
1224                 Rotation temp = new Rotation();
1225                 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
1226                 return temp;
1227             }
1228         }
1229
1230         /// <summary>
1231         /// Gets or sets the scale factor applied to the view.<br />
1232         /// </summary>
1233         /// <remarks>
1234         /// <para>
1235         /// Animatable - This property can be animated using <c>Animation</c> class.
1236         /// </para>
1237         /// The property cascade chaining set is possible. For example, this (view.Scale.X = 0.1f;) is possible.
1238         /// </remarks>
1239         /// <since_tizen> 3 </since_tizen>
1240         public Vector3 Scale
1241         {
1242             get
1243             {
1244                 Vector3 temp = (Vector3)GetValue(ScaleProperty);
1245                 return new Vector3(OnScaleChanged, temp.X, temp.Y, temp.Z);
1246             }
1247             set
1248             {
1249                 SetValue(ScaleProperty, value);
1250                 NotifyPropertyChanged();
1251             }
1252         }
1253
1254         /// <summary>
1255         /// Gets or sets the scale X factor applied to the view.
1256         /// </summary>
1257         /// <remarks>
1258         /// <para>
1259         /// Animatable - This property can be animated using <c>Animation</c> class.
1260         /// </para>
1261         /// </remarks>
1262         /// <since_tizen> 3 </since_tizen>
1263         public float ScaleX
1264         {
1265             get
1266             {
1267                 return (float)GetValue(ScaleXProperty);
1268             }
1269             set
1270             {
1271                 SetValue(ScaleXProperty, value);
1272                 NotifyPropertyChanged();
1273             }
1274         }
1275
1276         /// <summary>
1277         /// Gets or sets the scale Y factor applied to the view.
1278         /// </summary>
1279         /// <remarks>
1280         /// <para>
1281         /// Animatable - This property can be animated using <c>Animation</c> class.
1282         /// </para>
1283         /// </remarks>
1284         /// <since_tizen> 3 </since_tizen>
1285         public float ScaleY
1286         {
1287             get
1288             {
1289                 return (float)GetValue(ScaleYProperty);
1290             }
1291             set
1292             {
1293                 SetValue(ScaleYProperty, value);
1294                 NotifyPropertyChanged();
1295             }
1296         }
1297
1298         /// <summary>
1299         /// Gets or sets the scale Z factor applied to the view.
1300         /// </summary>
1301         /// <remarks>
1302         /// <para>
1303         /// Animatable - This property can be animated using <c>Animation</c> class.
1304         /// </para>
1305         /// </remarks>
1306         /// <since_tizen> 3 </since_tizen>
1307         public float ScaleZ
1308         {
1309             get
1310             {
1311                 return (float)GetValue(ScaleZProperty);
1312             }
1313             set
1314             {
1315                 SetValue(ScaleZProperty, value);
1316                 NotifyPropertyChanged();
1317             }
1318         }
1319
1320         /// <summary>
1321         /// Gets the world scale of the view.
1322         /// </summary>
1323         /// <since_tizen> 3 </since_tizen>
1324         public Vector3 WorldScale
1325         {
1326             get
1327             {
1328                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1329                 GetProperty(View.Property.WORLD_SCALE).Get(temp);
1330                 return temp;
1331             }
1332         }
1333
1334         /// <summary>
1335         /// Retrieves the visibility flag of the view.
1336         /// </summary>
1337         /// <remarks>
1338         /// <para>
1339         /// If the view is not visible, then the view and its children will not be rendered.
1340         /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
1341         /// </para>
1342         /// <para>
1343         /// Animatable - This property can be animated using <c>Animation</c> class.
1344         /// </para>
1345         /// </remarks>
1346         /// <since_tizen> 3 </since_tizen>
1347         public bool Visibility
1348         {
1349             get
1350             {
1351                 bool temp = false;
1352                 GetProperty(View.Property.VISIBLE).Get(out temp);
1353                 return temp;
1354             }
1355         }
1356
1357         /// <summary>
1358         /// Gets the view's world color.
1359         /// </summary>
1360         /// <since_tizen> 3 </since_tizen>
1361         public Vector4 WorldColor
1362         {
1363             get
1364             {
1365                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1366                 GetProperty(View.Property.WORLD_COLOR).Get(temp);
1367                 return temp;
1368             }
1369         }
1370
1371         /// <summary>
1372         /// Gets or sets the view's name.
1373         /// </summary>
1374         /// <since_tizen> 3 </since_tizen>
1375         public string Name
1376         {
1377             get
1378             {
1379                 return (string)GetValue(NameProperty);
1380             }
1381             set
1382             {
1383                 SetValue(NameProperty, value);
1384                 NotifyPropertyChanged();
1385             }
1386         }
1387
1388         /// <summary>
1389         /// Get the number of children held by the view.
1390         /// </summary>
1391         /// <since_tizen> 3 </since_tizen>
1392         public new uint ChildCount
1393         {
1394             get
1395             {
1396                 return GetChildCount();
1397             }
1398         }
1399
1400         /// <summary>
1401         /// Gets the view's ID.
1402         /// Readonly
1403         /// </summary>
1404         /// <since_tizen> 3 </since_tizen>
1405         public uint ID
1406         {
1407             get
1408             {
1409                 return GetId();
1410             }
1411         }
1412
1413         /// <summary>
1414         /// Gets or sets the status of whether the view should emit touch or hover signals.
1415         /// </summary>
1416         /// <since_tizen> 3 </since_tizen>
1417         public bool Sensitive
1418         {
1419             get
1420             {
1421                 return (bool)GetValue(SensitiveProperty);
1422             }
1423             set
1424             {
1425                 SetValue(SensitiveProperty, value);
1426                 NotifyPropertyChanged();
1427             }
1428         }
1429
1430         /// <summary>
1431         /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
1432         /// </summary>
1433         /// <since_tizen> 3 </since_tizen>
1434         public bool LeaveRequired
1435         {
1436             get
1437             {
1438                 return (bool)GetValue(LeaveRequiredProperty);
1439             }
1440             set
1441             {
1442                 SetValue(LeaveRequiredProperty, value);
1443                 NotifyPropertyChanged();
1444             }
1445         }
1446
1447         /// <summary>
1448         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
1449         /// </summary>
1450         /// <since_tizen> 3 </since_tizen>
1451         public bool InheritOrientation
1452         {
1453             get
1454             {
1455                 return (bool)GetValue(InheritOrientationProperty);
1456             }
1457             set
1458             {
1459                 SetValue(InheritOrientationProperty, value);
1460                 NotifyPropertyChanged();
1461             }
1462         }
1463
1464         /// <summary>
1465         /// Gets or sets the status of whether a child view inherits it's parent's scale.
1466         /// </summary>
1467         /// <since_tizen> 3 </since_tizen>
1468         public bool InheritScale
1469         {
1470             get
1471             {
1472                 return (bool)GetValue(InheritScaleProperty);
1473             }
1474             set
1475             {
1476                 SetValue(InheritScaleProperty, value);
1477                 NotifyPropertyChanged();
1478             }
1479         }
1480
1481         /// <summary>
1482         /// Gets or sets the status of how the view and its children should be drawn.<br />
1483         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
1484         /// If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.<br />
1485         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
1486         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
1487         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
1488         /// </summary>
1489         /// <since_tizen> 3 </since_tizen>
1490         public DrawModeType DrawMode
1491         {
1492             get
1493             {
1494                 return (DrawModeType)GetValue(DrawModeProperty);
1495             }
1496             set
1497             {
1498                 SetValue(DrawModeProperty, value);
1499                 NotifyPropertyChanged();
1500             }
1501         }
1502
1503         /// <summary>
1504         /// Gets or sets the relative to parent size factor of the view.<br />
1505         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
1506         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
1507         /// </summary>
1508         /// <remarks>
1509         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
1510         /// </remarks>
1511         /// <since_tizen> 3 </since_tizen>
1512         public Vector3 SizeModeFactor
1513         {
1514             get
1515             {
1516                 Vector3 temp = (Vector3)GetValue(SizeModeFactorProperty);
1517                 return new Vector3(OnSizeModeFactorChanged, temp.X, temp.Y, temp.Z);
1518             }
1519             set
1520             {
1521                 SetValue(SizeModeFactorProperty, value);
1522                 NotifyPropertyChanged();
1523             }
1524         }
1525
1526         /// <summary>
1527         /// Gets or sets the width resize policy to be used.
1528         /// </summary>
1529         /// <since_tizen> 3 </since_tizen>
1530         public ResizePolicyType WidthResizePolicy
1531         {
1532             get
1533             {
1534                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
1535             }
1536             set
1537             {
1538                 SetValue(WidthResizePolicyProperty, value);
1539                 // Match ResizePolicy to new Layouting.
1540                 // Parent relative policies can not be mapped at this point as parent size unknown.
1541                 switch (value)
1542                 {
1543                     case ResizePolicyType.UseNaturalSize:
1544                     {
1545                         WidthSpecification = LayoutParamPolicies.WrapContent;
1546                         break;
1547                     }
1548                     case ResizePolicyType.FillToParent:
1549                     {
1550                         WidthSpecification = LayoutParamPolicies.MatchParent;
1551                         break;
1552                     }
1553                     case ResizePolicyType.FitToChildren:
1554                     {
1555                         WidthSpecification = LayoutParamPolicies.WrapContent;
1556                         break;
1557                     }
1558                     default:
1559                         break;
1560                 }
1561                 NotifyPropertyChanged();
1562             }
1563         }
1564
1565         /// <summary>
1566         /// Gets or sets the height resize policy to be used.
1567         /// </summary>
1568         /// <since_tizen> 3 </since_tizen>
1569         public ResizePolicyType HeightResizePolicy
1570         {
1571             get
1572             {
1573                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
1574             }
1575             set
1576             {
1577                 SetValue(HeightResizePolicyProperty, value);
1578                 // Match ResizePolicy to new Layouting.
1579                 // Parent relative policies can not be mapped at this point as parent size unknown.
1580                 switch (value)
1581                 {
1582                     case ResizePolicyType.UseNaturalSize:
1583                     {
1584                         HeightSpecification = LayoutParamPolicies.WrapContent;
1585                         break;
1586                     }
1587                     case ResizePolicyType.FillToParent:
1588                     {
1589                         HeightSpecification = LayoutParamPolicies.MatchParent;
1590                         break;
1591                     }
1592                     case ResizePolicyType.FitToChildren:
1593                     {
1594                         HeightSpecification = LayoutParamPolicies.WrapContent;
1595                         break;
1596                     }
1597                     default:
1598                         break;
1599                 }
1600                 NotifyPropertyChanged();
1601             }
1602         }
1603
1604         /// <summary>
1605         /// Gets or sets the policy to use when setting size with size negotiation.<br />
1606         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
1607         /// </summary>
1608         /// <since_tizen> 3 </since_tizen>
1609         public SizeScalePolicyType SizeScalePolicy
1610         {
1611             get
1612             {
1613                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
1614             }
1615             set
1616             {
1617                 SetValue(SizeScalePolicyProperty, value);
1618                 NotifyPropertyChanged();
1619             }
1620         }
1621
1622         /// <summary>
1623         ///  Gets or sets the status of whether the width size is dependent on the height size.
1624         /// </summary>
1625         /// <since_tizen> 3 </since_tizen>
1626         public bool WidthForHeight
1627         {
1628             get
1629             {
1630                 return (bool)GetValue(WidthForHeightProperty);
1631             }
1632             set
1633             {
1634                 SetValue(WidthForHeightProperty, value);
1635                 NotifyPropertyChanged();
1636             }
1637         }
1638
1639         /// <summary>
1640         /// Gets or sets the status of whether the height size is dependent on the width size.
1641         /// </summary>
1642         /// <since_tizen> 3 </since_tizen>
1643         public bool HeightForWidth
1644         {
1645             get
1646             {
1647                 return (bool)GetValue(HeightForWidthProperty);
1648             }
1649             set
1650             {
1651                 SetValue(HeightForWidthProperty, value);
1652                 NotifyPropertyChanged();
1653             }
1654         }
1655
1656         /// <summary>
1657         /// Gets or sets the padding for use in layout.
1658         /// </summary>
1659         /// <remarks>
1660         /// The property cascade chaining set is possible. For example, this (view.Padding.X = 0.1f;) is possible.
1661         /// </remarks>
1662         /// <since_tizen> 5 </since_tizen>
1663         public Extents Padding
1664         {
1665             get
1666             {
1667                 // If View has a Layout then padding in stored in the base Layout class
1668                 if (Layout !=null)
1669                 {
1670                     return Layout.Padding;
1671                 }
1672                 else
1673                 {
1674                     Extents temp = (Extents)GetValue(PaddingProperty);
1675                     return new Extents(OnPaddingChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1676                 }
1677                 // Two return points to prevent creating a zeroed Extent native object before assignment
1678             }
1679             set
1680             {
1681                 Extents padding = value;
1682                 if (Layout !=null)
1683                 {
1684                     // Layout set so store Padding in LayoutItem instead of in View.
1685                     // If View stores the Padding value then Legacy Size Negotiation will overwrite
1686                     // the position and sizes measure in the Layouting.
1687                     Layout.Padding = value;
1688                     // If Layout is a LayoutItem then it could be a View that handles it's own padding.
1689                     // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
1690                     if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
1691                     {
1692                         padding =  new Extents(0,0,0,0); // Reset value stored in View.
1693                     }
1694                     _layout?.RequestLayout();
1695                 }
1696                 SetValue(PaddingProperty, padding);
1697                 NotifyPropertyChanged();
1698                 _layout?.RequestLayout();
1699             }
1700         }
1701
1702         /// <summary>
1703         /// Gets or sets the minimum size the view can be assigned in size negotiation.
1704         /// </summary>
1705         /// <remarks>
1706         /// The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.
1707         /// </remarks>
1708         /// <since_tizen> 3 </since_tizen>
1709         public Size2D MinimumSize
1710         {
1711             get
1712             {
1713                 Size2D tmp = (Size2D)GetValue(MinimumSizeProperty);
1714                 return new Size2D(OnMinimumSizeChanged, tmp.Width, tmp.Height);
1715             }
1716             set
1717             {
1718                 if (_layout != null)
1719                 {
1720                     // Note: it only works if minimum size is >= than natural size.
1721                     // To force the size it should be done through the width&height spec or Size2D.
1722                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
1723                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
1724                     _layout.RequestLayout();
1725                 }
1726                 SetValue(MinimumSizeProperty, value);
1727                 NotifyPropertyChanged();
1728             }
1729         }
1730
1731         /// <summary>
1732         /// Gets or sets the maximum size the view can be assigned in size negotiation.
1733         /// </summary>
1734         /// <remarks>
1735         /// The property cascade chaining set is possible. For example, this (view.MaximumSize.Width = 1;) is possible.
1736         /// </remarks>
1737         /// <since_tizen> 3 </since_tizen>
1738         public Size2D MaximumSize
1739         {
1740             get
1741             {
1742                 Size2D tmp = (Size2D)GetValue(MaximumSizeProperty);
1743                 return new Size2D(OnMaximumSizeChanged, tmp.Width, tmp.Height);
1744             }
1745             set
1746             {
1747                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
1748                 // MATCH_PARENT spec + parent container size can be used to limit
1749                 if (_layout != null)
1750                 {
1751                     _layout.RequestLayout();
1752                 }
1753                 SetValue(MaximumSizeProperty, value);
1754                 NotifyPropertyChanged();
1755             }
1756         }
1757
1758         /// <summary>
1759         /// Gets or sets whether a child view inherits it's parent's position.<br />
1760         /// Default is to inherit.<br />
1761         /// Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.<br />
1762         /// </summary>
1763         /// <since_tizen> 3 </since_tizen>
1764         public bool InheritPosition
1765         {
1766             get
1767             {
1768                 return (bool)GetValue(InheritPositionProperty);
1769             }
1770             set
1771             {
1772                 SetValue(InheritPositionProperty, value);
1773                 NotifyPropertyChanged();
1774             }
1775         }
1776
1777         /// <summary>
1778         /// Gets or sets the clipping behavior (mode) of it's children.
1779         /// </summary>
1780         /// <since_tizen> 3 </since_tizen>
1781         public ClippingModeType ClippingMode
1782         {
1783             get
1784             {
1785                 return (ClippingModeType)GetValue(ClippingModeProperty);
1786             }
1787             set
1788             {
1789                 SetValue(ClippingModeProperty, value);
1790                 NotifyPropertyChanged();
1791             }
1792         }
1793
1794         /// <summary>
1795         /// Gets the number of renderers held by the view.
1796         /// </summary>
1797         /// <since_tizen> 3 </since_tizen>
1798         public uint RendererCount
1799         {
1800             get
1801             {
1802                 return GetRendererCount();
1803             }
1804         }
1805
1806         /// <summary>
1807         /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
1808         /// </summary>
1809         /// <remarks>
1810         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
1811         /// </remarks>
1812         /// <since_tizen> 3 </since_tizen>
1813         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
1814             "Like: " +
1815             "View view = new View(); " +
1816             "view.PivotPoint = PivotPoint.Center; " +
1817             "view.PositionUsesPivotPoint = true;")]
1818         [EditorBrowsable(EditorBrowsableState.Never)]
1819         public Position AnchorPoint
1820         {
1821             get
1822             {
1823                 Position temp = new Position(0.0f, 0.0f, 0.0f);
1824                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
1825                 return new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
1826             }
1827             set
1828             {
1829                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1830                 NotifyPropertyChanged();
1831             }
1832         }
1833
1834         /// <summary>
1835         /// Sets the size of a view for the width, the height and the depth.<br />
1836         /// Geometry can be scaled to fit within this area.<br />
1837         /// This does not interfere with the view's scale factor.<br />
1838         /// The views default depth is the minimum of width and height.<br />
1839         /// </summary>
1840         /// <remarks>
1841         /// <para>
1842         /// Animatable - This property can be animated using <c>Animation</c> class.
1843         /// </para>
1844         /// The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.
1845         /// </remarks>
1846         /// <since_tizen> 5 </since_tizen>
1847         public Size Size
1848         {
1849             get
1850             {
1851                 Size tmp = (Size)GetValue(SizeProperty);
1852                 return new Size(OnSizeChanged, tmp.Width, tmp.Height, tmp.Depth);
1853             }
1854             set
1855             {
1856                 SetValue(SizeProperty, value);
1857                 // Set Specification so when layouts measure this View it matches the value set here.
1858                 // All Views are currently Layouts.
1859                 WidthSpecification = (int)Math.Ceiling(value.Width);
1860                 HeightSpecification = (int)Math.Ceiling(value.Height);
1861                 NotifyPropertyChanged();
1862             }
1863         }
1864
1865         /// <summary>
1866         /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
1867         /// </summary>
1868         /// <since_tizen> 3 </since_tizen>
1869         [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
1870             "Like: " +
1871             "Container parent =  view.GetParent(); " +
1872             "View view = parent as View;")]
1873         [EditorBrowsable(EditorBrowsableState.Never)]
1874         public new View Parent
1875         {
1876             get
1877             {
1878                 View ret;
1879                 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
1880                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1881                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
1882
1883                 if (basehandle is Layer layer)
1884                 {
1885                     ret = new View(Layer.getCPtr(layer).Handle, false);
1886                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
1887                 }
1888                 else
1889                 {
1890                     ret = basehandle as View;
1891                 }
1892
1893                 Interop.BaseHandle.delete_BaseHandle(CPtr);
1894                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1895
1896                 if (NDalicPINVOKE.SWIGPendingException.Pending)
1897                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1898                 return ret;
1899             }
1900         }
1901
1902         /// <summary>
1903         /// Gets/Sets whether inherit parent's the layout Direction.
1904         /// </summary>
1905         /// <since_tizen> 4 </since_tizen>
1906         public bool InheritLayoutDirection
1907         {
1908             get
1909             {
1910                 return (bool)GetValue(InheritLayoutDirectionProperty);
1911             }
1912             set
1913             {
1914                 SetValue(InheritLayoutDirectionProperty, value);
1915                 NotifyPropertyChanged();
1916             }
1917         }
1918
1919         /// <summary>
1920         /// Gets/Sets the layout Direction.
1921         /// </summary>
1922         /// <since_tizen> 4 </since_tizen>
1923         public ViewLayoutDirectionType LayoutDirection
1924         {
1925             get
1926             {
1927                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
1928             }
1929             set
1930             {
1931                 SetValue(LayoutDirectionProperty, value);
1932                 NotifyPropertyChanged();
1933                 _layout?.RequestLayout();
1934             }
1935         }
1936
1937         /// <summary>
1938         /// Gets or sets the Margin for use in layout.
1939         /// </summary>
1940         /// <remarks>
1941         /// Margin property is supported by Layout algorithms and containers.
1942         /// Please Set Layout if you want to use Margin property.
1943         /// The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.
1944         /// </remarks>
1945         /// <since_tizen> 4 </since_tizen>
1946         public Extents Margin
1947         {
1948             get
1949             {
1950                 // If View has a Layout then margin is stored in Layout.
1951                 if (Layout != null)
1952                 {
1953                     return Layout.Margin;
1954                 }
1955                 else
1956                 {
1957                     // If Layout not set then return margin stored in View.
1958                     Extents temp = (Extents)GetValue(MarginProperty);
1959                     return new Extents(OnMarginChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1960                 }
1961                 // Two return points to prevent creating a zeroed Extent native object before assignment
1962             }
1963             set
1964             {
1965                 if (Layout != null)
1966                 {
1967                     // Layout set so store Margin in LayoutItem instead of View.
1968                     // If View stores the Margin too then the Legacy Size Negotiation will
1969                     // overwrite the position and size values measured in the Layouting.
1970                     Layout.Margin = value;
1971                     SetValue(MarginProperty, new Extents(0,0,0,0));
1972                     _layout?.RequestLayout();
1973                 }
1974                 else
1975                 {
1976                     SetValue(MarginProperty, value);
1977                 }
1978                 NotifyPropertyChanged();
1979                 _layout?.RequestLayout();
1980             }
1981         }
1982
1983         ///<summary>
1984         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
1985         ///</summary>
1986         /// <since_tizen> 6 </since_tizen>
1987         public int WidthSpecification
1988         {
1989             get
1990             {
1991                 return _widthPolicy;
1992             }
1993             set
1994             {
1995                 _widthPolicy = value;
1996                 if( _oldWidthPolicy != _widthPolicy )
1997                 {
1998                     if (_widthPolicy >= 0)
1999                     {
2000                         _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
2001
2002                         if(_heightPolicy>=0) // Policy an exact value
2003                         {
2004                             Size2D.Width = _widthPolicy;
2005                         }
2006                         else
2007                         {
2008                             // Store _heightPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
2009                             // Size2D height will store the specification value (negative number) this will then be applied to the
2010                             // HeightSpecification when the Size2D callback is invoked.
2011                             Size2D = new Size2D(_widthPolicy,_heightPolicy);
2012                         }
2013                     }
2014                     _layout?.RequestLayout();
2015                     _oldWidthPolicy = _widthPolicy;
2016                 }
2017             }
2018         }
2019
2020         ///<summary>
2021         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
2022         ///</summary>
2023         /// <since_tizen> 6 </since_tizen>
2024         public int HeightSpecification
2025         {
2026             get
2027             {
2028                 return _heightPolicy;
2029             }
2030             set
2031             {
2032                 _heightPolicy = value;
2033                 if( _oldHeightPolicy != _heightPolicy )
2034                 {
2035                     if (_heightPolicy >= 0)
2036                     {
2037                         _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
2038
2039                         if(_widthPolicy>=0) // Policy an exact value
2040                         {
2041                             Size2D.Height = _heightPolicy;
2042                         }
2043                         else
2044                         {
2045                             // Store widthPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
2046                             // Size2D height will store the specification value (negative number) this will then be applied to the
2047                             // HeightSpecification when the Size2D callback is invoked.
2048                             Size2D = new Size2D(_widthPolicy,_heightPolicy);
2049                         }
2050
2051                     }
2052                     _layout?.RequestLayout();
2053                     _oldHeightPolicy = _heightPolicy;
2054                 }
2055             }
2056         }
2057
2058         ///<summary>
2059         /// Gets the List of transitions for this View.
2060         ///</summary>
2061         /// <since_tizen> 6 </since_tizen>
2062         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2063         {
2064             get
2065             {
2066                 if (_layoutTransitions == null)
2067                 {
2068                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2069                 }
2070                 return _layoutTransitions;
2071             }
2072         }
2073
2074         ///<summary>
2075         /// Set a layout transitions for this View.
2076         ///</summary>
2077         /// <remarks>
2078         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2079         /// </remarks>
2080         /// <since_tizen> 6 </since_tizen>
2081         public LayoutTransition LayoutTransition
2082         {
2083             set
2084             {
2085                 if (_layoutTransitions == null)
2086                 {
2087                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2088                 }
2089                 LayoutTransitionsHelper.AddTransitionForCondition(_layoutTransitions,value.Condition,value, true);
2090
2091                 AttachTransitionsToChildren(value);
2092             }
2093         }
2094
2095         /// <summary>
2096         /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
2097         /// </summary>
2098         /// <remarks>
2099         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2100         /// </remarks>
2101         /// <since_tizen> 4 </since_tizen>
2102         [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
2103         [EditorBrowsable(EditorBrowsableState.Never)]
2104         public Extents PaddingEX
2105         {
2106             get
2107             {
2108                 Extents temp = new Extents(0, 0, 0, 0);
2109                 GetProperty(View.Property.PADDING).Get(temp);
2110                 return new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2111             }
2112             set
2113             {
2114                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
2115                 NotifyPropertyChanged();
2116                 _layout?.RequestLayout();
2117             }
2118         }
2119
2120         /// <since_tizen> 6 </since_tizen>
2121         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2122         [EditorBrowsable(EditorBrowsableState.Never)]
2123         public Style XamlStyle
2124         {
2125             get
2126             {
2127                 return (Style)GetValue(XamlStyleProperty);
2128             }
2129             set
2130             {
2131                 SetValue(XamlStyleProperty, value);
2132             }
2133         }
2134
2135         /// <summary>
2136         /// The Color of View. This is an RGBA value.
2137         /// </summary>
2138         /// <remarks>
2139         /// <para>
2140         /// Animatable - This property can be animated using <c>Animation</c> class.
2141         /// </para>
2142         /// The property cascade chaining set is possible. For example, this (view.Color.X = 0.1f;) is possible.
2143         /// </remarks>
2144         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2145         [EditorBrowsable(EditorBrowsableState.Never)]
2146         public Color Color
2147         {
2148             get
2149             {
2150                 Color temp = (Color)GetValue(ColorProperty);
2151                 return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
2152             }
2153             set
2154             {
2155                 if (viewStyle != null)
2156                 {
2157                     viewStyle.Color = value;
2158                 }
2159                 else
2160                 {
2161                     SetValue(ColorProperty, value);
2162                 }
2163
2164                 NotifyPropertyChanged();
2165             }
2166         }
2167
2168         /// <summary>
2169         /// Set the layout on this View. Replaces any existing Layout.
2170         /// </summary>
2171         /// <since_tizen> 6 </since_tizen>
2172         public LayoutItem Layout
2173         {
2174             get
2175             {
2176                 return _layout;
2177             }
2178             set
2179             {
2180                 // Do nothing if layout provided is already set on this View.
2181                 if (value == _layout)
2182                 {
2183                     return;
2184                 }
2185
2186                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
2187                 layoutingDisabled = false;
2188                 layoutSet = true;
2189
2190                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2191                 // First check if the layout to be set already has a owner.
2192                 if (value?.Owner != null)
2193                 {
2194                     // Previous owner of the layout gets a default layout as a replacement.
2195                     value.Owner.Layout = new AbsoluteLayout();
2196
2197                     // Copy Margin and Padding to replacement LayoutGroup.
2198                     value.Owner.Layout.Margin = value.Margin;
2199                     value.Owner.Layout.Padding = value.Padding;
2200                 }
2201
2202                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2203                 // View if no replacement. Previously margin and padding values would have been moved from
2204                 // the View to the layout.
2205                 if (_layout != null ) // Existing layout
2206                 {
2207                     if (value != null)
2208                     {
2209                         // Existing layout being replaced so copy over margin and padding values.
2210                         value.Margin = _layout.Margin;
2211                         value.Padding = _layout.Padding;
2212                     }
2213                     else
2214                     {
2215                       // Layout not being replaced so restore margin and padding to View.
2216                       SetValue(MarginProperty, _layout.Margin);
2217                       SetValue(PaddingProperty, _layout.Padding);
2218                       NotifyPropertyChanged();
2219                     }
2220                 }
2221                 else
2222                 {
2223                     // First Layout to be added to the View hence copy
2224
2225                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2226                     if (value !=null)
2227                     {
2228                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
2229                         {
2230                             // If View already has a margin set then store it in Layout instead.
2231                             value.Margin = Margin;
2232                             SetValue(MarginProperty, new Extents(0,0,0,0));
2233                             NotifyPropertyChanged();
2234                         }
2235
2236                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
2237                         {
2238                             // If View already has a padding set then store it in Layout instead.
2239                             value.Padding = Padding;
2240                             SetValue(PaddingProperty, new Extents(0,0,0,0));
2241                             NotifyPropertyChanged();
2242                         }
2243                     }
2244                 }
2245
2246                 // Remove existing layout from it's parent layout group.
2247                 _layout?.Unparent();
2248
2249                 // Set layout to this view
2250                 SetLayout(value);
2251             }
2252         }
2253
2254         /// <summary>
2255         /// The weight of the View, used to share available space in a layout with siblings.
2256         /// </summary>
2257         /// <since_tizen> 6 </since_tizen>
2258         public float Weight
2259         {
2260             get
2261             {
2262                 return _weight;
2263             }
2264             set
2265             {
2266                 _weight = value;
2267                 _layout?.RequestLayout();
2268             }
2269         }
2270
2271         /// <summary>
2272         ///  Whether to load the BackgroundImage synchronously.
2273         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2274         ///  Note: For Normal Quad images only.
2275         /// </summary>
2276         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2277         [EditorBrowsable(EditorBrowsableState.Never)]
2278         public bool BackgroundImageSynchronosLoading
2279         {
2280             get
2281             {
2282                 return _backgroundImageSynchronosLoading;
2283             }
2284             set
2285             {
2286                 _backgroundImageSynchronosLoading = value;
2287                 string bgUrl = "";
2288                 int visualType = 0;
2289                 Background.Find(Visual.Property.Type)?.Get(out visualType);
2290                 if (visualType == (int)Visual.Type.Image)
2291                 {
2292                     Background.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
2293                 }
2294
2295                 if (bgUrl.Length != 0)
2296                 {
2297                     PropertyMap bgMap = this.Background;
2298                     bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
2299                     Background = bgMap;
2300                 }
2301             }
2302         }
2303
2304         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2305         [EditorBrowsable(EditorBrowsableState.Never)]
2306         public Vector2 UpdateSizeHint
2307         {
2308             get
2309             {
2310                 return (Vector2)GetValue(UpdateSizeHintProperty);
2311             }
2312             set
2313             {
2314                 SetValue(UpdateSizeHintProperty, value);
2315                 NotifyPropertyChanged();
2316             }
2317         }
2318
2319         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
2320         [EditorBrowsable(EditorBrowsableState.Never)]
2321         public string[] TransitionNames
2322         {
2323             get
2324             {
2325                 return transitionNames;
2326             }
2327             set
2328             {
2329                 transitionNames = value;
2330                 LoadTransitions();
2331             }
2332         }
2333
2334         /// <summary>
2335         /// Enable/Disable ControlState propagation for children.
2336         /// It is false by default.
2337         /// If the View needs to share ControlState with descendants, please set it true.
2338         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
2339         /// </summary>
2340         [EditorBrowsable(EditorBrowsableState.Never)]
2341         public bool EnableControlStatePropagation
2342         {
2343             get => controlStatePropagation;
2344             set
2345             {
2346                 controlStatePropagation = value;
2347
2348                 foreach (View child in Children)
2349                 {
2350                     child.EnableControlStatePropagation = value;
2351                 }
2352             }
2353         }
2354
2355         /// <summary>
2356         /// Get Style, it is abstract function and must be override.
2357         /// </summary>
2358         /// <since_tizen> 6 </since_tizen>
2359         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2360         [EditorBrowsable(EditorBrowsableState.Never)]
2361         protected virtual ViewStyle GetViewStyle()
2362         {
2363             return new ViewStyle();
2364         }
2365
2366         /// <summary>
2367         /// Called after the View's ControlStates changed.
2368         /// </summary>
2369         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
2370         [EditorBrowsable(EditorBrowsableState.Never)]
2371         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
2372         {
2373         }
2374
2375         internal static readonly BindableProperty BackgroundImageSelectorProperty = BindableProperty.Create("BackgroundImageSelector", typeof(Selector<string>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2376         {
2377             var view = (View)bindable;
2378             view.backgroundImageSelector.Clone((Selector<string>)newValue);
2379         },
2380         defaultValueCreator: (bindable) =>
2381         {
2382             var view = (View)bindable;
2383             return view.backgroundImageSelector;
2384         });
2385         private TriggerableSelector<string> _backgroundImageSelector;
2386         private TriggerableSelector<string> backgroundImageSelector
2387         {
2388             get
2389             {
2390                 if (null == _backgroundImageSelector)
2391                 {
2392                     _backgroundImageSelector = new TriggerableSelector<string>(this, BackgroundImageProperty);
2393                 }
2394                 return _backgroundImageSelector;
2395             }
2396         }
2397         internal static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2398         {
2399             var view = (View)bindable;
2400             view.backgroundColorSelector.Clone((Selector<Color>)newValue);
2401         },
2402         defaultValueCreator: (bindable) =>
2403         {
2404             var view = (View)bindable;
2405             return view.backgroundColorSelector;
2406         });
2407         private TriggerableSelector<Color> _backgroundColorSelector;
2408         private TriggerableSelector<Color> backgroundColorSelector
2409         {
2410             get
2411             {
2412                 if (null == _backgroundColorSelector)
2413                 {
2414                     _backgroundColorSelector = new TriggerableSelector<Color>(this, BackgroundColorProperty);
2415                 }
2416                 return _backgroundColorSelector;
2417             }
2418         }
2419
2420         internal static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2421         {
2422             var view = (View)bindable;
2423             view.colorSelector.Clone((Selector<Color>)newValue);
2424         },
2425         defaultValueCreator: (bindable) =>
2426         {
2427             var view = (View)bindable;
2428             return view.colorSelector;
2429         });
2430
2431         private TriggerableSelector<Color> _colorSelector;
2432         private TriggerableSelector<Color> colorSelector
2433         {
2434             get
2435             {
2436                 if (null == _colorSelector)
2437                 {
2438                     _colorSelector = new TriggerableSelector<Color>(this, ColorProperty);
2439                 }
2440                 return _colorSelector;
2441             }
2442         }
2443
2444         internal static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2445         {
2446             var view = (View)bindable;
2447             view.backgroundImageBorderSelector.Clone((Selector<Rectangle>)newValue);
2448         },
2449         defaultValueCreator: (bindable) =>
2450         {
2451             var view = (View)bindable;
2452             return view.backgroundImageBorderSelector;
2453         });
2454         private TriggerableSelector<Rectangle> _backgroundImageBorderSelector;
2455         private TriggerableSelector<Rectangle> backgroundImageBorderSelector
2456         {
2457             get
2458             {
2459                 if (null == _backgroundImageBorderSelector)
2460                 {
2461                     _backgroundImageBorderSelector = new TriggerableSelector<Rectangle>(this, BackgroundImageBorderProperty);
2462                 }
2463                 return _backgroundImageBorderSelector;
2464             }
2465         }
2466         internal static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2467         {
2468             var view = (View)bindable;
2469             view.opacitySelector.Clone((Selector<float?>)newValue);
2470         },
2471         defaultValueCreator: (bindable) =>
2472         {
2473             var view = (View)bindable;
2474             return view.opacitySelector;
2475         });
2476         private TriggerableSelector<float?> _opacitySelector;
2477         private TriggerableSelector<float?> opacitySelector
2478         {
2479             get
2480             {
2481                 if (null == _opacitySelector)
2482                 {
2483                     _opacitySelector = new TriggerableSelector<float?>(this, OpacityProperty);
2484                 }
2485                 return _opacitySelector;
2486             }
2487         }
2488
2489         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2490         [EditorBrowsable(EditorBrowsableState.Never)]
2491         public virtual void ApplyStyle(ViewStyle viewStyle)
2492         {
2493             if (null == viewStyle)
2494             {
2495                 return;
2496             }
2497
2498             if (this.viewStyle == viewStyle)
2499             {
2500                 return;
2501             }
2502
2503             if (null != this.viewStyle)
2504             {
2505                 simpleBinding.Clear();
2506             }
2507
2508             this.viewStyle = viewStyle;
2509
2510             Dictionary<string, BindableProperty> bindablePropertyOfView;
2511             Type viewType = GetType();
2512
2513             Dictionary<string, BindableProperty> bindablePropertyOfStyle;
2514             Type styleType = viewStyle.GetType();
2515
2516             BindableProperty.GetBindablePropertysOfType(viewType, out bindablePropertyOfView);
2517             BindableProperty.GetBindablePropertysOfType(styleType, out bindablePropertyOfStyle);
2518
2519             if (null != bindablePropertyOfView && null != bindablePropertyOfStyle)
2520             {
2521                 foreach (KeyValuePair<string, BindableProperty> keyValuePair in bindablePropertyOfStyle)
2522                 {
2523                     BindableProperty viewProperty;
2524                     bindablePropertyOfView.TryGetValue(keyValuePair.Key, out viewProperty);
2525
2526                     if (null != viewProperty)
2527                     {
2528                         object value = viewStyle.GetValue(keyValuePair.Value);
2529
2530                         if (null != value)
2531                         {
2532                             SetValue(viewProperty, value);
2533                         }
2534
2535                         simpleBinding.Bind(viewStyle, keyValuePair.Value, this, viewProperty, BindingDirection.TwoWay);
2536                     }
2537                 }
2538             }
2539         }
2540
2541         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2542         [EditorBrowsable(EditorBrowsableState.Never)]
2543         private BundledPipe simpleBinding = new BundledPipe();
2544     }
2545 }