[NUI] Change property get/set not to use PropertyValue (patch set2)
[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         private static bool defaultAllowOnlyOwnTouch = false;
36
37         internal BackgroundExtraData backgroundExtraData;
38
39         private bool layoutSet = false;
40         private LayoutItem layout; // Exclusive layout assigned to this View.
41
42         // List of transitions paired with the condition that uses the transition.
43         private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
44         private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
45         private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
46         private float weight = 0.0f; // Weighting of child View in a Layout
47         private bool backgroundImageSynchronousLoading = false;
48         private bool excludeLayouting = false;
49         private LayoutTransition layoutTransition;
50         private TransitionOptions transitionOptions = null;
51         private ThemeData themeData;
52         private bool isThemeChanged = false;
53
54         // List of constraints
55         private Constraint widthConstraint = null;
56         private Constraint heightConstraint = null;
57
58         private Size2D internalMaximumSize = null;
59         private Size2D internalMinimumSize = null;
60         private Extents internalMargin = null;
61         private Extents internalPadding = null;
62         private Vector3 internalSizeModeFactor = null;
63         private Vector2 internalCellIndex = null;
64         private Color internalBackgroundColor = null;
65         private Color internalColor = null;
66         private Position internalPivotPoint = null;
67         private Position internalPosition = null;
68         private Position2D internalPosition2D = null;
69         private Vector3 internalScale = null;
70         private Size internalSize = null;
71         private Size2D internalSize2D = null;
72         private int layoutCount = 0;
73         private ControlState propagatableControlStates = ControlState.All;
74
75         // List of dispatch Event
76         private PanGestureDetector panGestureDetector = null;
77         private LongPressGestureDetector longGestureDetector = null;
78         private PinchGestureDetector pinchGestureDetector = null;
79         private TapGestureDetector tapGestureDetector = null;
80         private RotationGestureDetector rotationGestureDetector = null;
81         private int configGestureCount = 0;
82         private bool dispatchTouchEvents = true;
83         private bool dispatchGestureEvents = true;
84         private bool dispatchParentGestureEvents = true;
85
86 #if NUI_PROPERTY_CHANGE_DEBUG
87 internal static int LayoutSetGetter = 0;
88 internal static int SizeGetter = 0;
89 internal static int SizeSetter = 0;
90 internal static int Size2DGetter = 0;
91 internal static int Size2DSetter = 0;
92 internal static int MaximumSizeGetter = 0;
93 internal static int MaximumSizeSetter = 0;
94 internal static int MinimumSizeGetter = 0;
95 internal static int MinimumSizeSetter = 0;
96 internal static int PositionGetter = 0;
97 internal static int PositionSetter = 0;
98 internal static int Position2DGetter = 0;
99 internal static int Position2DSetter = 0;
100 internal static int SizeWidthGetter = 0;
101 internal static int SizeWidthSetter = 0;
102 internal static int SizeHeightGetter = 0;
103 internal static int SizeHeightSetter = 0;
104 internal static int PositionXGetter = 0;
105 internal static int PositionXSetter = 0;
106 internal static int PositionYGetter = 0;
107 internal static int PositionYSetter = 0;
108 internal static int PositionZGetter = 0;
109 internal static int PositionZSetter = 0;
110 internal static int StyleNameGetter = 0;
111 internal static int StyleNameSetter = 0;
112 internal static int KeyInputFocusGetter = 0;
113 internal static int KeyInputFocusSetter = 0;
114 internal static int ColorGetter = 0;
115 internal static int ColorSetter = 0;
116
117
118 internal static int ColorRedSetter = 0;
119 internal static int ColorGreenSetter = 0;
120 internal static int ColorBlueSetter = 0;
121 internal static int StateSetter = 0;
122 internal static int SubStateSetter = 0;
123 internal static int FlexSetter = 0;
124 internal static int AlignSelfSetter = 0;
125 internal static int FlexMarginSetter = 0;
126 internal static int CellIndexSetter = 0;
127 internal static int RowSpanSetter = 0;
128 internal static int ColumnSpanSetter = 0;
129 internal static int CellHorizontalAlignmentSetter = 0;
130 internal static int CellVerticalAlignmentSetter = 0;
131 internal static int OpacitySetter = 0;
132 internal static int PositionUsesPivotPointSetter = 0;
133 internal static int ParentOriginSetter = 0;
134 internal static int PivotPointSetter = 0;
135 internal static int OrientationSetter = 0;
136 internal static int ScaleSetter = 0;
137 internal static int ScaleXSetter = 0;
138 internal static int ScaleYSetter = 0;
139 internal static int ScaleZSetter = 0;
140 internal static int NameSetter = 0;
141 internal static int SensitiveSetter = 0;
142 internal static int IsEnabledSetter = 0;
143 internal static int DispatchKeyEventsSetter = 0;
144 internal static int LeaveRequiredSetter = 0;
145 internal static int InheritOrientationSetter = 0;
146 internal static int InheritScaleSetter = 0;
147 internal static int DrawModeSetter = 0;
148 internal static int SizeModeFactorSetter = 0;
149 internal static int WidthResizePolicySetter = 0;
150 internal static int HeightResizePolicySetter = 0;
151 internal static int SizeScalePolicySetter = 0;
152 internal static int WidthForHeightSetter = 0;
153 internal static int HeightForWidthSetter = 0;
154 internal static int InheritPositionSetter = 0;
155 internal static int ClippingModeSetter = 0;
156 internal static int InheritLayoutDirectionSetter = 0;
157 internal static int LayoutDirectionSetter = 0;
158 internal static int UpdateAreaHintSetter = 0;
159 internal static int AccessibilityNameSetter = 0;
160 internal static int AccessibilityDescriptionSetter = 0;
161 internal static int AccessibilityTranslationDomainSetter = 0;
162 internal static int AccessibilityRoleSetter = 0;
163 internal static int AccessibilityHighlightableSetter = 0;
164 internal static int AccessibilityHiddenSetter = 0;
165 internal static int AutomationIdSetter = 0;
166
167 internal static int ColorRedGetter = 0;
168 internal static int ColorGreenGetter = 0;
169 internal static int ColorBlueGetter = 0;
170 internal static int StateGetter = 0;
171 internal static int SubStateGetter = 0;
172 internal static int FlexGetter = 0;
173 internal static int AlignSelfGetter = 0;
174 internal static int FlexMarginGetter = 0;
175 internal static int CellIndexGetter = 0;
176 internal static int RowSpanGetter = 0;
177 internal static int ColumnSpanGetter = 0;
178 internal static int CellHorizontalAlignmentGetter = 0;
179 internal static int CellVerticalAlignmentGetter = 0;
180 internal static int OpacityGetter = 0;
181 internal static int PositionUsesPivotPointGetter = 0;
182 internal static int ParentOriginGetter = 0;
183 internal static int PivotPointGetter = 0;
184 internal static int OrientationGetter = 0;
185 internal static int ScaleGetter = 0;
186 internal static int ScaleXGetter = 0;
187 internal static int ScaleYGetter = 0;
188 internal static int ScaleZGetter = 0;
189 internal static int NameGetter = 0;
190 internal static int SensitiveGetter = 0;
191 internal static int IsEnabledGetter = 0;
192 internal static int DispatchKeyEventsGetter = 0;
193 internal static int LeaveRequiredGetter = 0;
194 internal static int InheritOrientationGetter = 0;
195 internal static int InheritScaleGetter = 0;
196 internal static int DrawModeGetter = 0;
197 internal static int SizeModeFactorGetter = 0;
198 internal static int WidthResizePolicyGetter = 0;
199 internal static int HeightResizePolicyGetter = 0;
200 internal static int SizeScalePolicyGetter = 0;
201 internal static int WidthForHeightGetter = 0;
202 internal static int HeightForWidthGetter = 0;
203 internal static int InheritPositionGetter = 0;
204 internal static int ClippingModeGetter = 0;
205 internal static int InheritLayoutDirectionGetter = 0;
206 internal static int LayoutDirectionGetter = 0;
207 internal static int UpdateAreaHintGetter = 0;
208 internal static int AccessibilityNameGetter = 0;
209 internal static int AccessibilityDescriptionGetter = 0;
210 internal static int AccessibilityTranslationDomainGetter = 0;
211 internal static int AccessibilityRoleGetter = 0;
212 internal static int AccessibilityHighlightableGetter = 0;
213 internal static int AccessibilityHiddenGetter = 0;
214 internal static int AutomationIdGetter = 0;
215
216
217 #endif
218
219         static View()
220         {
221             RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
222             RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
223             RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
224             RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
225
226             RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
227             RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
228             RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
229             RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
230
231             RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
232             RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
233             RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
234             RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
235
236             RegisterAccessibilityDelegate();
237         }
238
239         /// <summary>
240         /// Creates a new instance of a view.
241         /// </summary>
242         /// <since_tizen> 3 </since_tizen>
243         public View() : this(Interop.View.New(), true)
244         {
245             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246         }
247
248         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
249         [EditorBrowsable(EditorBrowsableState.Never)]
250         public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
251         {
252         }
253
254         /// <summary>
255         /// Create a new instance of a View with setting the status of shown or hidden.
256         /// </summary>
257         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
258         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
259         [EditorBrowsable(EditorBrowsableState.Never)]
260         public View(bool shown) : this(Interop.View.New(), true)
261         {
262             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263             SetVisible(shown);
264         }
265
266         internal View(View uiControl, bool shown = true) : this(Interop.View.NewView(View.getCPtr(uiControl)), true)
267         {
268             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269             if (!shown)
270             {
271                 SetVisible(false);
272             }
273
274             backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
275         }
276
277         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
278         {
279             InitializeStyle(viewStyle);
280         }
281
282         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn)
283         {
284             if (HasBody())
285             {
286                 PositionUsesPivotPoint = false;
287             }
288
289             onWindowSendEventCallback = SendViewAddedEventToWindow;
290             using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(SwigCPtr), false);
291             signal?.Connect(onWindowSendEventCallback);
292
293             hitTestResultDataCallback = OnHitTestResult;
294             using TouchDataSignal touchDataSignal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(SwigCPtr), false);
295             touchDataSignal?.Connect(hitTestResultDataCallback);
296
297             if (!shown)
298             {
299                 SetVisible(false);
300             }
301
302             GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
303             AllowOnlyOwnTouch = defaultAllowOnlyOwnTouch;
304         }
305
306         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
307         {
308             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309
310             if (!shown)
311             {
312                 SetVisible(false);
313             }
314         }
315
316         /// <summary>
317         /// The event that is triggered when the View's ControlState is changed.
318         /// </summary>
319         [EditorBrowsable(EditorBrowsableState.Never)]
320         public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
321
322         internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
323
324
325         /// <summary>
326         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
327         /// </summary>
328         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
329         [EditorBrowsable(EditorBrowsableState.Never)]
330         public bool LayoutSet
331         {
332             get
333             {
334 #if NUI_PROPERTY_CHANGE_DEBUG
335 LayoutSetGetter++;
336 #endif
337                 return layoutSet;
338             }
339         }
340
341         /// <summary>
342         /// Flag to allow Layouting to be disabled for Views.
343         /// Once a View has a Layout set then any children added to Views from then on will receive
344         /// automatic Layouts.
345         /// </summary>
346         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
347         [EditorBrowsable(EditorBrowsableState.Never)]
348         public static bool LayoutingDisabled { get; set; } = true;
349
350         /// <summary>
351         /// If set to true, the <see cref="GrabTouchAfterLeave"/> property value is set to true when all Views are created.
352         /// </summary>
353         /// <param name="enable">Sets value of GrabTouchAfterLeave property</param>
354         [EditorBrowsable(EditorBrowsableState.Never)]
355         public static void SetDefaultGrabTouchAfterLeave(bool enable)
356         {
357             defaultGrabTouchAfterLeave = enable;
358         }
359
360         /// <summary>
361         /// If set to true, the <see cref="AllowOnlyOwnTouch"/> property value is set to true when all Views are created.
362         /// </summary>
363         /// <param name="enable">Sets value of AllowOnlyOwnTouch property</param>
364         [EditorBrowsable(EditorBrowsableState.Never)]
365         public static void SetDefaultAllowOnlyOwnTouch(bool enable)
366         {
367             defaultAllowOnlyOwnTouch = enable;
368         }
369
370         /// <summary>
371         /// Deprecate. Do not use this.
372         /// The style instance applied to this view.
373         /// Note that do not modify the ViewStyle.
374         /// Modifying ViewStyle will affect other views with same ViewStyle.
375         /// </summary>
376         [EditorBrowsable(EditorBrowsableState.Never)]
377         protected ViewStyle ViewStyle
378         {
379             get
380             {
381                 if (themeData == null) themeData = new ThemeData();
382
383                 if (themeData.viewStyle == null)
384                 {
385                     ApplyStyle(CreateViewStyle());
386                 }
387                 return themeData.viewStyle;
388             }
389         }
390
391         /// <summary>
392         /// Get/Set the control state.
393         /// Note that the ControlState only available for the classes derived from Control.
394         /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
395         /// please set <see cref="EnableControlState"/> to true.
396         /// </summary>
397         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
398         [EditorBrowsable(EditorBrowsableState.Never)]
399         public ControlState ControlState
400         {
401             get
402             {
403                 return themeData == null ? ControlState.Normal : themeData.controlStates;
404             }
405             protected set
406             {
407                 if (ControlState == value)
408                 {
409                     return;
410                 }
411
412                 var prevState = ControlState;
413
414                 if (themeData == null) themeData = new ThemeData();
415                 themeData.controlStates = value;
416
417                 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
418
419                 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
420
421                 if (themeData.ControlStatePropagation)
422                 {
423                     foreach (View child in Children)
424                     {
425                         ControlState allowed = child.PropagatableControlStates;
426                         if (allowed.Contains(ControlState.All))
427                         {
428                             child.ControlState = value;
429                         }
430                         else
431                         {
432                             ControlState newControlState = child.ControlState;
433
434                             if (allowed.Contains(ControlState.Normal))
435                             {
436                                 if (value.Contains(ControlState.Normal))
437                                 {
438                                     newControlState += ControlState.Normal;
439                                 }
440                                 else
441                                 {
442                                     newControlState -= ControlState.Normal;
443                                 }
444                             }
445
446                             if (allowed.Contains(ControlState.Disabled))
447                             {
448                                 if (value.Contains(ControlState.Disabled))
449                                 {
450                                     newControlState += ControlState.Disabled;
451                                 }
452                                 else
453                                 {
454                                     newControlState -= ControlState.Disabled;
455                                 }
456                             }
457
458                             if (allowed.Contains(ControlState.Selected))
459                             {
460                                 if (value.Contains(ControlState.Selected))
461                                 {
462                                     newControlState += ControlState.Selected;
463                                 }
464                                 else
465                                 {
466                                     newControlState -= ControlState.Selected;
467                                 }
468                             }
469
470                             if (allowed.Contains(ControlState.Pressed))
471                             {
472                                 if (value.Contains(ControlState.Pressed))
473                                 {
474                                     newControlState += ControlState.Pressed;
475                                 }
476                                 else
477                                 {
478                                     newControlState -= ControlState.Pressed;
479                                 }
480                             }
481
482                             if (allowed.Contains(ControlState.Focused))
483                             {
484                                 if (value.Contains(ControlState.Focused))
485                                 {
486                                     newControlState += ControlState.Focused;
487                                 }
488                                 else
489                                 {
490                                     newControlState -= ControlState.Focused;
491                                 }
492                             }
493
494                             if (allowed.Contains(ControlState.Other))
495                             {
496                                 if (value.Contains(ControlState.Other))
497                                 {
498                                     newControlState += ControlState.Other;
499                                 }
500                                 else
501                                 {
502                                     newControlState -= ControlState.Other;
503                                 }
504                             }
505
506                             if (child.ControlState != newControlState)
507                             child.ControlState = newControlState;
508                         }
509                     }
510                 }
511
512                 OnControlStateChanged(changeInfo);
513
514                 ControlStateChangedEvent?.Invoke(this, changeInfo);
515             }
516         }
517
518         /// <summary>
519         /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
520         /// </summary>
521         /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
522         [EditorBrowsable(EditorBrowsableState.Never)]
523         public bool ExcludeLayouting
524         {
525             get
526             {
527                 return (bool)GetValue(ExcludeLayoutingProperty);
528             }
529             set
530             {
531                 SetValue(ExcludeLayoutingProperty, value);
532                 NotifyPropertyChanged();
533             }
534         }
535
536         private bool InternalExcludeLayouting
537         {
538             get
539             {
540                 return excludeLayouting;
541             }
542             set
543             {
544                 excludeLayouting = value;
545                 if (Layout != null && Layout.SetPositionByLayout == value)
546                 {
547                     Layout.SetPositionByLayout = !value;
548                     Layout.RequestLayout();
549                 }
550             }
551         }
552
553         /// <summary>
554         /// The StyleName, type string.
555         /// The value indicates DALi style name defined in json theme file.
556         /// </summary>
557         /// <since_tizen> 3 </since_tizen>
558         public string StyleName
559         {
560             get
561             {
562 #if NUI_PROPERTY_CHANGE_DEBUG
563 StyleNameGetter++;
564 #endif
565                 return (string)GetValue(StyleNameProperty);
566             }
567             set
568             {
569 #if NUI_PROPERTY_CHANGE_DEBUG
570 StyleNameSetter++;
571 #endif
572                 SetValue(StyleNameProperty, value);
573                 NotifyPropertyChanged();
574             }
575         }
576
577         /// <summary>
578         /// The KeyInputFocus, type bool.
579         /// </summary>
580         [EditorBrowsable(EditorBrowsableState.Never)]
581         public bool KeyInputFocus
582         {
583             get
584             {
585 #if NUI_PROPERTY_CHANGE_DEBUG
586 KeyInputFocusGetter++;
587 #endif
588                 return (bool)GetValue(KeyInputFocusProperty);
589             }
590             set
591             {
592 #if NUI_PROPERTY_CHANGE_DEBUG
593 KeyInputFocusSetter++;
594 #endif
595                 SetValue(KeyInputFocusProperty, value);
596                 NotifyPropertyChanged();
597             }
598         }
599
600         /// <summary>
601         /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
602         /// </summary>
603         /// <remarks>
604         /// <para>
605         /// The property cascade chaining set is not recommended.
606         /// </para>
607         /// <para>
608         /// Animatable - This property can be animated using <c>Animation</c> class.
609         /// <code>
610         /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
611         /// </code>
612         /// </para>
613         /// </remarks>
614         /// <example>
615         /// This way is recommended for setting the property
616         /// <code>
617         /// var view = new View();
618         /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
619         /// </code>
620         /// This way to set the property is prohibited
621         /// <code>
622         /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
623         /// </code>
624         /// </example>
625         /// <since_tizen> 3 </since_tizen>
626         public Color BackgroundColor
627         {
628             get
629             {
630                 return (Color)GetValue(BackgroundColorProperty);
631             }
632             set
633             {
634                 SetValue(BackgroundColorProperty, value);
635                 NotifyPropertyChanged();
636             }
637         }
638
639         /// <summary>
640         /// The mutually exclusive with "backgroundColor" and "background" type Map.
641         /// </summary>
642         /// <since_tizen> 3 </since_tizen>
643         public string BackgroundImage
644         {
645             get
646             {
647                 return (string)GetValue(BackgroundImageProperty);
648             }
649             set
650             {
651                 SetValue(BackgroundImageProperty, value);
652                 NotifyPropertyChanged();
653             }
654         }
655
656         /// <summary>
657         /// Get or set the border of background image.
658         /// </summary>
659         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
660         [EditorBrowsable(EditorBrowsableState.Never)]
661         public Rectangle BackgroundImageBorder
662         {
663             get
664             {
665                 return (Rectangle)GetValue(BackgroundImageBorderProperty);
666             }
667             set
668             {
669                 SetValue(BackgroundImageBorderProperty, value);
670                 NotifyPropertyChanged();
671             }
672         }
673
674         /// <summary>
675         /// The background of view.
676         /// </summary>
677         /// <since_tizen> 3 </since_tizen>
678         public Tizen.NUI.PropertyMap Background
679         {
680             get
681             {
682                 return (PropertyMap)GetValue(BackgroundProperty);
683             }
684             set
685             {
686                 SetValue(BackgroundProperty, value);
687                 NotifyPropertyChanged();
688             }
689         }
690
691         /// <summary>
692         /// Describes a shadow as an image for a View.
693         /// It is null by default.
694         /// </summary>
695         /// <remarks>
696         /// Getter returns copied instance of current shadow.
697         /// </remarks>
698         /// <remarks>
699         /// The mutually exclusive with "BoxShadow".
700         /// </remarks>
701         /// <remarks>
702         /// <para>
703         /// Animatable - This property can be animated using <c>Animation</c> class.
704         /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
705         /// <code>
706         /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
707         /// </code>
708         /// Animatable sub-property : Offset.
709         /// </para>
710         /// </remarks>
711         [EditorBrowsable(EditorBrowsableState.Never)]
712         public ImageShadow ImageShadow
713         {
714             get
715             {
716                 return (ImageShadow)GetValue(ImageShadowProperty);
717             }
718             set
719             {
720                 SetValue(ImageShadowProperty, value);
721                 NotifyPropertyChanged();
722             }
723         }
724
725         /// <summary>
726         /// Describes a box shaped shadow drawing for a View.
727         /// It is null by default.
728         /// </summary>
729         /// <remarks>
730         /// The mutually exclusive with "ImageShadow".
731         /// </remarks>
732         /// <remarks>
733         /// <para>
734         /// Animatable - This property can be animated using <c>Animation</c> class.
735         /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
736         /// <code>
737         /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
738         /// </code>
739         /// Animatable sub-property : Offset, Color, BlurRadius.
740         /// </para>
741         /// </remarks>
742         /// <since_tizen> 9 </since_tizen>
743         public Shadow BoxShadow
744         {
745             get
746             {
747                 return (Shadow)GetValue(BoxShadowProperty);
748             }
749             set
750             {
751                 SetValue(BoxShadowProperty, value);
752                 NotifyPropertyChanged();
753             }
754         }
755
756         /// <summary>
757         /// The radius for the rounded corners of the View.
758         /// This will rounds background and shadow edges.
759         /// 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).
760         /// Each radius will clamp internally to the half of smaller of the view's width or height.
761         /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
762         /// </summary>
763         /// <remarks>
764         /// <para>
765         /// Animatable - This property can be animated using <c>Animation</c> class.
766         /// <code>
767         /// animation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
768         /// </code>
769         /// </para>
770         /// </remarks>
771         /// <since_tizen> 9 </since_tizen>
772         public Vector4 CornerRadius
773         {
774             get
775             {
776                 return (Vector4)GetValue(CornerRadiusProperty);
777             }
778             set
779             {
780                 SetValue(CornerRadiusProperty, value);
781                 NotifyPropertyChanged();
782             }
783         }
784
785         /// <summary>
786         /// Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units).
787         /// It is absolute by default.
788         /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
789         /// </summary>
790         /// <since_tizen> 9 </since_tizen>
791         public VisualTransformPolicyType CornerRadiusPolicy
792         {
793             get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
794             set => SetValue(CornerRadiusPolicyProperty, value);
795         }
796
797         /// <summary>
798         /// The width for the borderline of the View.
799         /// </summary>
800         /// <remarks>
801         /// <para>
802         /// Animatable - This property can be animated using <c>Animation</c> class.
803         /// <code>
804         /// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
805         /// </code>
806         /// </para>
807         /// Note that, an image background may not have borderline if it uses the Border property.
808         /// </remarks>
809         /// <since_tizen> 9 </since_tizen>
810         public float BorderlineWidth
811         {
812             get
813             {
814                 return (float)GetValue(BorderlineWidthProperty);
815             }
816             set
817             {
818                 SetValue(BorderlineWidthProperty, value);
819                 NotifyPropertyChanged();
820             }
821         }
822
823         /// <summary>
824         /// The color for the borderline of the View.
825         /// It is Color.Black by default.
826         /// </summary>
827         /// <remarks>
828         /// <para>
829         /// Animatable - This property can be animated using <c>Animation</c> class.
830         /// <code>
831         /// animation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
832         /// </code>
833         /// </para>
834         /// </remarks>
835         /// <since_tizen> 9 </since_tizen>
836         public Color BorderlineColor
837         {
838             get
839             {
840                 return (Color)GetValue(BorderlineColorProperty);
841             }
842             set
843             {
844                 SetValue(BorderlineColorProperty, value);
845                 NotifyPropertyChanged();
846             }
847         }
848
849         /// <summary>
850         /// The color selector for the borderline of the View.
851         /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
852         /// So this API is internally used only.
853         /// </summary>
854         internal Selector<Color> BorderlineColorSelector
855         {
856             get
857             {
858                 return (Selector<Color>)GetValue(BorderlineColorSelectorProperty);
859             }
860             set
861             {
862                 SetValue(BorderlineColorSelectorProperty, value);
863                 NotifyPropertyChanged();
864             }
865         }
866
867         /// <summary>
868         /// The Relative offset for the borderline of the View.
869         /// Recommended range : [-1.0f to 1.0f].
870         /// If -1.0f, draw borderline inside of the View.
871         /// If 1.0f, draw borderline outside of the View.
872         /// If 0.0f, draw borderline half inside and half outside.
873         /// It is 0.0f by default.
874         /// </summary>
875         /// <remarks>
876         /// <para>
877         /// Animatable - This property can be animated using <c>Animation</c> class.
878         /// <code>
879         /// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
880         /// </code>
881         /// </para>
882         /// </remarks>
883         /// <since_tizen> 9 </since_tizen>
884         public float BorderlineOffset
885         {
886             get
887             {
888                 return (float)GetValue(BorderlineOffsetProperty);
889             }
890             set
891             {
892                 SetValue(BorderlineOffsetProperty, value);
893                 NotifyPropertyChanged();
894             }
895         }
896
897         /// <summary>
898         /// The current state of the view.
899         /// </summary>
900         /// <since_tizen> 3 </since_tizen>
901         public States State
902         {
903             get
904             {
905 #if NUI_PROPERTY_CHANGE_DEBUG
906 StateGetter++;
907 #endif
908                 return (States)GetValue(StateProperty);
909             }
910             set
911             {
912 #if NUI_PROPERTY_CHANGE_DEBUG
913 StateSetter++;
914 #endif
915                 SetValue(StateProperty, value);
916                 NotifyPropertyChanged();
917             }
918         }
919
920         /// <summary>
921         /// The current sub state of the view.
922         /// </summary>
923         /// <since_tizen> 3 </since_tizen>
924         public States SubState
925         {
926             get
927             {
928 #if NUI_PROPERTY_CHANGE_DEBUG
929 SubStateGetter++;
930 #endif
931                 return (States)GetValue(SubStateProperty);
932             }
933             set
934             {
935 #if NUI_PROPERTY_CHANGE_DEBUG
936 SubStateSetter++;
937 #endif
938                 SetValue(SubStateProperty, value);
939                 NotifyPropertyChanged();
940             }
941         }
942
943         /// <summary>
944         /// Displays a tooltip
945         /// </summary>
946         /// <since_tizen> 3 </since_tizen>
947         public Tizen.NUI.PropertyMap Tooltip
948         {
949             get
950             {
951                 return (PropertyMap)GetValue(TooltipProperty);
952             }
953             set
954             {
955                 SetValue(TooltipProperty, value);
956                 NotifyPropertyChanged();
957             }
958         }
959
960         /// <summary>
961         /// Displays a tooltip as a text.
962         /// </summary>
963         /// <since_tizen> 3 </since_tizen>
964         public string TooltipText
965         {
966             get
967             {
968                 return GetValue(TooltipTextProperty) as string;
969             }
970             set
971             {
972                 SetValue(TooltipTextProperty, value);
973             }
974         }
975
976         private string InternalTooltipText
977         {
978             get
979             {
980                 using (var propertyValue = GetProperty(Property.TOOLTIP))
981                 {
982                     if (propertyValue != null && propertyValue.Get(out string retrivedValue))
983                     {
984                         return retrivedValue;
985                     }
986                     NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
987                     return "error to get TooltipText";
988                 }
989             }
990             set
991             {
992                 var temp = new Tizen.NUI.PropertyValue(value);
993                 SetProperty(View.Property.TOOLTIP, temp);
994                 temp.Dispose();
995                 NotifyPropertyChanged();
996             }
997         }
998
999         /// <summary>
1000         /// The Child property of FlexContainer.<br />
1001         /// The proportion of the free space in the container, the flex item will receive.<br />
1002         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1003         /// </summary>
1004         /// <since_tizen> 3 </since_tizen>
1005         [Obsolete("Deprecated in API8, will be removed in API10.")]
1006         public float Flex
1007         {
1008             get
1009             {
1010 #if NUI_PROPERTY_CHANGE_DEBUG
1011 FlexGetter++;
1012 #endif
1013                 return (float)GetValue(FlexProperty);
1014             }
1015             set
1016             {
1017 #if NUI_PROPERTY_CHANGE_DEBUG
1018 FlexSetter++;
1019 #endif
1020                 SetValue(FlexProperty, value);
1021                 NotifyPropertyChanged();
1022             }
1023         }
1024
1025         /// <summary>
1026         /// The Child property of FlexContainer.<br />
1027         /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
1028         /// </summary>
1029         /// <since_tizen> 3 </since_tizen>
1030         [Obsolete("Deprecated in API8, will be removed in API10.")]
1031         public int AlignSelf
1032         {
1033             get
1034             {
1035 #if NUI_PROPERTY_CHANGE_DEBUG
1036 AlignSelfGetter++;
1037 #endif
1038                 return (int)GetValue(AlignSelfProperty);
1039             }
1040             set
1041             {
1042 #if NUI_PROPERTY_CHANGE_DEBUG
1043 AlignSelfSetter++;
1044 #endif
1045                 SetValue(AlignSelfProperty, value);
1046                 NotifyPropertyChanged();
1047             }
1048         }
1049
1050         /// <summary>
1051         /// The Child property of FlexContainer.<br />
1052         /// The space around the flex item.<br />
1053         /// </summary>
1054         /// <remarks>
1055         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
1056         /// </remarks>
1057         /// <since_tizen> 3 </since_tizen>
1058         [Obsolete("Deprecated in API8, will be removed in API10.")]
1059         public Vector4 FlexMargin
1060         {
1061             get
1062             {
1063 #if NUI_PROPERTY_CHANGE_DEBUG
1064 FlexMarginGetter++;
1065 #endif
1066                 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
1067                 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
1068             }
1069             set
1070             {
1071 #if NUI_PROPERTY_CHANGE_DEBUG
1072 FlexMarginSetter++;
1073 #endif
1074                 SetValue(FlexMarginProperty, value);
1075                 NotifyPropertyChanged();
1076             }
1077         }
1078
1079         /// <summary>
1080         /// The top-left cell this child occupies, if not set, the first available cell is used.
1081         /// </summary>
1082         /// <remarks>
1083         /// The property cascade chaining set is not recommended.
1084         /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
1085         /// </remarks>
1086         /// <example>
1087         /// This way is recommended for setting the property
1088         /// <code>
1089         /// var view = new View();
1090         /// view.CellIndex = new Vector2(1, 3);
1091         /// </code>
1092         /// This way to set the property is prohibited
1093         /// <code>
1094         /// view.CellIndex.X = 1; //This does not guarantee a proper operation
1095         /// </code>
1096         /// </example>
1097         /// <since_tizen> 3 </since_tizen>
1098         public Vector2 CellIndex
1099         {
1100             get
1101             {
1102 #if NUI_PROPERTY_CHANGE_DEBUG
1103 CellIndexGetter++;
1104 #endif
1105                 return (Vector2)GetValue(CellIndexProperty);
1106             }
1107             set
1108             {
1109 #if NUI_PROPERTY_CHANGE_DEBUG
1110 CellIndexSetter++;
1111 #endif
1112                 SetValue(CellIndexProperty, value);
1113                 NotifyPropertyChanged();
1114             }
1115         }
1116
1117         /// <summary>
1118         /// The number of rows this child occupies, if not set, the default value is 1.
1119         /// </summary>
1120         /// <remarks>
1121         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1122         /// </remarks>
1123         /// <since_tizen> 3 </since_tizen>
1124         public float RowSpan
1125         {
1126             get
1127             {
1128 #if NUI_PROPERTY_CHANGE_DEBUG
1129 RowSpanGetter++;
1130 #endif
1131                 return (float)GetValue(RowSpanProperty);
1132             }
1133             set
1134             {
1135 #if NUI_PROPERTY_CHANGE_DEBUG
1136 RowSpanSetter++;
1137 #endif
1138                 SetValue(RowSpanProperty, value);
1139                 NotifyPropertyChanged();
1140             }
1141         }
1142
1143         /// <summary>
1144         /// The number of columns this child occupies, if not set, the default value is 1.
1145         /// </summary>
1146         /// <remarks>
1147         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1148         /// </remarks>
1149         /// <since_tizen> 3 </since_tizen>
1150         public float ColumnSpan
1151         {
1152             get
1153             {
1154 #if NUI_PROPERTY_CHANGE_DEBUG
1155 ColumnSpanGetter++;
1156 #endif
1157                 return (float)GetValue(ColumnSpanProperty);
1158             }
1159             set
1160             {
1161 #if NUI_PROPERTY_CHANGE_DEBUG
1162 ColumnSpanSetter++;
1163 #endif
1164                 SetValue(ColumnSpanProperty, value);
1165                 NotifyPropertyChanged();
1166             }
1167         }
1168
1169         /// <summary>
1170         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1171         /// </summary>
1172         /// <remarks>
1173         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1174         /// </remarks>
1175         /// <since_tizen> 3 </since_tizen>
1176         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1177         {
1178             get
1179             {
1180 #if NUI_PROPERTY_CHANGE_DEBUG
1181 CellHorizontalAlignmentGetter++;
1182 #endif
1183                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
1184             }
1185             set
1186             {
1187 #if NUI_PROPERTY_CHANGE_DEBUG
1188 CellHorizontalAlignmentSetter++;
1189 #endif
1190                 SetValue(CellHorizontalAlignmentProperty, value);
1191                 NotifyPropertyChanged();
1192             }
1193         }
1194
1195         /// <summary>
1196         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1197         /// </summary>
1198         /// <remarks>
1199         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1200         /// </remarks>
1201         /// <since_tizen> 3 </since_tizen>
1202         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1203         {
1204             get
1205             {
1206 #if NUI_PROPERTY_CHANGE_DEBUG
1207 CellVerticalAlignmentGetter++;
1208 #endif
1209                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
1210             }
1211             set
1212             {
1213 #if NUI_PROPERTY_CHANGE_DEBUG
1214 CellVerticalAlignmentSetter++;
1215 #endif
1216                 SetValue(CellVerticalAlignmentProperty, value);
1217                 NotifyPropertyChanged();
1218             }
1219         }
1220
1221         /// <summary>
1222         /// The left focusable view.<br />
1223         /// This will return null if not set.<br />
1224         /// This will also return null if the specified left focusable view is not on a window.<br />
1225         /// </summary>
1226         /// <since_tizen> 3 </since_tizen>
1227         public View LeftFocusableView
1228         {
1229             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1230             get
1231             {
1232                 return (View)GetValue(LeftFocusableViewProperty);
1233             }
1234             set
1235             {
1236                 SetValue(LeftFocusableViewProperty, value);
1237                 NotifyPropertyChanged();
1238             }
1239         }
1240
1241         /// <summary>
1242         /// The right focusable view.<br />
1243         /// This will return null if not set.<br />
1244         /// This will also return null if the specified right focusable view is not on a window.<br />
1245         /// </summary>
1246         /// <since_tizen> 3 </since_tizen>
1247         public View RightFocusableView
1248         {
1249             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1250             get
1251             {
1252                 return (View)GetValue(RightFocusableViewProperty);
1253             }
1254             set
1255             {
1256                 SetValue(RightFocusableViewProperty, value);
1257                 NotifyPropertyChanged();
1258             }
1259         }
1260
1261         /// <summary>
1262         /// The up focusable view.<br />
1263         /// This will return null if not set.<br />
1264         /// This will also return null if the specified up focusable view is not on a window.<br />
1265         /// </summary>
1266         /// <since_tizen> 3 </since_tizen>
1267         public View UpFocusableView
1268         {
1269             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1270             get
1271             {
1272                 return (View)GetValue(UpFocusableViewProperty);
1273             }
1274             set
1275             {
1276                 SetValue(UpFocusableViewProperty, value);
1277                 NotifyPropertyChanged();
1278             }
1279         }
1280
1281         /// <summary>
1282         /// The down focusable view.<br />
1283         /// This will return null if not set.<br />
1284         /// This will also return null if the specified down focusable view is not on a window.<br />
1285         /// </summary>
1286         /// <since_tizen> 3 </since_tizen>
1287         public View DownFocusableView
1288         {
1289             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1290             get
1291             {
1292                 return (View)GetValue(DownFocusableViewProperty);
1293             }
1294             set
1295             {
1296                 SetValue(DownFocusableViewProperty, value);
1297                 NotifyPropertyChanged();
1298             }
1299         }
1300
1301         /// <summary>
1302         /// The clockwise focusable view by rotary wheel.<br />
1303         /// This will return null if not set.<br />
1304         /// This will also return null if the specified clockwise focusable view is not on a window.<br />
1305         /// </summary>
1306         [EditorBrowsable(EditorBrowsableState.Never)]
1307         public View ClockwiseFocusableView
1308         {
1309             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1310             get
1311             {
1312                 return (View)GetValue(ClockwiseFocusableViewProperty);
1313             }
1314             set
1315             {
1316                 SetValue(ClockwiseFocusableViewProperty, value);
1317                 NotifyPropertyChanged();
1318             }
1319         }
1320
1321         /// <summary>
1322         /// The counter clockwise focusable view by rotary wheel.<br />
1323         /// This will return null if not set.<br />
1324         /// This will also return null if the specified counter clockwise focusable view is not on a window.<br />
1325         /// </summary>
1326         [EditorBrowsable(EditorBrowsableState.Never)]
1327         public View CounterClockwiseFocusableView
1328         {
1329             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1330             get
1331             {
1332                 return (View)GetValue(CounterClockwiseFocusableViewProperty);
1333             }
1334             set
1335             {
1336                 SetValue(CounterClockwiseFocusableViewProperty, value);
1337                 NotifyPropertyChanged();
1338             }
1339         }
1340
1341         /// <summary>
1342         /// Whether the view should be focusable by keyboard navigation.
1343         /// </summary>
1344         /// <since_tizen> 3 </since_tizen>
1345         public bool Focusable
1346         {
1347             set
1348             {
1349                 SetValue(FocusableProperty, value);
1350                 NotifyPropertyChanged();
1351             }
1352             get
1353             {
1354                 return (bool)GetValue(FocusableProperty);
1355             }
1356         }
1357
1358         /// <summary>
1359         /// 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.
1360         /// Note : Default value is true.
1361         /// </summary>
1362         [EditorBrowsable(EditorBrowsableState.Never)]
1363         public bool FocusableChildren
1364         {
1365             set
1366             {
1367                 SetValue(FocusableChildrenProperty, value);
1368                 NotifyPropertyChanged();
1369             }
1370             get
1371             {
1372                 return (bool)GetValue(FocusableChildrenProperty);
1373             }
1374         }
1375
1376         /// <summary>
1377         /// Whether this view can focus by touch.
1378         /// If Focusable is false, FocusableInTouch is disabled.
1379         /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
1380         /// </summary>
1381         [EditorBrowsable(EditorBrowsableState.Never)]
1382         public bool FocusableInTouch
1383         {
1384             set
1385             {
1386                 SetValue(FocusableInTouchProperty, value);
1387                 NotifyPropertyChanged();
1388             }
1389             get
1390             {
1391                 return (bool)GetValue(FocusableInTouchProperty);
1392             }
1393         }
1394
1395         /// <summary>
1396         /// Retrieves the position of the view.
1397         /// The coordinates are relative to the view's parent.
1398         /// </summary>
1399         /// <remarks>
1400         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1401         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
1402         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1403         /// and users can get the current actual values through them.
1404         /// </remarks>
1405         /// <since_tizen> 3 </since_tizen>
1406         public Position CurrentPosition
1407         {
1408             get
1409             {
1410                 return GetCurrentPosition();
1411             }
1412         }
1413
1414         /// <summary>
1415         /// Sets the size of a view for the width and the height.<br />
1416         /// Geometry can be scaled to fit within this area.<br />
1417         /// This does not interfere with the view's scale factor.<br />
1418         /// The views default depth is the minimum of width and height.<br />
1419         /// </summary>
1420         /// <remarks>
1421         /// The property cascade chaining set is not recommended.
1422         /// </remarks>
1423         /// <example>
1424         /// This way is recommended for setting the property
1425         /// <code>
1426         /// var view = new View();
1427         /// view.Size2D = new Size2D(100, 200);
1428         /// </code>
1429         /// This way to set the property is prohibited
1430         /// <code>
1431         /// view.Size2D.Width = 100; //This does not guarantee a proper operation
1432         /// </code>
1433         /// </example>
1434         /// <since_tizen> 3 </since_tizen>
1435         public Size2D Size2D
1436         {
1437             get
1438             {
1439 #if NUI_PROPERTY_CHANGE_DEBUG
1440 Size2DGetter++;
1441 #endif
1442
1443                 var temp = (Size2D)GetValue(Size2DProperty);
1444
1445                 if (this.Layout == null)
1446                 {
1447                     if (temp.Width < 0) { temp.Width = 0; }
1448                     if (temp.Height < 0) { temp.Height = 0; }
1449                 }
1450
1451                 return temp;
1452             }
1453             set
1454             {
1455 #if NUI_PROPERTY_CHANGE_DEBUG
1456 Size2DSetter++;
1457 #endif
1458
1459                 SetValue(Size2DProperty, value);
1460
1461                 NotifyPropertyChanged();
1462             }
1463         }
1464
1465         /// <summary>
1466         /// Retrieves the size of the view.
1467         /// The coordinates are relative to the view's parent.
1468         /// </summary>
1469         /// <remarks>
1470         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1471         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
1472         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1473         /// and users can get the current actual values through them.
1474         /// </remarks>
1475         /// <since_tizen> 3 </since_tizen>
1476         public Size2D CurrentSize
1477         {
1478             get
1479             {
1480                 return GetCurrentSize();
1481             }
1482         }
1483
1484         /// <summary>
1485         /// Retrieves and sets the view's opacity.<br />
1486         /// </summary>
1487         /// <remarks>
1488         /// <para>
1489         /// Animatable - This property can be animated using <c>Animation</c> class.
1490         /// <code>
1491         /// animation.AnimateTo(view, "Opacity", 0.5f);
1492         /// </code>
1493         /// </para>
1494         /// </remarks>
1495         /// <since_tizen> 3 </since_tizen>
1496         public float Opacity
1497         {
1498             get
1499             {
1500 #if NUI_PROPERTY_CHANGE_DEBUG
1501 OpacityGetter++;
1502 #endif
1503                 return (float)GetValue(OpacityProperty);
1504             }
1505             set
1506             {
1507 #if NUI_PROPERTY_CHANGE_DEBUG
1508 OpacitySetter++;
1509 #endif
1510                 SetValue(OpacityProperty, value);
1511                 NotifyPropertyChanged();
1512             }
1513         }
1514
1515         /// <summary>
1516         /// Sets the position of the view for X and Y.<br />
1517         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1518         /// If the position inheritance is disabled, sets the world position.<br />
1519         /// </summary>
1520         /// <remarks>
1521         /// The property cascade chaining set is not recommended.
1522         ///</remarks>
1523         /// <example>
1524         /// This way is recommended for setting the property
1525         /// <code>
1526         /// var view = new View();
1527         /// view.Position2D = new Position2D(100, 200);
1528         /// </code>
1529         /// This way to set the property is prohibited
1530         /// <code>
1531         /// view.Position2D.X = 100; //This does not guarantee a proper operation
1532         /// </code>
1533         /// </example>
1534         /// <since_tizen> 3 </since_tizen>
1535         public Position2D Position2D
1536         {
1537             get
1538             {
1539 #if NUI_PROPERTY_CHANGE_DEBUG
1540 Position2DGetter++;
1541 #endif
1542
1543                 return (Position2D)GetValue(Position2DProperty);
1544             }
1545             set
1546             {
1547 #if NUI_PROPERTY_CHANGE_DEBUG
1548 Position2DSetter++;
1549 #endif
1550
1551                 SetValue(Position2DProperty, value);
1552                 NotifyPropertyChanged();
1553             }
1554         }
1555
1556         /// <summary>
1557         /// Retrieves the screen position of the view.<br />
1558         /// </summary>
1559         /// <since_tizen> 3 </since_tizen>
1560         public Vector2 ScreenPosition
1561         {
1562             get
1563             {
1564                 Vector2 temp = new Vector2(0.0f, 0.0f);
1565                 var pValue = GetProperty(View.Property.ScreenPosition);
1566                 pValue.Get(temp);
1567                 pValue.Dispose();
1568                 return temp;
1569             }
1570         }
1571
1572         /// <summary>
1573         /// Determines whether the pivot point should be used to determine the position of the view.
1574         /// This is false by default.
1575         /// </summary>
1576         /// <remarks>If false, then the top-left of the view is used for the position.
1577         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1578         /// </remarks>
1579         /// <since_tizen> 3 </since_tizen>
1580         public bool PositionUsesPivotPoint
1581         {
1582             get
1583             {
1584 #if NUI_PROPERTY_CHANGE_DEBUG
1585 PositionUsesPivotPointGetter++;
1586 #endif
1587                 return (bool)GetValue(PositionUsesPivotPointProperty);
1588             }
1589             set
1590             {
1591 #if NUI_PROPERTY_CHANGE_DEBUG
1592 PositionUsesPivotPointSetter++;
1593 #endif
1594                 SetValue(PositionUsesPivotPointProperty, value);
1595                 NotifyPropertyChanged();
1596             }
1597         }
1598
1599         /// <summary>
1600         /// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
1601         /// </summary>
1602         /// <since_tizen> 3 </since_tizen>
1603         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
1604             "Like: " +
1605             "View view = new View(); " +
1606             "view.PivotPoint = PivotPoint.Center; " +
1607             "view.PositionUsesPivotPoint = true;" +
1608             " This has been deprecated in API5 and will be removed in API8")]
1609         [EditorBrowsable(EditorBrowsableState.Never)]
1610         public bool PositionUsesAnchorPoint
1611         {
1612             get
1613             {
1614                 return (bool)GetValue(PositionUsesAnchorPointProperty);
1615             }
1616             set
1617             {
1618                 SetValue(PositionUsesAnchorPointProperty, value);
1619             }
1620         }
1621
1622         private bool InternalPositionUsesAnchorPoint
1623         {
1624             get
1625             {
1626                 bool temp = false;
1627                 var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
1628                 pValue.Get(out temp);
1629                 pValue.Dispose();
1630                 return temp;
1631             }
1632             set
1633             {
1634                 var temp = new Tizen.NUI.PropertyValue(value);
1635                 SetProperty(View.Property.PositionUsesAnchorPoint, temp);
1636                 temp.Dispose();
1637                 NotifyPropertyChanged();
1638             }
1639         }
1640
1641         /// <summary>
1642         /// Queries whether the view is connected to the stage.<br />
1643         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1644         /// </summary>
1645         /// <since_tizen> 3 </since_tizen>
1646         public bool IsOnWindow
1647         {
1648             get
1649             {
1650                 return OnWindow();
1651             }
1652         }
1653
1654         /// <summary>
1655         /// Gets the depth in the hierarchy for the view.
1656         /// </summary>
1657         /// <since_tizen> 3 </since_tizen>
1658         public int HierarchyDepth
1659         {
1660             get
1661             {
1662                 return GetHierarchyDepth();
1663             }
1664         }
1665
1666         /// <summary>
1667         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1668         /// </summary>
1669         /// <remarks>
1670         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1671         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1672         /// The values set by this property will likely change.
1673         /// </remarks>
1674         /// <since_tizen> 3 </since_tizen>
1675         public int SiblingOrder
1676         {
1677             get
1678             {
1679                 return (int)GetValue(SiblingOrderProperty);
1680             }
1681             set
1682             {
1683                 SetValue(SiblingOrderProperty, value);
1684
1685                 Layout?.ChangeLayoutSiblingOrder(value);
1686
1687                 NotifyPropertyChanged();
1688             }
1689         }
1690
1691         /// <summary>
1692         /// Returns the natural size of the view.
1693         /// </summary>
1694         /// <remarks>
1695         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1696         /// </remarks>
1697         /// <since_tizen> 5 </since_tizen>
1698         public Vector3 NaturalSize
1699         {
1700             get
1701             {
1702                 Vector3 ret = GetNaturalSize();
1703                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1704                 return ret;
1705             }
1706         }
1707
1708         /// <summary>
1709         /// Returns the natural size (Size2D) of the view.
1710         /// </summary>
1711         /// <remarks>
1712         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1713         /// </remarks>
1714         /// <since_tizen> 4 </since_tizen>
1715         public Size2D NaturalSize2D
1716         {
1717             get
1718             {
1719                 Vector3 temp = GetNaturalSize();
1720                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1721
1722                 Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
1723                 temp.Dispose();
1724                 return sz;
1725             }
1726         }
1727
1728         /// <summary>
1729         /// Gets or sets the origin of a view within its parent's area.<br />
1730         /// 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 />
1731         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1732         /// A view's position is the distance between this origin and the view's anchor-point.<br />
1733         /// </summary>
1734         /// <pre>The view has been initialized.</pre>
1735         /// <since_tizen> 3 </since_tizen>
1736         public Position ParentOrigin
1737         {
1738             get
1739             {
1740 #if NUI_PROPERTY_CHANGE_DEBUG
1741 ParentOriginGetter++;
1742 #endif
1743                 Position tmp = (Position)GetValue(ParentOriginProperty);
1744                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1745             }
1746             set
1747             {
1748 #if NUI_PROPERTY_CHANGE_DEBUG
1749 ParentOriginSetter++;
1750 #endif
1751                 SetValue(ParentOriginProperty, value);
1752                 NotifyPropertyChanged();
1753             }
1754         }
1755
1756         /// <summary>
1757         /// Gets or sets the anchor-point of a view.<br />
1758         /// 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 />
1759         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1760         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1761         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1762         /// <pre>The view has been initialized.</pre>
1763         /// </summary>
1764         /// <remarks>
1765         /// The property cascade chaining set is not recommended.
1766         ///</remarks>
1767         /// <example>
1768         /// This way is recommended for setting the property
1769         /// <code>
1770         /// var view = new View();
1771         /// view.PivotPoint = PivotPoint.Center;
1772         /// </code>
1773         /// This way to set the property is prohibited
1774         /// <code>
1775         /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1776         /// </code>
1777         /// </example>
1778         /// <since_tizen> 3 </since_tizen>
1779         public Position PivotPoint
1780         {
1781             get
1782             {
1783 #if NUI_PROPERTY_CHANGE_DEBUG
1784 PivotPointGetter++;
1785 #endif
1786                 return (Position)GetValue(PivotPointProperty);
1787             }
1788             set
1789             {
1790 #if NUI_PROPERTY_CHANGE_DEBUG
1791 PivotPointSetter++;
1792 #endif
1793                 SetValue(PivotPointProperty, value);
1794                 NotifyPropertyChanged();
1795             }
1796         }
1797
1798         /// <summary>
1799         /// Gets or sets the size width of the view.
1800         /// </summary>
1801         /// <remarks>
1802         /// <para>
1803         /// Animatable - This property can be animated using <c>Animation</c> class.
1804         /// <code>
1805         /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1806         /// </code>
1807         /// </para>
1808         /// </remarks>
1809         /// <since_tizen> 3 </since_tizen>
1810         public float SizeWidth
1811         {
1812             get
1813             {
1814 #if NUI_PROPERTY_CHANGE_DEBUG
1815 SizeWidthGetter++;
1816 #endif
1817
1818                 return (float)GetValue(SizeWidthProperty);
1819             }
1820             set
1821             {
1822 #if NUI_PROPERTY_CHANGE_DEBUG
1823 SizeWidthSetter++;
1824 #endif
1825
1826                 SetValue(SizeWidthProperty, value);
1827                 NotifyPropertyChanged();
1828             }
1829         }
1830
1831         /// <summary>
1832         /// Gets or sets the size height of the view.
1833         /// </summary>
1834         /// <remarks>
1835         /// <para>
1836         /// Animatable - This property can be animated using <c>Animation</c> class.
1837         /// </para>
1838         /// <code>
1839         /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1840         /// </code>
1841         /// </remarks>
1842         /// <since_tizen> 3 </since_tizen>
1843         public float SizeHeight
1844         {
1845             get
1846             {
1847 #if NUI_PROPERTY_CHANGE_DEBUG
1848 SizeHeightGetter++;
1849 #endif
1850
1851                 return (float)GetValue(SizeHeightProperty);
1852             }
1853             set
1854             {
1855 #if NUI_PROPERTY_CHANGE_DEBUG
1856 SizeHeightSetter++;
1857 #endif
1858
1859                 SetValue(SizeHeightProperty, value);
1860                 NotifyPropertyChanged();
1861             }
1862         }
1863
1864         /// <summary>
1865         /// Gets or sets the position of the view.<br />
1866         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1867         /// If the position inheritance is disabled, sets the world position.<br />
1868         /// </summary>
1869         /// <remarks>
1870         /// <para>
1871         /// Animatable - This property can be animated using <c>Animation</c> class.
1872         /// <code>
1873         /// animation.AnimateTo(view, "Position", new Position(50, 0));
1874         /// </code>
1875         /// </para>
1876         /// The property cascade chaining set is not recommended.
1877         /// </remarks>
1878         /// <example>
1879         /// This way is recommended for setting the property
1880         /// <code>
1881         /// var view = new View();
1882         /// view.Position = new Position(100, 200.5f, 0);
1883         /// </code>
1884         /// This way to set the property is prohibited
1885         /// <code>
1886         /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1887         /// </code>
1888         /// </example>
1889         /// <since_tizen> 3 </since_tizen>
1890         public Position Position
1891         {
1892             get
1893             {
1894 #if NUI_PROPERTY_CHANGE_DEBUG
1895 PositionGetter++;
1896 #endif
1897
1898                 return (Position)GetValue(PositionProperty);
1899             }
1900             set
1901             {
1902 #if NUI_PROPERTY_CHANGE_DEBUG
1903 PositionSetter++;
1904 #endif
1905
1906                 SetValue(PositionProperty, value);
1907                 NotifyPropertyChanged();
1908             }
1909         }
1910
1911         /// <summary>
1912         /// Gets or sets the position X of the view.
1913         /// </summary>
1914         /// <remarks>
1915         /// <para>
1916         /// Animatable - This property can be animated using <c>Animation</c> class.
1917         /// <code>
1918         /// animation.AnimateTo(view, "PositionX", 50.0f);
1919         /// </code>
1920         /// </para>
1921         /// </remarks>
1922         /// <since_tizen> 3 </since_tizen>
1923         public float PositionX
1924         {
1925             get
1926             {
1927 #if NUI_PROPERTY_CHANGE_DEBUG
1928 PositionXGetter++;
1929 #endif
1930                 return (float)GetValue(PositionXProperty);
1931             }
1932             set
1933             {
1934 #if NUI_PROPERTY_CHANGE_DEBUG
1935 PositionXSetter++;
1936 #endif
1937                 SetValue(PositionXProperty, value);
1938                 NotifyPropertyChanged();
1939             }
1940         }
1941
1942         /// <summary>
1943         /// Gets or sets the position Y of the view.
1944         /// </summary>
1945         /// <remarks>
1946         /// <para>
1947         /// Animatable - This property can be animated using <c>Animation</c> class.
1948         /// <code>
1949         /// animation.AnimateTo(view, "PositionY", 50.0f);
1950         /// </code>
1951         /// </para>
1952         /// </remarks>
1953         /// <since_tizen> 3 </since_tizen>
1954         public float PositionY
1955         {
1956             get
1957             {
1958 #if NUI_PROPERTY_CHANGE_DEBUG
1959 PositionYGetter++;
1960 #endif
1961                 return (float)GetValue(PositionYProperty);
1962             }
1963             set
1964             {
1965 #if NUI_PROPERTY_CHANGE_DEBUG
1966 PositionYSetter++;
1967 #endif
1968                 SetValue(PositionYProperty, value);
1969                 NotifyPropertyChanged();
1970             }
1971         }
1972
1973         /// <summary>
1974         /// Gets or sets the position Z of the view.
1975         /// </summary>
1976         /// <remarks>
1977         /// <para>
1978         /// Animatable - This property can be animated using <c>Animation</c> class.
1979         /// <code>
1980         /// animation.AnimateTo(view, "PositionZ", 50.0f);
1981         /// </code>
1982         /// </para>
1983         /// </remarks>
1984         /// <since_tizen> 3 </since_tizen>
1985         public float PositionZ
1986         {
1987             get
1988             {
1989 #if NUI_PROPERTY_CHANGE_DEBUG
1990 PositionZGetter++;
1991 #endif
1992
1993                 return (float)GetValue(PositionZProperty);
1994             }
1995             set
1996             {
1997 #if NUI_PROPERTY_CHANGE_DEBUG
1998 PositionZSetter++;
1999 #endif
2000
2001                 SetValue(PositionZProperty, value);
2002                 NotifyPropertyChanged();
2003             }
2004         }
2005
2006         /// <summary>
2007         /// Gets or sets the world position of the view.
2008         /// </summary>
2009         /// <since_tizen> 3 </since_tizen>
2010         public Vector3 WorldPosition
2011         {
2012             get
2013             {
2014                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2015                 var pValue = GetProperty(View.Property.WorldPosition);
2016                 pValue.Get(temp);
2017                 pValue.Dispose();
2018                 return temp;
2019             }
2020         }
2021
2022         /// <summary>
2023         /// Gets or sets the orientation of the view.<br />
2024         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2025         /// </summary>
2026         /// <remarks>
2027         /// <para>
2028         /// This is an asynchronous method.
2029         /// </para>
2030         /// <para>
2031         /// Animatable - This property can be animated using <c>Animation</c> class.
2032         /// <code>
2033         /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
2034         /// </code>
2035         /// </para>
2036         /// </remarks>
2037         /// <since_tizen> 3 </since_tizen>
2038         public Rotation Orientation
2039         {
2040             get
2041             {
2042 #if NUI_PROPERTY_CHANGE_DEBUG
2043 OrientationGetter++;
2044 #endif
2045                 return (Rotation)GetValue(OrientationProperty);
2046             }
2047             set
2048             {
2049 #if NUI_PROPERTY_CHANGE_DEBUG
2050 OrientationSetter++;
2051 #endif
2052                 SetValue(OrientationProperty, value);
2053                 NotifyPropertyChanged();
2054             }
2055         }
2056
2057         /// <summary>
2058         /// Gets or sets the world orientation of the view.<br />
2059         /// </summary>
2060         /// <since_tizen> 3 </since_tizen>
2061         public Rotation WorldOrientation
2062         {
2063             get
2064             {
2065                 Rotation temp = new Rotation();
2066                 var pValue = GetProperty(View.Property.WorldOrientation);
2067                 pValue.Get(temp);
2068                 pValue.Dispose();
2069                 return temp;
2070             }
2071         }
2072
2073         /// <summary>
2074         /// Gets or sets the scale factor applied to the view.<br />
2075         /// </summary>
2076         /// <remarks>
2077         /// <para>
2078         /// Animatable - This property can be animated using <c>Animation</c> class.
2079         /// <code>
2080         /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
2081         /// </code>
2082         /// </para>
2083         /// The property cascade chaining set is not recommended.
2084         /// </remarks>
2085         /// <example>
2086         /// This way is recommended for setting the property
2087         /// <code>
2088         /// var view = new View();
2089         /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
2090         /// </code>
2091         /// This way to set the property is prohibited
2092         /// <code>
2093         /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
2094         /// </code>
2095         /// </example>
2096         /// <since_tizen> 3 </since_tizen>
2097         public Vector3 Scale
2098         {
2099             get
2100             {
2101 #if NUI_PROPERTY_CHANGE_DEBUG
2102 ScaleGetter++;
2103 #endif
2104                 return (Vector3)GetValue(ScaleProperty);
2105             }
2106             set
2107             {
2108 #if NUI_PROPERTY_CHANGE_DEBUG
2109 ScaleSetter++;
2110 #endif
2111                 SetValue(ScaleProperty, value);
2112                 NotifyPropertyChanged();
2113             }
2114         }
2115
2116         /// <summary>
2117         /// Gets or sets the scale X factor applied to the view.
2118         /// </summary>
2119         /// <remarks>
2120         /// <para>
2121         /// Animatable - This property can be animated using <c>Animation</c> class.
2122         /// <code>
2123         /// animation.AnimateTo(view, "ScaleX", 1.5f);
2124         /// </code>
2125         /// </para>
2126         /// </remarks>
2127         /// <since_tizen> 3 </since_tizen>
2128         public float ScaleX
2129         {
2130             get
2131             {
2132 #if NUI_PROPERTY_CHANGE_DEBUG
2133 ScaleXGetter++;
2134 #endif
2135                 return (float)GetValue(ScaleXProperty);
2136             }
2137             set
2138             {
2139 #if NUI_PROPERTY_CHANGE_DEBUG
2140 ScaleXSetter++;
2141 #endif
2142                 SetValue(ScaleXProperty, value);
2143                 NotifyPropertyChanged();
2144             }
2145         }
2146
2147         /// <summary>
2148         /// Gets or sets the scale Y factor applied to the view.
2149         /// </summary>
2150         /// <remarks>
2151         /// <para>
2152         /// Animatable - This property can be animated using <c>Animation</c> class.
2153         /// <code>
2154         /// animation.AnimateTo(view, "ScaleY", 1.5f);
2155         /// </code>
2156         /// </para>
2157         /// </remarks>
2158         /// <since_tizen> 3 </since_tizen>
2159         public float ScaleY
2160         {
2161             get
2162             {
2163 #if NUI_PROPERTY_CHANGE_DEBUG
2164 ScaleYGetter++;
2165 #endif
2166                 return (float)GetValue(ScaleYProperty);
2167             }
2168             set
2169             {
2170 #if NUI_PROPERTY_CHANGE_DEBUG
2171 ScaleYSetter++;
2172 #endif
2173                 SetValue(ScaleYProperty, value);
2174                 NotifyPropertyChanged();
2175             }
2176         }
2177
2178         /// <summary>
2179         /// Gets or sets the scale Z factor applied to the view.
2180         /// </summary>
2181         /// <remarks>
2182         /// <para>
2183         /// Animatable - This property can be animated using <c>Animation</c> class.
2184         /// <code>
2185         /// animation.AnimateTo(view, "ScaleZ", 1.5f);
2186         /// </code>
2187         /// </para>
2188         /// </remarks>
2189         /// <since_tizen> 3 </since_tizen>
2190         public float ScaleZ
2191         {
2192             get
2193             {
2194 #if NUI_PROPERTY_CHANGE_DEBUG
2195 ScaleZGetter++;
2196 #endif
2197                 return (float)GetValue(ScaleZProperty);
2198             }
2199             set
2200             {
2201 #if NUI_PROPERTY_CHANGE_DEBUG
2202 ScaleZSetter++;
2203 #endif
2204                 SetValue(ScaleZProperty, value);
2205                 NotifyPropertyChanged();
2206             }
2207         }
2208
2209         /// <summary>
2210         /// Gets the world scale of the view.
2211         /// </summary>
2212         /// <since_tizen> 3 </since_tizen>
2213         public Vector3 WorldScale
2214         {
2215             get
2216             {
2217                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2218                 var pValue = GetProperty(View.Property.WorldScale);
2219                 pValue.Get(temp);
2220                 pValue.Dispose();
2221                 return temp;
2222             }
2223         }
2224
2225         /// <summary>
2226         /// Retrieves the visibility flag of the view.
2227         /// </summary>
2228         /// <remarks>
2229         /// <para>
2230         /// If the view is not visible, then the view and its children will not be rendered.
2231         /// 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.
2232         /// </para>
2233         /// <para>
2234         /// Animatable - This property can be animated using <c>Animation</c> class.
2235         /// <code>
2236         /// animation.AnimateTo(view, "Visibility", false);
2237         /// </code>
2238         /// </para>
2239         /// </remarks>
2240         /// <since_tizen> 3 </since_tizen>
2241         public bool Visibility
2242         {
2243             get
2244             {
2245                 bool temp = false;
2246                 var pValue = GetProperty(View.Property.VISIBLE);
2247                 pValue.Get(out temp);
2248                 pValue.Dispose();
2249                 return temp;
2250             }
2251         }
2252
2253         /// <summary>
2254         /// Gets the view's world color.
2255         /// </summary>
2256         /// <since_tizen> 3 </since_tizen>
2257         public Vector4 WorldColor
2258         {
2259             get
2260             {
2261                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2262                 var pValue = GetProperty(View.Property.WorldColor);
2263                 pValue.Get(temp);
2264                 pValue.Dispose();
2265                 return temp;
2266             }
2267         }
2268
2269         /// <summary>
2270         /// Gets or sets the view's name.
2271         /// </summary>
2272         /// <since_tizen> 3 </since_tizen>
2273         public string Name
2274         {
2275             get
2276             {
2277 #if NUI_PROPERTY_CHANGE_DEBUG
2278 NameGetter++;
2279 #endif
2280                 return (string)GetValue(NameProperty);
2281             }
2282             set
2283             {
2284 #if NUI_PROPERTY_CHANGE_DEBUG
2285 NameSetter++;
2286 #endif
2287                 SetValue(NameProperty, value);
2288                 NotifyPropertyChanged();
2289             }
2290         }
2291
2292         /// <summary>
2293         /// Get the number of children held by the view.
2294         /// </summary>
2295         /// <since_tizen> 3 </since_tizen>
2296         public new uint ChildCount
2297         {
2298             get
2299             {
2300                 return Convert.ToUInt32(Children.Count);
2301             }
2302         }
2303
2304         /// <summary>
2305         /// Gets the view's ID.
2306         /// Read-only
2307         /// </summary>
2308         /// <since_tizen> 3 </since_tizen>
2309         public uint ID
2310         {
2311             get
2312             {
2313                 return GetId();
2314             }
2315         }
2316
2317         /// <summary>
2318         /// Gets or sets the status of whether the view should emit touch or hover signals.
2319         /// If a View is made insensitive, then the View and its children are not hittable.
2320         /// </summary>
2321         /// <since_tizen> 3 </since_tizen>
2322         public bool Sensitive
2323         {
2324             get
2325             {
2326 #if NUI_PROPERTY_CHANGE_DEBUG
2327 SensitiveGetter++;
2328 #endif
2329                 return (bool)GetValue(SensitiveProperty);
2330             }
2331             set
2332             {
2333 #if NUI_PROPERTY_CHANGE_DEBUG
2334 SensitiveSetter++;
2335 #endif
2336                 SetValue(SensitiveProperty, value);
2337                 NotifyPropertyChanged();
2338             }
2339         }
2340
2341         /// <summary>
2342         /// Gets or sets the status of whether the view should be enabled user interactions.
2343         /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
2344         /// </summary>
2345         /// <since_tizen> tizen_next </since_tizen>
2346         [EditorBrowsable(EditorBrowsableState.Never)]
2347         public bool IsEnabled
2348         {
2349             get
2350             {
2351 #if NUI_PROPERTY_CHANGE_DEBUG
2352 IsEnabledGetter++;
2353 #endif
2354                 return (bool)GetValue(IsEnabledProperty);
2355             }
2356             set
2357             {
2358 #if NUI_PROPERTY_CHANGE_DEBUG
2359 IsEnabledSetter++;
2360 #endif
2361                 SetValue(IsEnabledProperty, value);
2362                 NotifyPropertyChanged();
2363             }
2364         }
2365
2366         /// <summary>
2367         /// 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.
2368         /// </summary>
2369         /// <since_tizen> 3 </since_tizen>
2370         public bool LeaveRequired
2371         {
2372             get
2373             {
2374 #if NUI_PROPERTY_CHANGE_DEBUG
2375 LeaveRequiredGetter++;
2376 #endif
2377                 return (bool)GetValue(LeaveRequiredProperty);
2378             }
2379             set
2380             {
2381 #if NUI_PROPERTY_CHANGE_DEBUG
2382 LeaveRequiredSetter++;
2383 #endif
2384                 SetValue(LeaveRequiredProperty, value);
2385                 NotifyPropertyChanged();
2386             }
2387         }
2388
2389         /// <summary>
2390         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2391         /// </summary>
2392         /// <since_tizen> 3 </since_tizen>
2393         public bool InheritOrientation
2394         {
2395             get
2396             {
2397                 return (bool)GetValue(InheritOrientationProperty);
2398             }
2399             set
2400             {
2401                 SetValue(InheritOrientationProperty, value);
2402                 NotifyPropertyChanged();
2403             }
2404         }
2405
2406         /// <summary>
2407         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2408         /// </summary>
2409         /// <since_tizen> 3 </since_tizen>
2410         public bool InheritScale
2411         {
2412             get
2413             {
2414 #if NUI_PROPERTY_CHANGE_DEBUG
2415 InheritScaleGetter++;
2416 #endif
2417                 return (bool)GetValue(InheritScaleProperty);
2418             }
2419             set
2420             {
2421 #if NUI_PROPERTY_CHANGE_DEBUG
2422 InheritScaleSetter++;
2423 #endif
2424                 SetValue(InheritScaleProperty, value);
2425                 NotifyPropertyChanged();
2426             }
2427         }
2428
2429         /// <summary>
2430         /// Gets or sets the status of how the view and its children should be drawn.<br />
2431         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2432         /// 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 />
2433         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2434         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2435         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2436         /// </summary>
2437         /// <since_tizen> 3 </since_tizen>
2438         public DrawModeType DrawMode
2439         {
2440             get
2441             {
2442 #if NUI_PROPERTY_CHANGE_DEBUG
2443 DrawModeGetter++;
2444 #endif
2445                 return (DrawModeType)GetValue(DrawModeProperty);
2446             }
2447             set
2448             {
2449 #if NUI_PROPERTY_CHANGE_DEBUG
2450 DrawModeSetter++;
2451 #endif
2452                 SetValue(DrawModeProperty, value);
2453                 NotifyPropertyChanged();
2454             }
2455         }
2456
2457         /// <summary>
2458         /// Gets or sets the relative to parent size factor of the view.<br />
2459         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2460         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2461         /// </summary>
2462         /// <remarks>
2463         /// The property cascade chaining set is not recommended.
2464         /// </remarks>
2465         /// <example>
2466         /// This way is recommended for setting the property
2467         /// <code>
2468         /// var text = new TextField();
2469         /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
2470         /// </code>
2471         /// This way to set the property is prohibited
2472         /// <code>
2473         /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
2474         /// </code>
2475         /// </example>
2476         /// <since_tizen> 3 </since_tizen>
2477         public Vector3 SizeModeFactor
2478         {
2479             get
2480             {
2481 #if NUI_PROPERTY_CHANGE_DEBUG
2482 SizeModeFactorGetter++;
2483 #endif
2484                 return (Vector3)GetValue(SizeModeFactorProperty);
2485             }
2486             set
2487             {
2488 #if NUI_PROPERTY_CHANGE_DEBUG
2489 SizeModeFactorSetter++;
2490 #endif
2491                 SetValue(SizeModeFactorProperty, value);
2492                 NotifyPropertyChanged();
2493             }
2494         }
2495
2496         /// <summary>
2497         /// Gets or sets the width resize policy to be used.
2498         /// </summary>
2499         /// <since_tizen> 3 </since_tizen>
2500         public ResizePolicyType WidthResizePolicy
2501         {
2502             get
2503             {
2504 #if NUI_PROPERTY_CHANGE_DEBUG
2505 WidthResizePolicyGetter++;
2506 #endif
2507                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2508             }
2509             set
2510             {
2511 #if NUI_PROPERTY_CHANGE_DEBUG
2512 WidthResizePolicySetter++;
2513 #endif
2514                 SetValue(WidthResizePolicyProperty, value);
2515                 NotifyPropertyChanged();
2516             }
2517         }
2518
2519         /// <summary>
2520         /// Gets or sets the height resize policy to be used.
2521         /// </summary>
2522         /// <since_tizen> 3 </since_tizen>
2523         public ResizePolicyType HeightResizePolicy
2524         {
2525             get
2526             {
2527 #if NUI_PROPERTY_CHANGE_DEBUG
2528 HeightResizePolicyGetter++;
2529 #endif
2530                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2531             }
2532             set
2533             {
2534 #if NUI_PROPERTY_CHANGE_DEBUG
2535 HeightResizePolicySetter++;
2536 #endif
2537                 SetValue(HeightResizePolicyProperty, value);
2538                 NotifyPropertyChanged();
2539             }
2540         }
2541
2542         /// <summary>
2543         /// Gets or sets the policy to use when setting size with size negotiation.<br />
2544         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2545         /// </summary>
2546         /// <since_tizen> 3 </since_tizen>
2547         public SizeScalePolicyType SizeScalePolicy
2548         {
2549             get
2550             {
2551 #if NUI_PROPERTY_CHANGE_DEBUG
2552 SizeScalePolicyGetter++;
2553 #endif
2554                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2555             }
2556             set
2557             {
2558 #if NUI_PROPERTY_CHANGE_DEBUG
2559 SizeScalePolicySetter++;
2560 #endif
2561                 SetValue(SizeScalePolicyProperty, value);
2562                 NotifyPropertyChanged();
2563             }
2564         }
2565
2566         /// <summary>
2567         ///  Gets or sets the status of whether the width size is dependent on the height size.
2568         /// </summary>
2569         /// <since_tizen> 3 </since_tizen>
2570         public bool WidthForHeight
2571         {
2572             get
2573             {
2574 #if NUI_PROPERTY_CHANGE_DEBUG
2575 WidthForHeightGetter++;
2576 #endif
2577                 return (bool)GetValue(WidthForHeightProperty);
2578             }
2579             set
2580             {
2581 #if NUI_PROPERTY_CHANGE_DEBUG
2582 WidthForHeightSetter++;
2583 #endif
2584                 SetValue(WidthForHeightProperty, value);
2585                 NotifyPropertyChanged();
2586             }
2587         }
2588
2589         /// <summary>
2590         /// Gets or sets the status of whether the height size is dependent on the width size.
2591         /// </summary>
2592         /// <since_tizen> 3 </since_tizen>
2593         public bool HeightForWidth
2594         {
2595             get
2596             {
2597 #if NUI_PROPERTY_CHANGE_DEBUG
2598 HeightForWidthGetter++;
2599 #endif
2600                 return (bool)GetValue(HeightForWidthProperty);
2601             }
2602             set
2603             {
2604 #if NUI_PROPERTY_CHANGE_DEBUG
2605 HeightForWidthSetter++;
2606 #endif
2607                 SetValue(HeightForWidthProperty, value);
2608                 NotifyPropertyChanged();
2609             }
2610         }
2611
2612         /// <summary>
2613         /// Gets or sets the padding for use in layout.
2614         /// </summary>
2615         /// <remarks>
2616         /// The property cascade chaining set is not recommended.
2617         /// </remarks>
2618         /// <example>
2619         /// This way is recommended for setting the property
2620         /// <code>
2621         /// var view = new View();
2622         /// view.Padding = new Extents(5, 5, 5, 5);
2623         /// </code>
2624         /// This way to set the property is prohibited
2625         /// <code>
2626         /// view.Padding.Start = 5; //This does not guarantee a proper operation
2627         /// </code>
2628         /// </example>
2629         /// <since_tizen> 5 </since_tizen>
2630         public Extents Padding
2631         {
2632             get
2633             {
2634                 return (Extents)GetValue(PaddingProperty);
2635             }
2636             set
2637             {
2638                 SetValue(PaddingProperty, value);
2639                 NotifyPropertyChanged();
2640             }
2641         }
2642
2643         /// <summary>
2644         /// Gets or sets the minimum size the view can be assigned in size negotiation.
2645         /// </summary>
2646         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2647         /// <remarks>
2648         /// The property cascade chaining set is not recommended.
2649         /// </remarks>
2650         /// <example>
2651         /// This way is recommended for setting the property
2652         /// <code>
2653         /// var view = new View();
2654         /// view.MinimumSize = new Size2D(100, 200);
2655         /// </code>
2656         /// This way to set the property is prohibited
2657         /// <code>
2658         /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2659         /// </code>
2660         /// </example>
2661         /// <since_tizen> 3 </since_tizen>
2662         public Size2D MinimumSize
2663         {
2664             get
2665             {
2666 #if NUI_PROPERTY_CHANGE_DEBUG
2667 MinimumSizeGetter++;
2668 #endif
2669                 return (Size2D)GetValue(MinimumSizeProperty);
2670             }
2671             set
2672             {
2673 #if NUI_PROPERTY_CHANGE_DEBUG
2674 MinimumSizeSetter++;
2675 #endif
2676                 if (value == null)
2677                 {
2678                     throw new ArgumentNullException(nameof(value));
2679                 }
2680                 if (layout != null)
2681                 {
2682                     // Note: it only works if minimum size is >= than natural size.
2683                     // To force the size it should be done through the width&height spec or Size2D.
2684                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2685                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2686                     layout.RequestLayout();
2687                 }
2688                 SetValue(MinimumSizeProperty, value);
2689                 NotifyPropertyChanged();
2690             }
2691         }
2692
2693         /// <summary>
2694         /// Gets or sets the maximum size the view can be assigned in size negotiation.
2695         /// </summary>
2696         /// <example>
2697         /// This way is recommended for setting the property
2698         /// <code>
2699         /// var view = new View();
2700         /// view.MaximumSize = new Size2D(100, 200);
2701         /// </code>
2702         /// This way to set the property is prohibited
2703         /// <code>
2704         /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2705         /// </code>
2706         /// </example>
2707         /// <since_tizen> 3 </since_tizen>
2708         public Size2D MaximumSize
2709         {
2710             get
2711             {
2712 #if NUI_PROPERTY_CHANGE_DEBUG
2713 MaximumSizeGetter++;
2714 #endif
2715                 return (Size2D)GetValue(MaximumSizeProperty);
2716             }
2717             set
2718             {
2719 #if NUI_PROPERTY_CHANGE_DEBUG
2720 MaximumSizeSetter++;
2721 #endif
2722                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2723                 // MATCH_PARENT spec + parent container size can be used to limit
2724                 if (layout != null)
2725                 {
2726                     layout.RequestLayout();
2727                 }
2728                 SetValue(MaximumSizeProperty, value);
2729                 NotifyPropertyChanged();
2730             }
2731         }
2732
2733         /// <summary>
2734         /// Gets or sets whether a child view inherits it's parent's position.<br />
2735         /// Default is to inherit.<br />
2736         /// 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 />
2737         /// </summary>
2738         /// <since_tizen> 3 </since_tizen>
2739         public bool InheritPosition
2740         {
2741             get
2742             {
2743 #if NUI_PROPERTY_CHANGE_DEBUG
2744 InheritPositionGetter++;
2745 #endif
2746                 return (bool)GetValue(InheritPositionProperty);
2747             }
2748             set
2749             {
2750 #if NUI_PROPERTY_CHANGE_DEBUG
2751 InheritPositionSetter++;
2752 #endif
2753                 SetValue(InheritPositionProperty, value);
2754                 NotifyPropertyChanged();
2755             }
2756         }
2757
2758         /// <summary>
2759         /// Gets or sets the clipping behavior (mode) of it's children.
2760         /// </summary>
2761         /// <since_tizen> 3 </since_tizen>
2762         public ClippingModeType ClippingMode
2763         {
2764             get
2765             {
2766 #if NUI_PROPERTY_CHANGE_DEBUG
2767 ClippingModeGetter++;
2768 #endif
2769                 return (ClippingModeType)GetValue(ClippingModeProperty);
2770             }
2771             set
2772             {
2773 #if NUI_PROPERTY_CHANGE_DEBUG
2774 ClippingModeSetter++;
2775 #endif
2776                 SetValue(ClippingModeProperty, value);
2777                 NotifyPropertyChanged();
2778             }
2779         }
2780
2781         /// <summary>
2782         /// Gets the number of renderers held by the view.
2783         /// </summary>
2784         /// <since_tizen> 3 </since_tizen>
2785         public uint RendererCount
2786         {
2787             get
2788             {
2789                 return GetRendererCount();
2790             }
2791         }
2792
2793         /// <summary>
2794         /// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
2795         /// </summary>
2796         /// <remarks>
2797         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2798         /// </remarks>
2799         /// <since_tizen> 3 </since_tizen>
2800         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
2801             "Like: " +
2802             "View view = new View(); " +
2803             "view.PivotPoint = PivotPoint.Center; " +
2804             "view.PositionUsesPivotPoint = true;")]
2805         [EditorBrowsable(EditorBrowsableState.Never)]
2806         public Position AnchorPoint
2807         {
2808             get
2809             {
2810                 return GetValue(AnchorPointProperty) as Position;
2811             }
2812             set
2813             {
2814                 SetValue(AnchorPointProperty, value);
2815             }
2816         }
2817
2818         private Position InternalAnchorPoint
2819         {
2820             get
2821             {
2822                 Position temp = new Position(0.0f, 0.0f, 0.0f);
2823                 var pValue = GetProperty(View.Property.AnchorPoint);
2824                 pValue.Get(temp);
2825                 pValue.Dispose();
2826                 Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
2827                 temp.Dispose();
2828                 return ret;
2829             }
2830             set
2831             {
2832                 var temp = new Tizen.NUI.PropertyValue(value);
2833                 SetProperty(View.Property.AnchorPoint, temp);
2834                 temp.Dispose();
2835                 NotifyPropertyChanged();
2836             }
2837         }
2838
2839         /// <summary>
2840         /// Sets the size of a view for the width, the height and the depth.<br />
2841         /// Geometry can be scaled to fit within this area.<br />
2842         /// This does not interfere with the view's scale factor.<br />
2843         /// The views default depth is the minimum of width and height.<br />
2844         /// </summary>
2845         /// <remarks>
2846         /// <para>
2847         /// Animatable - This property can be animated using <c>Animation</c> class.
2848         /// <code>
2849         /// animation.AnimateTo(view, "Size", new Size(100, 100));
2850         /// </code>
2851         /// </para>
2852         /// The property cascade chaining set is not recommended.
2853         /// </remarks>
2854         /// <example>
2855         /// This way is recommended for setting the property
2856         /// <code>
2857         /// var view = new View();
2858         /// view.Size = new Size(100.5f, 200, 0);
2859         /// </code>
2860         /// This way to set the property is prohibited
2861         /// <code>
2862         /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2863         /// </code>
2864         /// </example>
2865         /// <since_tizen> 5 </since_tizen>
2866         public Size Size
2867         {
2868             get
2869             {
2870 #if NUI_PROPERTY_CHANGE_DEBUG
2871 SizeGetter++;
2872 #endif
2873                 return (Size)GetValue(SizeProperty);
2874             }
2875             set
2876             {
2877 #if NUI_PROPERTY_CHANGE_DEBUG
2878 SizeSetter++;
2879 #endif
2880                 SetValue(SizeProperty, value);
2881                 NotifyPropertyChanged();
2882             }
2883         }
2884
2885         /// <summary>
2886         /// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
2887         /// </summary>
2888         /// <since_tizen> 3 </since_tizen>
2889         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
2890             "Like: " +
2891             "Container parent =  view.GetParent(); " +
2892             "View view = parent as View;")]
2893         [EditorBrowsable(EditorBrowsableState.Never)]
2894         public new View Parent
2895         {
2896             get
2897             {
2898                 View ret;
2899                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2900                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2901                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2902
2903                 if (basehandle is Layer layer)
2904                 {
2905                     ret = new View(Layer.getCPtr(layer).Handle, false);
2906                     NUILog.Error("This Parent property is deprecated, should do not be used");
2907                 }
2908                 else
2909                 {
2910                     ret = basehandle as View;
2911                 }
2912
2913                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2914                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2915
2916                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2917                 return ret;
2918             }
2919         }
2920
2921         /// <summary>
2922         /// Gets/Sets whether inherit parent's the layout Direction.
2923         /// </summary>
2924         /// <since_tizen> 4 </since_tizen>
2925         public bool InheritLayoutDirection
2926         {
2927             get
2928             {
2929 #if NUI_PROPERTY_CHANGE_DEBUG
2930 InheritLayoutDirectionGetter++;
2931 #endif
2932                 return (bool)GetValue(InheritLayoutDirectionProperty);
2933             }
2934             set
2935             {
2936 #if NUI_PROPERTY_CHANGE_DEBUG
2937 InheritLayoutDirectionSetter++;
2938 #endif
2939                 SetValue(InheritLayoutDirectionProperty, value);
2940                 NotifyPropertyChanged();
2941             }
2942         }
2943
2944         /// <summary>
2945         /// Gets/Sets the layout Direction.
2946         /// </summary>
2947         /// <since_tizen> 4 </since_tizen>
2948         public ViewLayoutDirectionType LayoutDirection
2949         {
2950             get
2951             {
2952 #if NUI_PROPERTY_CHANGE_DEBUG
2953 LayoutDirectionGetter++;
2954 #endif
2955                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2956             }
2957             set
2958             {
2959 #if NUI_PROPERTY_CHANGE_DEBUG
2960 LayoutDirectionSetter++;
2961 #endif
2962                 SetValue(LayoutDirectionProperty, value);
2963                 NotifyPropertyChanged();
2964                 layout?.RequestLayout();
2965             }
2966         }
2967
2968         /// <summary>
2969         /// Gets or sets the Margin for use in layout.
2970         /// </summary>
2971         /// <remarks>
2972         /// Margin property is supported by Layout algorithms and containers.
2973         /// Please Set Layout if you want to use Margin property.
2974         /// The property cascade chaining set is not recommended.
2975         /// </remarks>
2976         /// <example>
2977         /// This way is recommended for setting the property
2978         /// <code>
2979         /// var view = new View();
2980         /// view.Margin = new Extents(10, 5, 15, 20);
2981         /// </code>
2982         /// This way to set the property is prohibited
2983         /// <code>
2984         /// view.Margin.Top = 15; //This does not guarantee a proper operation
2985         /// </code>
2986         /// </example>
2987         /// <since_tizen> 4 </since_tizen>
2988         public Extents Margin
2989         {
2990             get
2991             {
2992                 return (Extents)GetValue(MarginProperty);
2993             }
2994             set
2995             {
2996                 SetValue(MarginProperty, value);
2997                 NotifyPropertyChanged();
2998             }
2999         }
3000
3001         ///<summary>
3002         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
3003         ///</summary>
3004         /// <example>
3005         /// <code>
3006         /// // matchParentView matches its size to its parent size.
3007         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
3008         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
3009         ///
3010         /// // wrapContentView wraps its children with their desired size.
3011         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
3012         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
3013         ///
3014         /// // exactSizeView shows itself with an exact size.
3015         /// exactSizeView.WidthSpecification = 100;
3016         /// exactSizeView.HeightSpecification = 100;
3017         /// </code>
3018         /// </example>
3019         /// <since_tizen> 6 </since_tizen>
3020         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
3021         public int WidthSpecification
3022         {
3023             get
3024             {
3025                 return (int)GetValue(WidthSpecificationProperty);
3026             }
3027             set
3028             {
3029                 SetValue(WidthSpecificationProperty, value);
3030                 NotifyPropertyChanged();
3031             }
3032         }
3033
3034         private int InternalWidthSpecification
3035         {
3036             get
3037             {
3038                 return widthPolicy;
3039             }
3040             set
3041             {
3042                 if (value == widthPolicy)
3043                     return;
3044
3045                 widthPolicy = value;
3046                 if (widthPolicy >= 0)
3047                 {
3048                     if (heightPolicy >= 0) // Policy an exact value
3049                     {
3050                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
3051                         Size2D = new Size2D(widthPolicy, heightPolicy);
3052                     }
3053                 }
3054                 layout?.RequestLayout();
3055             }
3056         }
3057
3058         ///<summary>
3059         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
3060         ///</summary>
3061         /// <example>
3062         /// <code>
3063         /// // matchParentView matches its size to its parent size.
3064         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
3065         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
3066         ///
3067         /// // wrapContentView wraps its children with their desired size.
3068         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
3069         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
3070         ///
3071         /// // exactSizeView shows itself with an exact size.
3072         /// exactSizeView.WidthSpecification = 100;
3073         /// exactSizeView.HeightSpecification = 100;
3074         /// </code>
3075         /// </example>
3076         /// <since_tizen> 6 </since_tizen>
3077         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
3078         public int HeightSpecification
3079         {
3080             get
3081             {
3082                 return (int)GetValue(HeightSpecificationProperty);
3083             }
3084             set
3085             {
3086                 SetValue(HeightSpecificationProperty, value);
3087                 NotifyPropertyChanged();
3088             }
3089         }
3090
3091         private int InternalHeightSpecification
3092         {
3093             get
3094             {
3095                 return heightPolicy;
3096             }
3097             set
3098             {
3099                 if (value == heightPolicy)
3100                     return;
3101
3102                 heightPolicy = value;
3103                 if (heightPolicy >= 0)
3104                 {
3105                     if (widthPolicy >= 0) // Policy an exact value
3106                     {
3107                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
3108                         Size2D = new Size2D(widthPolicy, heightPolicy);
3109                     }
3110                 }
3111                 layout?.RequestLayout();
3112             }
3113         }
3114
3115         ///<summary>
3116         /// Gets the List of transitions for this View.
3117         ///</summary>
3118         /// <since_tizen> 6 </since_tizen>
3119         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
3120         {
3121             get
3122             {
3123                 if (layoutTransitions == null)
3124                 {
3125                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
3126                 }
3127                 return layoutTransitions;
3128             }
3129         }
3130
3131         ///<summary>
3132         /// Sets a layout transitions for this View.
3133         ///</summary>
3134         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
3135         /// <remarks>
3136         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
3137         /// </remarks>
3138         /// <since_tizen> 6 </since_tizen>
3139         public LayoutTransition LayoutTransition
3140         {
3141             get
3142             {
3143                 return GetValue(LayoutTransitionProperty) as LayoutTransition;
3144             }
3145             set
3146             {
3147                 SetValue(LayoutTransitionProperty, value);
3148                 NotifyPropertyChanged();
3149             }
3150         }
3151
3152         private LayoutTransition InternalLayoutTransition
3153         {
3154             get
3155             {
3156                 return layoutTransition;
3157             }
3158             set
3159             {
3160                 if (value == null)
3161                 {
3162                     throw new global::System.ArgumentNullException(nameof(value));
3163                 }
3164                 if (layoutTransitions == null)
3165                 {
3166                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
3167                 }
3168
3169                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
3170
3171                 AttachTransitionsToChildren(value);
3172
3173                 layoutTransition = value;
3174             }
3175         }
3176
3177         /// <summary>
3178         /// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
3179         /// </summary>
3180         /// <remarks>
3181         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
3182         /// </remarks>
3183         /// <since_tizen> 4 </since_tizen>
3184         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
3185         [EditorBrowsable(EditorBrowsableState.Never)]
3186         public Extents PaddingEX
3187         {
3188             get
3189             {
3190                 return GetValue(PaddingEXProperty) as Extents;
3191             }
3192             set
3193             {
3194                 SetValue(PaddingEXProperty, value);
3195             }
3196         }
3197
3198         private Extents InternalPaddingEX
3199         {
3200             get
3201             {
3202                 Extents temp = new Extents(0, 0, 0, 0);
3203                 var pValue = GetProperty(View.Property.PADDING);
3204                 pValue.Get(temp);
3205                 pValue.Dispose();
3206                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
3207                 temp.Dispose();
3208                 return ret;
3209             }
3210             set
3211             {
3212                 var temp = new Tizen.NUI.PropertyValue(value);
3213                 SetProperty(View.Property.PADDING, temp);
3214                 temp.Dispose();
3215                 NotifyPropertyChanged();
3216                 layout?.RequestLayout();
3217             }
3218         }
3219
3220         /// <summary>
3221         /// The Color of View. This is an RGBA value.
3222         /// Each RGBA components match as <see cref="ColorRed"/>, <see cref="ColorGreen"/>, <see cref="ColorBlue"/>, and <see cref="Opacity"/>.
3223         /// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
3224         /// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
3225         /// Inherient of color value depend on <see cref="ColorMode"/>.
3226         /// </summary>
3227         /// <remarks>
3228         /// <para>
3229         /// Animatable - This property can be animated using <c>Animation</c> class.
3230         /// </para>
3231         /// The property cascade chaining set is not recommended.
3232         /// </remarks>
3233         /// <example>
3234         /// This way is recommended for setting the property
3235         /// <code>
3236         /// var view = new View();
3237         /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
3238         /// </code>
3239         /// This way to set the property is prohibited
3240         /// <code>
3241         /// view.Color.A = 0.5f; //This does not guarantee a proper operation
3242         /// </code>
3243         /// </example>
3244         [EditorBrowsable(EditorBrowsableState.Never)]
3245         public Color Color
3246         {
3247             get
3248             {
3249 #if NUI_PROPERTY_CHANGE_DEBUG
3250 ColorGetter++;
3251 #endif
3252                 return (Color)GetValue(ColorProperty);
3253             }
3254             set
3255             {
3256 #if NUI_PROPERTY_CHANGE_DEBUG
3257 ColorSetter++;
3258 #endif
3259                 SetValue(ColorProperty, value);
3260                 NotifyPropertyChanged();
3261             }
3262         }
3263
3264         /// <summary>
3265         /// The Red component of View.Color.
3266         /// </summary>
3267         /// <remarks>
3268         /// <para>
3269         /// Animatable - This property can be animated using <c>Animation</c> class.
3270         /// </para>
3271         /// </remarks>
3272         [EditorBrowsable(EditorBrowsableState.Never)]
3273         public float ColorRed
3274         {
3275             get
3276             {
3277 #if NUI_PROPERTY_CHANGE_DEBUG
3278 ColorRedGetter++;
3279 #endif
3280                 return (float)GetValue(ColorRedProperty);
3281             }
3282             set
3283             {
3284 #if NUI_PROPERTY_CHANGE_DEBUG
3285 ColorRedSetter++;
3286 #endif
3287                 SetValue(ColorRedProperty, value);
3288                 NotifyPropertyChanged();
3289             }
3290         }
3291
3292         /// <summary>
3293         /// The Green component of View.Color.
3294         /// </summary>
3295         /// <remarks>
3296         /// <para>
3297         /// Animatable - This property can be animated using <c>Animation</c> class.
3298         /// </para>
3299         /// </remarks>
3300         [EditorBrowsable(EditorBrowsableState.Never)]
3301         public float ColorGreen
3302         {
3303             get
3304             {
3305 #if NUI_PROPERTY_CHANGE_DEBUG
3306 ColorGreenGetter++;
3307 #endif
3308                 return (float)GetValue(ColorGreenProperty);
3309             }
3310             set
3311             {
3312 #if NUI_PROPERTY_CHANGE_DEBUG
3313 ColorGreenSetter++;
3314 #endif
3315                 SetValue(ColorGreenProperty, value);
3316                 NotifyPropertyChanged();
3317             }
3318         }
3319
3320         /// <summary>
3321         /// The Blue component of View.Color.
3322         /// </summary>
3323         /// <remarks>
3324         /// <para>
3325         /// Animatable - This property can be animated using <c>Animation</c> class.
3326         /// </para>
3327         /// </remarks>
3328         [EditorBrowsable(EditorBrowsableState.Never)]
3329         public float ColorBlue
3330         {
3331             get
3332             {
3333 #if NUI_PROPERTY_CHANGE_DEBUG
3334 ColorBlueGetter++;
3335 #endif
3336                 return (float)GetValue(ColorBlueProperty);
3337             }
3338             set
3339             {
3340 #if NUI_PROPERTY_CHANGE_DEBUG
3341 ColorBlueSetter++;
3342 #endif
3343                 SetValue(ColorBlueProperty, value);
3344                 NotifyPropertyChanged();
3345             }
3346         }
3347
3348         /// <summary>
3349         /// Set the layout on this View. Replaces any existing Layout.
3350         /// </summary>
3351         /// <remarks>
3352         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
3353         /// </remarks>
3354         /// <since_tizen> 6 </since_tizen>
3355         public LayoutItem Layout
3356         {
3357             get
3358             {
3359                 return GetValue(LayoutProperty) as LayoutItem;
3360             }
3361             set
3362             {
3363                 SetValue(LayoutProperty, value);
3364             }
3365         }
3366
3367         private LayoutItem InternalLayout
3368         {
3369             get
3370             {
3371                 return layout;
3372             }
3373             set
3374             {
3375                 // Do nothing if layout provided is already set on this View.
3376                 if (value == layout)
3377                 {
3378                     return;
3379                 }
3380
3381                 LayoutingDisabled = false;
3382                 layoutSet = true;
3383
3384                 // If new layout being set already has a owner then that owner receives a replacement default layout.
3385                 // First check if the layout to be set already has a owner.
3386                 if (value?.Owner != null)
3387                 {
3388                     // Previous owner of the layout gets a default layout as a replacement.
3389                     value.Owner.Layout = new AbsoluteLayout()
3390                     {
3391                         // Copy Margin and Padding to replacement LayoutGroup.
3392                         Margin = value.Margin,
3393                         Padding = value.Padding,
3394                     };
3395                 }
3396
3397                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3398                 // View if no replacement. Previously margin and padding values would have been moved from
3399                 // the View to the layout.
3400                 if (layout != null) // Existing layout
3401                 {
3402                     if (value != null)
3403                     {
3404                         // Existing layout being replaced so copy over margin and padding values.
3405                         value.Margin = layout.Margin;
3406                         value.Padding = layout.Padding;
3407                         value.SetPositionByLayout = !excludeLayouting;
3408                     }
3409                     else
3410                     {
3411                         // Layout not being replaced so restore margin and padding to View.
3412                         SetValue(MarginProperty, layout.Margin);
3413                         SetValue(PaddingProperty, layout.Padding);
3414                         NotifyPropertyChanged();
3415                     }
3416                 }
3417                 else
3418                 {
3419                     // First Layout to be added to the View hence copy
3420
3421                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3422                     if (value != null)
3423                     {
3424                         Extents margin = Margin;
3425                         Extents padding = Padding;
3426                         bool setMargin = false;
3427                         bool setPadding = false;
3428
3429                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
3430                         {
3431                             // If View already has a margin set then store it in Layout instead.
3432                             value.Margin = margin;
3433                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
3434                             setMargin = true;
3435                         }
3436
3437                         if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
3438                         {
3439                             // If View already has a padding set then store it in Layout instead.
3440                             value.Padding = padding;
3441                             SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
3442                             setPadding = true;
3443                         }
3444
3445                         if (setMargin || setPadding)
3446                         {
3447                             NotifyPropertyChanged();
3448                         }
3449
3450                         value.SetPositionByLayout = !excludeLayouting;
3451                     }
3452                 }
3453
3454                 // Remove existing layout from it's parent layout group.
3455                 layout?.Unparent();
3456
3457                 // Set layout to this view
3458                 SetLayout(value);
3459             }
3460         }
3461
3462         /// <summary>
3463         /// The weight of the View, used to share available space in a layout with siblings.
3464         /// </summary>
3465         /// <since_tizen> 6 </since_tizen>
3466         public float Weight
3467         {
3468             get
3469             {
3470                 return weight;
3471             }
3472             set
3473             {
3474                 weight = value;
3475                 layout?.RequestLayout();
3476             }
3477         }
3478
3479         /// <summary>
3480         ///  Whether to load the BackgroundImage synchronously.
3481         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3482         ///  Note: For Normal Quad images only.
3483         /// </summary>
3484         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3485         [EditorBrowsable(EditorBrowsableState.Never)]
3486         public bool BackgroundImageSynchronosLoading
3487         {
3488             get
3489             {
3490                 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
3491             }
3492             set
3493             {
3494                 SetValue(BackgroundImageSynchronosLoadingProperty, value);
3495                 NotifyPropertyChanged();
3496             }
3497         }
3498
3499         private bool InternalBackgroundImageSynchronosLoading
3500         {
3501             get
3502             {
3503                 return BackgroundImageSynchronousLoading;
3504             }
3505             set
3506             {
3507                 BackgroundImageSynchronousLoading = value;
3508             }
3509         }
3510
3511         /// <summary>
3512         ///  Whether to load the BackgroundImage synchronously.
3513         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3514         ///  Note: For Normal Quad images only.
3515         /// </summary>
3516         /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3517         [EditorBrowsable(EditorBrowsableState.Never)]
3518         public bool BackgroundImageSynchronousLoading
3519         {
3520             get
3521             {
3522                 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
3523             }
3524             set
3525             {
3526                 SetValue(BackgroundImageSynchronousLoadingProperty, value);
3527                 NotifyPropertyChanged();
3528             }
3529         }
3530
3531         private bool InternalBackgroundImageSynchronousLoading
3532         {
3533             get
3534             {
3535                 return backgroundImageSynchronousLoading;
3536             }
3537             set
3538             {
3539                 backgroundImageSynchronousLoading = value;
3540
3541                 string bgUrl = null;
3542                 var pValue = Background.Find(ImageVisualProperty.URL);
3543                 pValue?.Get(out bgUrl);
3544                 pValue?.Dispose();
3545
3546                 if (!string.IsNullOrEmpty(bgUrl))
3547                 {
3548                     PropertyMap bgMap = this.Background;
3549                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
3550                     bgMap[ImageVisualProperty.SynchronousLoading] = temp;
3551                     temp.Dispose();
3552                     Background = bgMap;
3553                 }
3554             }
3555         }
3556
3557         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3558         [EditorBrowsable(EditorBrowsableState.Never)]
3559         public Vector4 UpdateAreaHint
3560         {
3561             get
3562             {
3563 #if NUI_PROPERTY_CHANGE_DEBUG
3564 UpdateAreaHintGetter++;
3565 #endif
3566                 return (Vector4)GetValue(UpdateAreaHintProperty);
3567             }
3568             set
3569             {
3570 #if NUI_PROPERTY_CHANGE_DEBUG
3571 UpdateAreaHintSetter++;
3572 #endif
3573                 SetValue(UpdateAreaHintProperty, value);
3574                 NotifyPropertyChanged();
3575             }
3576         }
3577
3578         /// <summary>
3579         /// Enable/Disable ControlState propagation for children.
3580         /// It is false by default.
3581         /// If the View needs to share ControlState with descendants, please set it true.
3582         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
3583         /// </summary>
3584         [EditorBrowsable(EditorBrowsableState.Never)]
3585         public bool EnableControlStatePropagation
3586         {
3587             get
3588             {
3589                 return (bool)GetValue(EnableControlStatePropagationProperty);
3590             }
3591             set
3592             {
3593                 SetValue(EnableControlStatePropagationProperty, value);
3594                 NotifyPropertyChanged();
3595             }
3596         }
3597
3598         private bool InternalEnableControlStatePropagation
3599         {
3600             get => themeData?.ControlStatePropagation ?? false;
3601             set
3602             {
3603                 if (InternalEnableControlStatePropagation == value) return;
3604
3605                 if (themeData == null) themeData = new ThemeData();
3606
3607                 themeData.ControlStatePropagation = value;
3608
3609                 foreach (View child in Children)
3610                 {
3611                     child.EnableControlStatePropagation = value;
3612                 }
3613             }
3614         }
3615
3616         /// <summary>
3617         /// The ControlStates can propagate from the parent.
3618         /// Listed ControlStates will be accepted propagation of the parent ControlState changes
3619         /// if parent view EnableControlState is true.
3620         /// <see cref="EnableControlState"/>.
3621         /// Default is ControlState.All, so every ControlStates will be propagated from the parent.
3622         /// </summary>
3623         [EditorBrowsable(EditorBrowsableState.Never)]
3624         public ControlState PropagatableControlStates
3625         {
3626             get
3627             {
3628                 return (ControlState)GetValue(PropagatableControlStatesProperty);
3629             }
3630             set
3631             {
3632                 SetValue(PropagatableControlStatesProperty, value);
3633                 NotifyPropertyChanged();
3634             }
3635         }
3636
3637         private ControlState InternalPropagatableControlStates
3638         {
3639             get => propagatableControlStates;
3640             set => propagatableControlStates = value;
3641         }
3642
3643         /// <summary>
3644         /// By default, it is false in View, true in Control.
3645         /// Note that if the value is true, the View will be a touch receptor.
3646         /// </summary>
3647         [EditorBrowsable(EditorBrowsableState.Never)]
3648         public bool EnableControlState
3649         {
3650             get
3651             {
3652                 return (bool)GetValue(EnableControlStateProperty);
3653             }
3654             set
3655             {
3656                 SetValue(EnableControlStateProperty, value);
3657             }
3658         }
3659
3660         /// <summary>
3661         /// Whether the actor grab all touches even if touch leaves its boundary.
3662         /// </summary>
3663         /// <returns>true, if it grab all touch after start</returns>
3664         [EditorBrowsable(EditorBrowsableState.Never)]
3665         public bool GrabTouchAfterLeave
3666         {
3667             get
3668             {
3669                 return (bool)GetValue(GrabTouchAfterLeaveProperty);
3670             }
3671             set
3672             {
3673                 SetValue(GrabTouchAfterLeaveProperty, value);
3674             }
3675         }
3676
3677         private bool InternalGrabTouchAfterLeave
3678         {
3679             get
3680             {
3681                 bool temp = false;
3682                 var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
3683                 pValue.Get(out temp);
3684                 pValue.Dispose();
3685                 return temp;
3686             }
3687             set
3688             {
3689                 var temp = new Tizen.NUI.PropertyValue(value);
3690                 SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
3691                 temp.Dispose();
3692                 NotifyPropertyChanged();
3693             }
3694         }
3695
3696         /// <summary>
3697         /// Whether the view will only receive own touch.
3698         /// </summary>
3699         /// <returns>true, if it only receives touches that started from itself.</returns>
3700         [EditorBrowsable(EditorBrowsableState.Never)]
3701         public bool AllowOnlyOwnTouch
3702         {
3703             get
3704             {
3705                 return (bool)GetValue(AllowOnlyOwnTouchProperty);
3706             }
3707             set
3708             {
3709                 SetValue(AllowOnlyOwnTouchProperty, value);
3710             }
3711         }
3712
3713         private bool InternalAllowOnlyOwnTouch
3714         {
3715             get
3716             {
3717                 bool temp = false;
3718                 var pValue = GetProperty(View.Property.AllowOnlyOwnTouch);
3719                 pValue.Get(out temp);
3720                 pValue.Dispose();
3721                 return temp;
3722             }
3723             set
3724             {
3725                 var temp = new Tizen.NUI.PropertyValue(value);
3726                 SetProperty(View.Property.AllowOnlyOwnTouch, temp);
3727                 temp.Dispose();
3728                 NotifyPropertyChanged();
3729             }
3730         }
3731
3732         /// <summary>
3733         /// Determines which blend equation will be used to render renderers of this actor.
3734         /// </summary>
3735         /// <returns>blend equation enum currently assigned</returns>
3736         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
3737         [EditorBrowsable(EditorBrowsableState.Never)]
3738         public BlendEquationType BlendEquation
3739         {
3740             get
3741             {
3742                 return (BlendEquationType)GetValue(BlendEquationProperty);
3743             }
3744             set
3745             {
3746                 SetValue(BlendEquationProperty, value);
3747             }
3748         }
3749
3750         private BlendEquationType InternalBlendEquation
3751         {
3752             get
3753             {
3754                 int temp = 0;
3755                 var pValue = GetProperty(View.Property.BlendEquation);
3756                 pValue.Get(out temp);
3757                 pValue.Dispose();
3758                 return (BlendEquationType)temp;
3759             }
3760             set
3761             {
3762                 var temp = new Tizen.NUI.PropertyValue((int)value);
3763                 SetProperty(View.Property.BlendEquation, temp);
3764                 temp.Dispose();
3765                 NotifyPropertyChanged();
3766             }
3767         }
3768
3769         /// <summary>
3770         /// If the value is true, the View will change its style as the theme changes.
3771         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3772         /// </summary>
3773         /// <since_tizen> 9 </since_tizen>
3774         public bool ThemeChangeSensitive
3775         {
3776             get => (bool)GetValue(ThemeChangeSensitiveProperty);
3777             set => SetValue(ThemeChangeSensitiveProperty, value);
3778         }
3779
3780         /// <summary>
3781         /// Create Style, it is abstract function and must be override.
3782         /// </summary>
3783         [EditorBrowsable(EditorBrowsableState.Never)]
3784         protected virtual ViewStyle CreateViewStyle()
3785         {
3786             return new ViewStyle();
3787         }
3788
3789         /// <summary>
3790         /// Called after the View's ControlStates changed.
3791         /// </summary>
3792         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3793         [EditorBrowsable(EditorBrowsableState.Never)]
3794         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3795         {
3796         }
3797
3798         /// <summary>
3799         /// </summary>
3800         [EditorBrowsable(EditorBrowsableState.Never)]
3801         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3802         {
3803             isThemeChanged = true;
3804             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3805             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3806             isThemeChanged = false;
3807         }
3808
3809         /// <summary>
3810         /// Apply style instance to the view.
3811         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3812         /// </summary>
3813         /// <since_tizen> 9 </since_tizen>
3814         public virtual void ApplyStyle(ViewStyle viewStyle)
3815         {
3816             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3817
3818             if (themeData == null) themeData = new ThemeData();
3819
3820             themeData.viewStyle = viewStyle;
3821
3822             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3823             {
3824                 // Nothing to apply
3825                 return;
3826             }
3827
3828             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3829
3830             if (bindablePropertyOfView == null)
3831             {
3832                 return;
3833             }
3834
3835             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3836             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3837
3838             foreach (var sourceProperty in dirtyStyleProperties)
3839             {
3840                 var sourceValue = viewStyle.GetValue(sourceProperty);
3841
3842                 if (sourceValue == null)
3843                 {
3844                     continue;
3845                 }
3846
3847                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3848
3849                 // Do not set value again when theme is changed and the value has been set already.
3850                 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3851                 {
3852                     continue;
3853                 }
3854
3855                 if (destinationProperty != null)
3856                 {
3857                     InternalSetValue(destinationProperty, sourceValue);
3858                 }
3859             }
3860         }
3861
3862         /// <summary>
3863         /// Get whether the View is culled or not.
3864         /// True means that the View is out of the view frustum.
3865         /// </summary>
3866         /// <remarks>
3867         /// Hidden-API (Inhouse-API).
3868         /// </remarks>
3869         [EditorBrowsable(EditorBrowsableState.Never)]
3870         public bool Culled
3871         {
3872             get
3873             {
3874                 bool temp = false;
3875                 var pValue = GetProperty(View.Property.Culled);
3876                 pValue.Get(out temp);
3877                 pValue.Dispose();
3878                 return temp;
3879             }
3880         }
3881
3882         /// <summary>
3883         /// Set or Get TransitionOptions for the page transition.
3884         /// This property is used to define how this view will be transitioned during Page switching.
3885         /// </summary>
3886         /// <since_tizen> 9 </since_tizen>
3887         public TransitionOptions TransitionOptions
3888         {
3889             get
3890             {
3891                 return GetValue(TransitionOptionsProperty) as TransitionOptions;
3892             }
3893             set
3894             {
3895                 SetValue(TransitionOptionsProperty, value);
3896                 NotifyPropertyChanged();
3897             }
3898         }
3899
3900         private TransitionOptions InternalTransitionOptions
3901         {
3902             set
3903             {
3904                 transitionOptions = value;
3905             }
3906             get
3907             {
3908                 return transitionOptions;
3909             }
3910         }
3911
3912         /// <summary>
3913         /// Gets or sets the status of whether the view should emit key event signals.
3914         /// If a View's DispatchKeyEvents is set to false, then itself and parents will not receive key event signals.
3915         /// </summary>
3916         [EditorBrowsable(EditorBrowsableState.Never)]
3917         public bool DispatchKeyEvents
3918         {
3919             get
3920             {
3921 #if NUI_PROPERTY_CHANGE_DEBUG
3922 DispatchKeyEventsGetter++;
3923 #endif
3924                 return (bool)GetValue(DispatchKeyEventsProperty);
3925             }
3926             set
3927             {
3928 #if NUI_PROPERTY_CHANGE_DEBUG
3929 DispatchKeyEventsSetter++;
3930 #endif
3931                 SetValue(DispatchKeyEventsProperty, value);
3932                 NotifyPropertyChanged();
3933             }
3934         }
3935
3936         /// <summary>
3937         /// Gets or sets the status of whether touch events can be dispatched.
3938         /// If a View's DispatchTouchEvents is set to false, then it's can not will receive touch and parents will not receive a touch event signal either.
3939         /// This works without adding a TouchEvent callback in the View.
3940         /// <note>
3941         /// If the <see cref="Tizen.NUI.BaseComponents.View.Sensitive"/> is a property that determines whether or not to be hittable, then this property prevents the propagation of the hit touch event.
3942         /// </note>
3943         /// </summary>
3944         [EditorBrowsable(EditorBrowsableState.Never)]
3945         public bool DispatchTouchEvents
3946         {
3947             get
3948             {
3949                 return dispatchTouchEvents;
3950             }
3951             set
3952             {
3953                 if (dispatchTouchEvents != value)
3954                 {
3955                     dispatchTouchEvents = value;
3956                     if (dispatchTouchEvents == false)
3957                     {
3958                         TouchEvent += OnDispatchTouchEvent;
3959                     }
3960                     else
3961                     {
3962                         TouchEvent -= OnDispatchTouchEvent;
3963                     }
3964                 }
3965             }
3966         }
3967
3968         private bool OnDispatchTouchEvent(object source, View.TouchEventArgs e)
3969         {
3970             return true;
3971         }
3972
3973         /// <summary>
3974         /// Gets or sets the status of whether the view should emit Gesture event signals.
3975         /// If a View's DispatchGestureEvents is set to false, then itself and parents will not receive all gesture event signals.
3976         /// The itself and parents does not receive tap, pinch, pan, rotation, or longpress gestures.
3977         /// </summary>
3978         [EditorBrowsable(EditorBrowsableState.Never)]
3979         public bool DispatchGestureEvents
3980         {
3981             get
3982             {
3983                 return dispatchGestureEvents;
3984             }
3985             set
3986             {
3987                 if (dispatchGestureEvents != value)
3988                 {
3989                     dispatchGestureEvents = value;
3990                     ConfigGestureDetector(dispatchGestureEvents);
3991                 }
3992             }
3993         }
3994
3995         /// <summary>
3996         /// Gets or sets the status of whether the view should emit Gesture event signals.
3997         /// If a View's DispatchParentGestureEvents is set to false, then parents will not receive all gesture event signals.
3998         /// The parents does not receive tap, pinch, pan, rotation, or longpress gestures.
3999         /// </summary>
4000         [EditorBrowsable(EditorBrowsableState.Never)]
4001         public bool DispatchParentGestureEvents
4002         {
4003             get
4004             {
4005                 return dispatchParentGestureEvents;
4006             }
4007             set
4008             {
4009                 if (dispatchParentGestureEvents != value)
4010                 {
4011                     dispatchParentGestureEvents = value;
4012                     ConfigGestureDetector(dispatchParentGestureEvents);
4013                 }
4014             }
4015         }
4016
4017         private void ConfigGestureDetector(bool dispatch)
4018         {
4019             if (panGestureDetector == null) panGestureDetector = new PanGestureDetector();
4020             if (longGestureDetector == null) longGestureDetector = new LongPressGestureDetector();
4021             if (pinchGestureDetector == null) pinchGestureDetector = new PinchGestureDetector();
4022             if (tapGestureDetector == null) tapGestureDetector = new TapGestureDetector();
4023             if (rotationGestureDetector == null) rotationGestureDetector = new RotationGestureDetector();
4024
4025             if (dispatch == true)
4026             {
4027                 configGestureCount = configGestureCount > 0 ? configGestureCount-- : 0;
4028                 if (configGestureCount == 0)
4029                 {
4030                     panGestureDetector.Detach(this);
4031                     longGestureDetector.Detach(this);
4032                     pinchGestureDetector.Detach(this);
4033                     tapGestureDetector.Detach(this);
4034                     rotationGestureDetector.Detach(this);
4035
4036                     panGestureDetector.Detected -= OnGestureDetected;
4037                     longGestureDetector.Detected -= OnGestureDetected;
4038                     pinchGestureDetector.Detected -= OnGestureDetected;
4039                     tapGestureDetector.Detected -= OnGestureDetected;
4040                     rotationGestureDetector.Detected -= OnGestureDetected;
4041
4042                     panGestureDetector = null;
4043                     longGestureDetector = null;
4044                     pinchGestureDetector = null;
4045                     tapGestureDetector = null;
4046                     rotationGestureDetector = null;
4047                 }
4048             }
4049             else
4050             {
4051                 if (configGestureCount == 0)
4052                 {
4053                     panGestureDetector.Attach(this);
4054                     longGestureDetector.Attach(this);
4055                     pinchGestureDetector.Attach(this);
4056                     tapGestureDetector.Attach(this);
4057                     rotationGestureDetector.Attach(this);
4058
4059                     panGestureDetector.Detected += OnGestureDetected;
4060                     longGestureDetector.Detected += OnGestureDetected;
4061                     pinchGestureDetector.Detected += OnGestureDetected;
4062                     tapGestureDetector.Detected += OnGestureDetected;
4063                     rotationGestureDetector.Detected += OnGestureDetected;
4064                 }
4065                 configGestureCount++;
4066             }
4067         }
4068
4069         private void OnGestureDetected(object source, EventArgs e)
4070         {
4071             // Does notting. This is to consume the gesture.
4072         }
4073
4074         /// <summary>
4075         /// Called when the view is hit through TouchEvent or GestureEvent.
4076         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
4077         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
4078         /// User can override whether hit or not in HitTest.
4079         /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
4080         /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
4081         /// </summary>
4082         // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
4083         [EditorBrowsable(EditorBrowsableState.Never)]
4084         protected virtual bool HitTest(Touch touch)
4085         {
4086             return true;
4087         }
4088
4089         /// <summary>
4090         /// Retrieve the View's current Color.
4091         /// </summary>
4092         /// <remarks>
4093         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
4094         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
4095         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
4096         /// and users can get the current actual values through them.
4097         /// </remarks>
4098         [EditorBrowsable(EditorBrowsableState.Never)]
4099         public Color CurrentColor => GetCurrentColor();
4100
4101         /// <summary>
4102         /// Retrieve the current scale factor applied to the View.
4103         /// </summary>
4104         /// <remarks>
4105         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
4106         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
4107         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
4108         /// and users can get the current actual values through them.
4109         /// </remarks>
4110         [EditorBrowsable(EditorBrowsableState.Never)]
4111         public Vector3 CurrentScale => GetCurrentScale();
4112
4113     }
4114 }