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