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