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