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