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