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