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