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