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