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