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