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