[NUI] Add ScreenPositionSize (#4754)
[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         /// Retrieves the screen position and size of the view.<br />
1360         /// </summary>
1361         /// <remarks>
1362         /// The float type Rectangle class is not ready yet.
1363         /// Therefore, it transmits data in Vector4 class.
1364         /// This type should later be changed to the appropriate data type.
1365         /// </remarks>
1366         [EditorBrowsable(EditorBrowsableState.Never)]
1367         public Vector4 ScreenPositionSize
1368         {
1369             get
1370             {
1371                 return GetCurrentScreenPositionSize();
1372             }
1373         }
1374
1375         /// <summary>
1376         /// Determines whether the pivot point should be used to determine the position of the view.
1377         /// This is false by default.
1378         /// </summary>
1379         /// <remarks>If false, then the top-left of the view is used for the position.
1380         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1381         /// </remarks>
1382         /// <since_tizen> 3 </since_tizen>
1383         public bool PositionUsesPivotPoint
1384         {
1385             get
1386             {
1387                 return (bool)GetValue(PositionUsesPivotPointProperty);
1388             }
1389             set
1390             {
1391                 SetValue(PositionUsesPivotPointProperty, value);
1392                 NotifyPropertyChanged();
1393             }
1394         }
1395
1396         /// <summary>
1397         /// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
1398         /// </summary>
1399         /// <since_tizen> 3 </since_tizen>
1400         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
1401             "Like: " +
1402             "View view = new View(); " +
1403             "view.PivotPoint = PivotPoint.Center; " +
1404             "view.PositionUsesPivotPoint = true;" +
1405             " This has been deprecated in API5 and will be removed in API8")]
1406         [EditorBrowsable(EditorBrowsableState.Never)]
1407         public bool PositionUsesAnchorPoint
1408         {
1409             get
1410             {
1411                 return (bool)GetValue(PositionUsesAnchorPointProperty);
1412             }
1413             set
1414             {
1415                 SetValue(PositionUsesAnchorPointProperty, value);
1416             }
1417         }
1418
1419         private bool InternalPositionUsesAnchorPoint
1420         {
1421             get
1422             {
1423 #if NUI_VISUAL_PROPERTY_CHANGE_1
1424                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
1425 #else
1426                 bool temp = false;
1427                 var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
1428                 pValue.Get(out temp);
1429                 pValue.Dispose();
1430                 return temp;
1431 #endif
1432             }
1433             set
1434             {
1435 #if NUI_VISUAL_PROPERTY_CHANGE_1
1436                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
1437 #else
1438                 var temp = new Tizen.NUI.PropertyValue(value);
1439                 SetProperty(View.Property.PositionUsesAnchorPoint, temp);
1440                 temp.Dispose();
1441 #endif
1442                 NotifyPropertyChanged();
1443             }
1444         }
1445
1446         /// <summary>
1447         /// Queries whether the view is connected to the stage.<br />
1448         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1449         /// </summary>
1450         /// <since_tizen> 3 </since_tizen>
1451         public bool IsOnWindow
1452         {
1453             get
1454             {
1455                 return OnWindow();
1456             }
1457         }
1458
1459         /// <summary>
1460         /// Gets the depth in the hierarchy for the view.
1461         /// </summary>
1462         /// <since_tizen> 3 </since_tizen>
1463         public int HierarchyDepth
1464         {
1465             get
1466             {
1467                 return GetHierarchyDepth();
1468             }
1469         }
1470
1471         /// <summary>
1472         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1473         /// </summary>
1474         /// <remarks>
1475         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1476         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1477         /// The values set by this property will likely change.
1478         /// </remarks>
1479         /// <since_tizen> 3 </since_tizen>
1480         public int SiblingOrder
1481         {
1482             get
1483             {
1484                 return (int)GetValue(SiblingOrderProperty);
1485             }
1486             set
1487             {
1488                 SetValue(SiblingOrderProperty, value);
1489
1490                 Layout?.ChangeLayoutSiblingOrder(value);
1491
1492                 NotifyPropertyChanged();
1493             }
1494         }
1495
1496         /// <summary>
1497         /// Returns the natural size 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> 5 </since_tizen>
1503         public Vector3 NaturalSize
1504         {
1505             get
1506             {
1507                 Vector3 ret = GetNaturalSize();
1508                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1509                 return ret;
1510             }
1511         }
1512
1513         /// <summary>
1514         /// Returns the natural size (Size2D) of the view.
1515         /// </summary>
1516         /// <remarks>
1517         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1518         /// </remarks>
1519         /// <since_tizen> 4 </since_tizen>
1520         public Size2D NaturalSize2D
1521         {
1522             get
1523             {
1524                 Vector3 temp = GetNaturalSize();
1525                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1526
1527                 Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
1528                 temp.Dispose();
1529                 return sz;
1530             }
1531         }
1532
1533         /// <summary>
1534         /// Gets or sets the origin of a view within its parent's area.<br />
1535         /// 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 />
1536         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1537         /// A view's position is the distance between this origin and the view's anchor-point.<br />
1538         /// </summary>
1539         /// <pre>The view has been initialized.</pre>
1540         /// <since_tizen> 3 </since_tizen>
1541         public Position ParentOrigin
1542         {
1543             get
1544             {
1545                 Position tmp = (Position)GetValue(ParentOriginProperty);
1546                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1547             }
1548             set
1549             {
1550                 SetValue(ParentOriginProperty, value);
1551                 NotifyPropertyChanged();
1552             }
1553         }
1554
1555         /// <summary>
1556         /// Gets or sets the anchor-point of a view.<br />
1557         /// 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 />
1558         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1559         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1560         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1561         /// <pre>The view has been initialized.</pre>
1562         /// </summary>
1563         /// <remarks>
1564         /// The property cascade chaining set is not recommended.
1565         ///</remarks>
1566         /// <example>
1567         /// This way is recommended for setting the property
1568         /// <code>
1569         /// var view = new View();
1570         /// view.PivotPoint = PivotPoint.Center;
1571         /// </code>
1572         /// This way to set the property is prohibited
1573         /// <code>
1574         /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1575         /// </code>
1576         /// </example>
1577         /// <since_tizen> 3 </since_tizen>
1578         public Position PivotPoint
1579         {
1580             get
1581             {
1582                 return (Position)GetValue(PivotPointProperty);
1583             }
1584             set
1585             {
1586                 SetValue(PivotPointProperty, value);
1587                 NotifyPropertyChanged();
1588             }
1589         }
1590
1591         /// <summary>
1592         /// Gets or sets the size width of the view.
1593         /// </summary>
1594         /// <remarks>
1595         /// <para>
1596         /// Animatable - This property can be animated using <c>Animation</c> class.
1597         /// <code>
1598         /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1599         /// </code>
1600         /// </para>
1601         /// </remarks>
1602         /// <since_tizen> 3 </since_tizen>
1603         public float SizeWidth
1604         {
1605             get
1606             {
1607                 return (float)GetValue(SizeWidthProperty);
1608             }
1609             set
1610             {
1611                 SetValue(SizeWidthProperty, value);
1612                 NotifyPropertyChanged();
1613             }
1614         }
1615
1616         /// <summary>
1617         /// Gets or sets the size height of the view.
1618         /// </summary>
1619         /// <remarks>
1620         /// <para>
1621         /// Animatable - This property can be animated using <c>Animation</c> class.
1622         /// </para>
1623         /// <code>
1624         /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1625         /// </code>
1626         /// </remarks>
1627         /// <since_tizen> 3 </since_tizen>
1628         public float SizeHeight
1629         {
1630             get
1631             {
1632                 return (float)GetValue(SizeHeightProperty);
1633             }
1634             set
1635             {
1636                 SetValue(SizeHeightProperty, value);
1637                 NotifyPropertyChanged();
1638             }
1639         }
1640
1641         /// <summary>
1642         /// Gets or sets the position of the view.<br />
1643         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1644         /// If the position inheritance is disabled, sets the world position.<br />
1645         /// </summary>
1646         /// <remarks>
1647         /// <para>
1648         /// Animatable - This property can be animated using <c>Animation</c> class.
1649         /// <code>
1650         /// animation.AnimateTo(view, "Position", new Position(50, 0));
1651         /// </code>
1652         /// </para>
1653         /// The property cascade chaining set is not recommended.
1654         /// </remarks>
1655         /// <example>
1656         /// This way is recommended for setting the property
1657         /// <code>
1658         /// var view = new View();
1659         /// view.Position = new Position(100, 200.5f, 0);
1660         /// </code>
1661         /// This way to set the property is prohibited
1662         /// <code>
1663         /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1664         /// </code>
1665         /// </example>
1666         /// <since_tizen> 3 </since_tizen>
1667         public Position Position
1668         {
1669             get
1670             {
1671                 return (Position)GetValue(PositionProperty);
1672             }
1673             set
1674             {
1675                 SetValue(PositionProperty, value);
1676                 NotifyPropertyChanged();
1677             }
1678         }
1679
1680         /// <summary>
1681         /// Gets or sets the position X of the view.
1682         /// </summary>
1683         /// <remarks>
1684         /// <para>
1685         /// Animatable - This property can be animated using <c>Animation</c> class.
1686         /// <code>
1687         /// animation.AnimateTo(view, "PositionX", 50.0f);
1688         /// </code>
1689         /// </para>
1690         /// </remarks>
1691         /// <since_tizen> 3 </since_tizen>
1692         public float PositionX
1693         {
1694             get
1695             {
1696                 return (float)GetValue(PositionXProperty);
1697             }
1698             set
1699             {
1700                 SetValue(PositionXProperty, value);
1701                 NotifyPropertyChanged();
1702             }
1703         }
1704
1705         /// <summary>
1706         /// Gets or sets the position Y of the view.
1707         /// </summary>
1708         /// <remarks>
1709         /// <para>
1710         /// Animatable - This property can be animated using <c>Animation</c> class.
1711         /// <code>
1712         /// animation.AnimateTo(view, "PositionY", 50.0f);
1713         /// </code>
1714         /// </para>
1715         /// </remarks>
1716         /// <since_tizen> 3 </since_tizen>
1717         public float PositionY
1718         {
1719             get
1720             {
1721                 return (float)GetValue(PositionYProperty);
1722             }
1723             set
1724             {
1725                 SetValue(PositionYProperty, value);
1726                 NotifyPropertyChanged();
1727             }
1728         }
1729
1730         /// <summary>
1731         /// Gets or sets the position Z of the view.
1732         /// </summary>
1733         /// <remarks>
1734         /// <para>
1735         /// Animatable - This property can be animated using <c>Animation</c> class.
1736         /// <code>
1737         /// animation.AnimateTo(view, "PositionZ", 50.0f);
1738         /// </code>
1739         /// </para>
1740         /// </remarks>
1741         /// <since_tizen> 3 </since_tizen>
1742         public float PositionZ
1743         {
1744             get
1745             {
1746                 return (float)GetValue(PositionZProperty);
1747             }
1748             set
1749             {
1750                 SetValue(PositionZProperty, value);
1751                 NotifyPropertyChanged();
1752             }
1753         }
1754
1755         /// <summary>
1756         /// Gets or sets the world position of the view.
1757         /// </summary>
1758         /// <since_tizen> 3 </since_tizen>
1759         public Vector3 WorldPosition
1760         {
1761             get
1762             {
1763 #if NUI_VISUAL_PROPERTY_CHANGE_1
1764                 return GetCurrentWorldPosition();
1765 #else
1766                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1767                 var pValue = GetProperty(View.Property.WorldPosition);
1768                 pValue.Get(temp);
1769                 pValue.Dispose();
1770                 return temp;
1771 #endif
1772             }
1773         }
1774
1775         /// <summary>
1776         /// Gets or sets the orientation of the view.<br />
1777         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1778         /// </summary>
1779         /// <remarks>
1780         /// <para>
1781         /// This is an asynchronous method.
1782         /// </para>
1783         /// <para>
1784         /// Animatable - This property can be animated using <c>Animation</c> class.
1785         /// <code>
1786         /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
1787         /// </code>
1788         /// </para>
1789         /// </remarks>
1790         /// <since_tizen> 3 </since_tizen>
1791         public Rotation Orientation
1792         {
1793             get
1794             {
1795                 return (Rotation)GetValue(OrientationProperty);
1796             }
1797             set
1798             {
1799                 SetValue(OrientationProperty, value);
1800                 NotifyPropertyChanged();
1801             }
1802         }
1803
1804         /// <summary>
1805         /// Gets or sets the world orientation of the view.<br />
1806         /// </summary>
1807         /// <since_tizen> 3 </since_tizen>
1808         public Rotation WorldOrientation
1809         {
1810             get
1811             {
1812                 Rotation temp = new Rotation();
1813                 var pValue = GetProperty(View.Property.WorldOrientation);
1814                 pValue.Get(temp);
1815                 pValue.Dispose();
1816                 return temp;
1817             }
1818         }
1819
1820         /// <summary>
1821         /// Gets or sets the scale factor applied to the view.<br />
1822         /// </summary>
1823         /// <remarks>
1824         /// <para>
1825         /// Animatable - This property can be animated using <c>Animation</c> class.
1826         /// <code>
1827         /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
1828         /// </code>
1829         /// </para>
1830         /// The property cascade chaining set is not recommended.
1831         /// </remarks>
1832         /// <example>
1833         /// This way is recommended for setting the property
1834         /// <code>
1835         /// var view = new View();
1836         /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
1837         /// </code>
1838         /// This way to set the property is prohibited
1839         /// <code>
1840         /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
1841         /// </code>
1842         /// </example>
1843         /// <since_tizen> 3 </since_tizen>
1844         public Vector3 Scale
1845         {
1846             get
1847             {
1848                 return (Vector3)GetValue(ScaleProperty);
1849             }
1850             set
1851             {
1852                 SetValue(ScaleProperty, value);
1853                 NotifyPropertyChanged();
1854             }
1855         }
1856
1857         /// <summary>
1858         /// Gets or sets the scale X factor applied to the view.
1859         /// </summary>
1860         /// <remarks>
1861         /// <para>
1862         /// Animatable - This property can be animated using <c>Animation</c> class.
1863         /// <code>
1864         /// animation.AnimateTo(view, "ScaleX", 1.5f);
1865         /// </code>
1866         /// </para>
1867         /// </remarks>
1868         /// <since_tizen> 3 </since_tizen>
1869         public float ScaleX
1870         {
1871             get
1872             {
1873                 return (float)GetValue(ScaleXProperty);
1874             }
1875             set
1876             {
1877                 SetValue(ScaleXProperty, value);
1878                 NotifyPropertyChanged();
1879             }
1880         }
1881
1882         /// <summary>
1883         /// Gets or sets the scale Y factor applied to the view.
1884         /// </summary>
1885         /// <remarks>
1886         /// <para>
1887         /// Animatable - This property can be animated using <c>Animation</c> class.
1888         /// <code>
1889         /// animation.AnimateTo(view, "ScaleY", 1.5f);
1890         /// </code>
1891         /// </para>
1892         /// </remarks>
1893         /// <since_tizen> 3 </since_tizen>
1894         public float ScaleY
1895         {
1896             get
1897             {
1898                 return (float)GetValue(ScaleYProperty);
1899             }
1900             set
1901             {
1902                 SetValue(ScaleYProperty, value);
1903                 NotifyPropertyChanged();
1904             }
1905         }
1906
1907         /// <summary>
1908         /// Gets or sets the scale Z factor applied to the view.
1909         /// </summary>
1910         /// <remarks>
1911         /// <para>
1912         /// Animatable - This property can be animated using <c>Animation</c> class.
1913         /// <code>
1914         /// animation.AnimateTo(view, "ScaleZ", 1.5f);
1915         /// </code>
1916         /// </para>
1917         /// </remarks>
1918         /// <since_tizen> 3 </since_tizen>
1919         public float ScaleZ
1920         {
1921             get
1922             {
1923                 return (float)GetValue(ScaleZProperty);
1924             }
1925             set
1926             {
1927                 SetValue(ScaleZProperty, value);
1928                 NotifyPropertyChanged();
1929             }
1930         }
1931
1932         /// <summary>
1933         /// Gets the world scale of the view.
1934         /// </summary>
1935         /// <since_tizen> 3 </since_tizen>
1936         public Vector3 WorldScale
1937         {
1938             get
1939             {
1940 #if NUI_VISUAL_PROPERTY_CHANGE_1
1941                 return GetCurrentWorldScale();
1942 #else
1943                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1944                 var pValue = GetProperty(View.Property.WorldScale);
1945                 pValue.Get(temp);
1946                 pValue.Dispose();
1947                 return temp;
1948 #endif
1949             }
1950         }
1951
1952         /// <summary>
1953         /// Retrieves the visibility flag of the view.
1954         /// </summary>
1955         /// <remarks>
1956         /// <para>
1957         /// If the view is not visible, then the view and its children will not be rendered.
1958         /// 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.
1959         /// </para>
1960         /// <para>
1961         /// Animatable - This property can be animated using <c>Animation</c> class.
1962         /// <code>
1963         /// animation.AnimateTo(view, "Visibility", false);
1964         /// </code>
1965         /// </para>
1966         /// </remarks>
1967         /// <since_tizen> 3 </since_tizen>
1968         public bool Visibility
1969         {
1970             get
1971             {
1972 #if NUI_VISUAL_PROPERTY_CHANGE_1
1973                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
1974 #else
1975                 bool temp = false;
1976                 var pValue = GetProperty(View.Property.VISIBLE);
1977                 pValue.Get(out temp);
1978                 pValue.Dispose();
1979                 return temp;
1980 #endif
1981             }
1982         }
1983
1984         /// <summary>
1985         /// Gets the view's world color.
1986         /// </summary>
1987         /// <since_tizen> 3 </since_tizen>
1988         public Vector4 WorldColor
1989         {
1990             get
1991             {
1992 #if NUI_VISUAL_PROPERTY_CHANGE_1
1993                 return GetCurrentWorldColor();
1994 #else
1995                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1996                 var pValue = GetProperty(View.Property.WorldColor);
1997                 pValue.Get(temp);
1998                 pValue.Dispose();
1999                 return temp;
2000 #endif
2001             }
2002         }
2003
2004         /// <summary>
2005         /// Gets or sets the view's name.
2006         /// </summary>
2007         /// <since_tizen> 3 </since_tizen>
2008         public string Name
2009         {
2010             get
2011             {
2012                 return (string)GetValue(NameProperty);
2013             }
2014             set
2015             {
2016                 SetValue(NameProperty, value);
2017                 NotifyPropertyChanged();
2018             }
2019         }
2020
2021         /// <summary>
2022         /// Get the number of children held by the view.
2023         /// </summary>
2024         /// <since_tizen> 3 </since_tizen>
2025         public new uint ChildCount
2026         {
2027             get
2028             {
2029                 return Convert.ToUInt32(Children.Count);
2030             }
2031         }
2032
2033         /// <summary>
2034         /// Gets the view's ID.
2035         /// Read-only
2036         /// </summary>
2037         /// <since_tizen> 3 </since_tizen>
2038         public uint ID
2039         {
2040             get
2041             {
2042                 return GetId();
2043             }
2044         }
2045
2046         /// <summary>
2047         /// Gets or sets the status of whether the view should emit touch or hover signals.
2048         /// If a View is made insensitive, then the View and its children are not hittable.
2049         /// </summary>
2050         /// <since_tizen> 3 </since_tizen>
2051         public bool Sensitive
2052         {
2053             get
2054             {
2055                 return (bool)GetValue(SensitiveProperty);
2056             }
2057             set
2058             {
2059                 SetValue(SensitiveProperty, value);
2060                 NotifyPropertyChanged();
2061             }
2062         }
2063
2064         /// <summary>
2065         /// Gets or sets the status of whether the view should be enabled user interactions.
2066         /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
2067         /// </summary>
2068         /// <since_tizen> tizen_next </since_tizen>
2069         [EditorBrowsable(EditorBrowsableState.Never)]
2070         public bool IsEnabled
2071         {
2072             get
2073             {
2074                 return (bool)GetValue(IsEnabledProperty);
2075             }
2076             set
2077             {
2078                 SetValue(IsEnabledProperty, value);
2079                 NotifyPropertyChanged();
2080             }
2081         }
2082
2083         /// <summary>
2084         /// 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.
2085         /// </summary>
2086         /// <since_tizen> 3 </since_tizen>
2087         public bool LeaveRequired
2088         {
2089             get
2090             {
2091                 return (bool)GetValue(LeaveRequiredProperty);
2092             }
2093             set
2094             {
2095                 SetValue(LeaveRequiredProperty, value);
2096                 NotifyPropertyChanged();
2097             }
2098         }
2099
2100         /// <summary>
2101         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2102         /// </summary>
2103         /// <since_tizen> 3 </since_tizen>
2104         public bool InheritOrientation
2105         {
2106             get
2107             {
2108                 return (bool)GetValue(InheritOrientationProperty);
2109             }
2110             set
2111             {
2112                 SetValue(InheritOrientationProperty, value);
2113                 NotifyPropertyChanged();
2114             }
2115         }
2116
2117         /// <summary>
2118         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2119         /// </summary>
2120         /// <since_tizen> 3 </since_tizen>
2121         public bool InheritScale
2122         {
2123             get
2124             {
2125                 return (bool)GetValue(InheritScaleProperty);
2126             }
2127             set
2128             {
2129                 SetValue(InheritScaleProperty, value);
2130                 NotifyPropertyChanged();
2131             }
2132         }
2133
2134         /// <summary>
2135         /// Gets or sets the status of how the view and its children should be drawn.<br />
2136         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2137         /// 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 />
2138         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2139         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2140         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2141         /// </summary>
2142         /// <since_tizen> 3 </since_tizen>
2143         public DrawModeType DrawMode
2144         {
2145             get
2146             {
2147                 return (DrawModeType)GetValue(DrawModeProperty);
2148             }
2149             set
2150             {
2151                 SetValue(DrawModeProperty, value);
2152                 NotifyPropertyChanged();
2153             }
2154         }
2155
2156         /// <summary>
2157         /// Gets or sets the relative to parent size factor of the view.<br />
2158         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2159         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2160         /// </summary>
2161         /// <remarks>
2162         /// The property cascade chaining set is not recommended.
2163         /// </remarks>
2164         /// <example>
2165         /// This way is recommended for setting the property
2166         /// <code>
2167         /// var text = new TextField();
2168         /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
2169         /// </code>
2170         /// This way to set the property is prohibited
2171         /// <code>
2172         /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
2173         /// </code>
2174         /// </example>
2175         /// <since_tizen> 3 </since_tizen>
2176         public Vector3 SizeModeFactor
2177         {
2178             get
2179             {
2180                 return (Vector3)GetValue(SizeModeFactorProperty);
2181             }
2182             set
2183             {
2184                 SetValue(SizeModeFactorProperty, value);
2185                 NotifyPropertyChanged();
2186             }
2187         }
2188
2189         /// <summary>
2190         /// Gets or sets the width resize policy to be used.
2191         /// </summary>
2192         /// <since_tizen> 3 </since_tizen>
2193         public ResizePolicyType WidthResizePolicy
2194         {
2195             get
2196             {
2197                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2198             }
2199             set
2200             {
2201                 SetValue(WidthResizePolicyProperty, value);
2202                 NotifyPropertyChanged();
2203             }
2204         }
2205
2206         /// <summary>
2207         /// Gets or sets the height resize policy to be used.
2208         /// </summary>
2209         /// <since_tizen> 3 </since_tizen>
2210         public ResizePolicyType HeightResizePolicy
2211         {
2212             get
2213             {
2214                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2215             }
2216             set
2217             {
2218                 SetValue(HeightResizePolicyProperty, value);
2219                 NotifyPropertyChanged();
2220             }
2221         }
2222
2223         /// <summary>
2224         /// Gets or sets the policy to use when setting size with size negotiation.<br />
2225         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2226         /// </summary>
2227         /// <since_tizen> 3 </since_tizen>
2228         public SizeScalePolicyType SizeScalePolicy
2229         {
2230             get
2231             {
2232                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2233             }
2234             set
2235             {
2236                 SetValue(SizeScalePolicyProperty, value);
2237                 NotifyPropertyChanged();
2238             }
2239         }
2240
2241         /// <summary>
2242         ///  Gets or sets the status of whether the width size is dependent on the height size.
2243         /// </summary>
2244         /// <since_tizen> 3 </since_tizen>
2245         public bool WidthForHeight
2246         {
2247             get
2248             {
2249                 return (bool)GetValue(WidthForHeightProperty);
2250             }
2251             set
2252             {
2253                 SetValue(WidthForHeightProperty, value);
2254                 NotifyPropertyChanged();
2255             }
2256         }
2257
2258         /// <summary>
2259         /// Gets or sets the status of whether the height size is dependent on the width size.
2260         /// </summary>
2261         /// <since_tizen> 3 </since_tizen>
2262         public bool HeightForWidth
2263         {
2264             get
2265             {
2266                 return (bool)GetValue(HeightForWidthProperty);
2267             }
2268             set
2269             {
2270                 SetValue(HeightForWidthProperty, value);
2271                 NotifyPropertyChanged();
2272             }
2273         }
2274
2275         /// <summary>
2276         /// Gets or sets the padding for use in layout.
2277         /// </summary>
2278         /// <remarks>
2279         /// The property cascade chaining set is not recommended.
2280         /// </remarks>
2281         /// <example>
2282         /// This way is recommended for setting the property
2283         /// <code>
2284         /// var view = new View();
2285         /// view.Padding = new Extents(5, 5, 5, 5);
2286         /// </code>
2287         /// This way to set the property is prohibited
2288         /// <code>
2289         /// view.Padding.Start = 5; //This does not guarantee a proper operation
2290         /// </code>
2291         /// </example>
2292         /// <since_tizen> 5 </since_tizen>
2293         public Extents Padding
2294         {
2295             get
2296             {
2297                 return (Extents)GetValue(PaddingProperty);
2298             }
2299             set
2300             {
2301                 SetValue(PaddingProperty, value);
2302                 NotifyPropertyChanged();
2303             }
2304         }
2305
2306         /// <summary>
2307         /// Gets or sets the minimum size the view can be assigned in size negotiation.
2308         /// </summary>
2309         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2310         /// <remarks>
2311         /// The property cascade chaining set is not recommended.
2312         /// </remarks>
2313         /// <example>
2314         /// This way is recommended for setting the property
2315         /// <code>
2316         /// var view = new View();
2317         /// view.MinimumSize = new Size2D(100, 200);
2318         /// </code>
2319         /// This way to set the property is prohibited
2320         /// <code>
2321         /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2322         /// </code>
2323         /// </example>
2324         /// <since_tizen> 3 </since_tizen>
2325         public Size2D MinimumSize
2326         {
2327             get
2328             {
2329                 return (Size2D)GetValue(MinimumSizeProperty);
2330             }
2331             set
2332             {
2333                 if (value == null)
2334                 {
2335                     throw new ArgumentNullException(nameof(value));
2336                 }
2337                 if (layout != null)
2338                 {
2339                     // Note: it only works if minimum size is >= than natural size.
2340                     // To force the size it should be done through the width&height spec or Size2D.
2341                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2342                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2343                     layout.RequestLayout();
2344                 }
2345                 SetValue(MinimumSizeProperty, value);
2346                 NotifyPropertyChanged();
2347             }
2348         }
2349
2350         /// <summary>
2351         /// Gets or sets the maximum size the view can be assigned in size negotiation.
2352         /// </summary>
2353         /// <example>
2354         /// This way is recommended for setting the property
2355         /// <code>
2356         /// var view = new View();
2357         /// view.MaximumSize = new Size2D(100, 200);
2358         /// </code>
2359         /// This way to set the property is prohibited
2360         /// <code>
2361         /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2362         /// </code>
2363         /// </example>
2364         /// <since_tizen> 3 </since_tizen>
2365         public Size2D MaximumSize
2366         {
2367             get
2368             {
2369                 return (Size2D)GetValue(MaximumSizeProperty);
2370             }
2371             set
2372             {
2373                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2374                 // MATCH_PARENT spec + parent container size can be used to limit
2375                 if (layout != null)
2376                 {
2377                     layout.RequestLayout();
2378                 }
2379                 SetValue(MaximumSizeProperty, value);
2380                 NotifyPropertyChanged();
2381             }
2382         }
2383
2384         /// <summary>
2385         /// Gets or sets whether a child view inherits it's parent's position.<br />
2386         /// Default is to inherit.<br />
2387         /// 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 />
2388         /// </summary>
2389         /// <since_tizen> 3 </since_tizen>
2390         public bool InheritPosition
2391         {
2392             get
2393             {
2394                 return (bool)GetValue(InheritPositionProperty);
2395             }
2396             set
2397             {
2398                 SetValue(InheritPositionProperty, value);
2399                 NotifyPropertyChanged();
2400             }
2401         }
2402
2403         /// <summary>
2404         /// Gets or sets the clipping behavior (mode) of it's children.
2405         /// </summary>
2406         /// <since_tizen> 3 </since_tizen>
2407         public ClippingModeType ClippingMode
2408         {
2409             get
2410             {
2411                 return (ClippingModeType)GetValue(ClippingModeProperty);
2412             }
2413             set
2414             {
2415                 SetValue(ClippingModeProperty, value);
2416                 NotifyPropertyChanged();
2417             }
2418         }
2419
2420         /// <summary>
2421         /// Gets the number of renderers held by the view.
2422         /// </summary>
2423         /// <since_tizen> 3 </since_tizen>
2424         public uint RendererCount
2425         {
2426             get
2427             {
2428                 return GetRendererCount();
2429             }
2430         }
2431
2432         /// <summary>
2433         /// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
2434         /// </summary>
2435         /// <remarks>
2436         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2437         /// </remarks>
2438         /// <since_tizen> 3 </since_tizen>
2439         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
2440             "Like: " +
2441             "View view = new View(); " +
2442             "view.PivotPoint = PivotPoint.Center; " +
2443             "view.PositionUsesPivotPoint = true;")]
2444         [EditorBrowsable(EditorBrowsableState.Never)]
2445         public Position AnchorPoint
2446         {
2447             get
2448             {
2449                 return GetValue(AnchorPointProperty) as Position;
2450             }
2451             set
2452             {
2453                 SetValue(AnchorPointProperty, value);
2454             }
2455         }
2456
2457         private Position InternalAnchorPoint
2458         {
2459             get
2460             {
2461 #if NUI_VISUAL_PROPERTY_CHANGE_1
2462                 return GetCurrentAnchorPoint();
2463 #else
2464                 Position temp = new Position(0.0f, 0.0f, 0.0f);
2465                 var pValue = GetProperty(View.Property.AnchorPoint);
2466                 pValue.Get(temp);
2467                 pValue.Dispose();
2468                 Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
2469                 temp.Dispose();
2470                 return ret;
2471 #endif
2472             }
2473             set
2474             {
2475 #if NUI_VISUAL_PROPERTY_CHANGE_1
2476                 SetAnchorPoint(value);
2477 #else
2478                 var temp = new Tizen.NUI.PropertyValue(value);
2479                 SetProperty(View.Property.AnchorPoint, temp);
2480                 temp.Dispose();
2481 #endif
2482                 NotifyPropertyChanged();
2483             }
2484         }
2485
2486         /// <summary>
2487         /// Sets the size of a view for the width, the height and the depth.<br />
2488         /// Geometry can be scaled to fit within this area.<br />
2489         /// This does not interfere with the view's scale factor.<br />
2490         /// The views default depth is the minimum of width and height.<br />
2491         /// </summary>
2492         /// <remarks>
2493         /// <para>
2494         /// Animatable - This property can be animated using <c>Animation</c> class.
2495         /// <code>
2496         /// animation.AnimateTo(view, "Size", new Size(100, 100));
2497         /// </code>
2498         /// </para>
2499         /// The property cascade chaining set is not recommended.
2500         /// </remarks>
2501         /// <example>
2502         /// This way is recommended for setting the property
2503         /// <code>
2504         /// var view = new View();
2505         /// view.Size = new Size(100.5f, 200, 0);
2506         /// </code>
2507         /// This way to set the property is prohibited
2508         /// <code>
2509         /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2510         /// </code>
2511         /// </example>
2512         /// <since_tizen> 5 </since_tizen>
2513         public Size Size
2514         {
2515             get
2516             {
2517                 return (Size)GetValue(SizeProperty);
2518             }
2519             set
2520             {
2521                 SetValue(SizeProperty, value);
2522                 NotifyPropertyChanged();
2523             }
2524         }
2525
2526         /// <summary>
2527         /// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
2528         /// </summary>
2529         /// <since_tizen> 3 </since_tizen>
2530         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
2531             "Like: " +
2532             "Container parent =  view.GetParent(); " +
2533             "View view = parent as View;")]
2534         [EditorBrowsable(EditorBrowsableState.Never)]
2535         public new View Parent
2536         {
2537             get
2538             {
2539                 View ret;
2540                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2541                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2542                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2543
2544                 if (basehandle is Layer layer)
2545                 {
2546                     ret = new View(Layer.getCPtr(layer).Handle, false);
2547                     NUILog.Error("This Parent property is deprecated, should do not be used");
2548                 }
2549                 else
2550                 {
2551                     ret = basehandle as View;
2552                 }
2553
2554                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2555                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2556
2557                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2558                 return ret;
2559             }
2560         }
2561
2562         /// <summary>
2563         /// Gets/Sets whether inherit parent's the layout Direction.
2564         /// </summary>
2565         /// <since_tizen> 4 </since_tizen>
2566         public bool InheritLayoutDirection
2567         {
2568             get
2569             {
2570                 return (bool)GetValue(InheritLayoutDirectionProperty);
2571             }
2572             set
2573             {
2574                 SetValue(InheritLayoutDirectionProperty, value);
2575                 NotifyPropertyChanged();
2576             }
2577         }
2578
2579         /// <summary>
2580         /// Gets/Sets the layout Direction.
2581         /// </summary>
2582         /// <since_tizen> 4 </since_tizen>
2583         public ViewLayoutDirectionType LayoutDirection
2584         {
2585             get
2586             {
2587                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2588             }
2589             set
2590             {
2591                 SetValue(LayoutDirectionProperty, value);
2592                 NotifyPropertyChanged();
2593                 layout?.RequestLayout();
2594             }
2595         }
2596
2597         /// <summary>
2598         /// Gets or sets the Margin for use in layout.
2599         /// </summary>
2600         /// <remarks>
2601         /// Margin property is supported by Layout algorithms and containers.
2602         /// Please Set Layout if you want to use Margin property.
2603         /// The property cascade chaining set is not recommended.
2604         /// </remarks>
2605         /// <example>
2606         /// This way is recommended for setting the property
2607         /// <code>
2608         /// var view = new View();
2609         /// view.Margin = new Extents(10, 5, 15, 20);
2610         /// </code>
2611         /// This way to set the property is prohibited
2612         /// <code>
2613         /// view.Margin.Top = 15; //This does not guarantee a proper operation
2614         /// </code>
2615         /// </example>
2616         /// <since_tizen> 4 </since_tizen>
2617         public Extents Margin
2618         {
2619             get
2620             {
2621                 return (Extents)GetValue(MarginProperty);
2622             }
2623             set
2624             {
2625                 SetValue(MarginProperty, value);
2626                 NotifyPropertyChanged();
2627             }
2628         }
2629
2630         ///<summary>
2631         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2632         ///</summary>
2633         /// <example>
2634         /// <code>
2635         /// // matchParentView matches its size to its parent size.
2636         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2637         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2638         ///
2639         /// // wrapContentView wraps its children with their desired size.
2640         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2641         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2642         ///
2643         /// // exactSizeView shows itself with an exact size.
2644         /// exactSizeView.WidthSpecification = 100;
2645         /// exactSizeView.HeightSpecification = 100;
2646         /// </code>
2647         /// </example>
2648         /// <since_tizen> 6 </since_tizen>
2649         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2650         public int WidthSpecification
2651         {
2652             get
2653             {
2654                 return (int)GetValue(WidthSpecificationProperty);
2655             }
2656             set
2657             {
2658                 SetValue(WidthSpecificationProperty, value);
2659                 NotifyPropertyChanged();
2660             }
2661         }
2662
2663         private int InternalWidthSpecification
2664         {
2665             get
2666             {
2667                 return widthPolicy;
2668             }
2669             set
2670             {
2671                 if (value == widthPolicy)
2672                     return;
2673
2674                 widthPolicy = value;
2675                 if (widthPolicy >= 0)
2676                 {
2677                     if (heightPolicy >= 0) // Policy an exact value
2678                     {
2679                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
2680                         Size2D = new Size2D(widthPolicy, heightPolicy);
2681                     }
2682                 }
2683                 layout?.RequestLayout();
2684             }
2685         }
2686
2687         ///<summary>
2688         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2689         ///</summary>
2690         /// <example>
2691         /// <code>
2692         /// // matchParentView matches its size to its parent size.
2693         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2694         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2695         ///
2696         /// // wrapContentView wraps its children with their desired size.
2697         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2698         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2699         ///
2700         /// // exactSizeView shows itself with an exact size.
2701         /// exactSizeView.WidthSpecification = 100;
2702         /// exactSizeView.HeightSpecification = 100;
2703         /// </code>
2704         /// </example>
2705         /// <since_tizen> 6 </since_tizen>
2706         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2707         public int HeightSpecification
2708         {
2709             get
2710             {
2711                 return (int)GetValue(HeightSpecificationProperty);
2712             }
2713             set
2714             {
2715                 SetValue(HeightSpecificationProperty, value);
2716                 NotifyPropertyChanged();
2717             }
2718         }
2719
2720         private int InternalHeightSpecification
2721         {
2722             get
2723             {
2724                 return heightPolicy;
2725             }
2726             set
2727             {
2728                 if (value == heightPolicy)
2729                     return;
2730
2731                 heightPolicy = value;
2732                 if (heightPolicy >= 0)
2733                 {
2734                     if (widthPolicy >= 0) // Policy an exact value
2735                     {
2736                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
2737                         Size2D = new Size2D(widthPolicy, heightPolicy);
2738                     }
2739                 }
2740                 layout?.RequestLayout();
2741             }
2742         }
2743
2744         ///<summary>
2745         /// Gets the List of transitions for this View.
2746         ///</summary>
2747         /// <since_tizen> 6 </since_tizen>
2748         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2749         {
2750             get
2751             {
2752                 if (layoutTransitions == null)
2753                 {
2754                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2755                 }
2756                 return layoutTransitions;
2757             }
2758         }
2759
2760         ///<summary>
2761         /// Sets a layout transitions for this View.
2762         ///</summary>
2763         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2764         /// <remarks>
2765         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2766         /// </remarks>
2767         /// <since_tizen> 6 </since_tizen>
2768         public LayoutTransition LayoutTransition
2769         {
2770             get
2771             {
2772                 return GetValue(LayoutTransitionProperty) as LayoutTransition;
2773             }
2774             set
2775             {
2776                 SetValue(LayoutTransitionProperty, value);
2777                 NotifyPropertyChanged();
2778             }
2779         }
2780
2781         private LayoutTransition InternalLayoutTransition
2782         {
2783             get
2784             {
2785                 return layoutTransition;
2786             }
2787             set
2788             {
2789                 if (value == null)
2790                 {
2791                     throw new global::System.ArgumentNullException(nameof(value));
2792                 }
2793                 if (layoutTransitions == null)
2794                 {
2795                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2796                 }
2797
2798                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
2799
2800                 AttachTransitionsToChildren(value);
2801
2802                 layoutTransition = value;
2803             }
2804         }
2805
2806         /// <summary>
2807         /// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
2808         /// </summary>
2809         /// <remarks>
2810         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2811         /// </remarks>
2812         /// <since_tizen> 4 </since_tizen>
2813         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
2814         [EditorBrowsable(EditorBrowsableState.Never)]
2815         public Extents PaddingEX
2816         {
2817             get
2818             {
2819                 return GetValue(PaddingEXProperty) as Extents;
2820             }
2821             set
2822             {
2823                 SetValue(PaddingEXProperty, value);
2824             }
2825         }
2826
2827         private Extents InternalPaddingEX
2828         {
2829             get
2830             {
2831                 Extents temp = new Extents(0, 0, 0, 0);
2832                 var pValue = GetProperty(View.Property.PADDING);
2833                 pValue.Get(temp);
2834                 pValue.Dispose();
2835                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2836                 temp.Dispose();
2837                 return ret;
2838             }
2839             set
2840             {
2841                 var temp = new Tizen.NUI.PropertyValue(value);
2842                 SetProperty(View.Property.PADDING, temp);
2843                 temp.Dispose();
2844                 NotifyPropertyChanged();
2845                 layout?.RequestLayout();
2846             }
2847         }
2848
2849         /// <summary>
2850         /// The Color of View. This is an RGBA value.
2851         /// Each RGBA components match as <see cref="ColorRed"/>, <see cref="ColorGreen"/>, <see cref="ColorBlue"/>, and <see cref="Opacity"/>.
2852         /// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
2853         /// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
2854         /// Inherient of color value depend on <see cref="ColorMode"/>.
2855         /// </summary>
2856         /// <remarks>
2857         /// <para>
2858         /// Animatable - This property can be animated using <c>Animation</c> class.
2859         /// </para>
2860         /// The property cascade chaining set is not recommended.
2861         /// </remarks>
2862         /// <example>
2863         /// This way is recommended for setting the property
2864         /// <code>
2865         /// var view = new View();
2866         /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
2867         /// </code>
2868         /// This way to set the property is prohibited
2869         /// <code>
2870         /// view.Color.A = 0.5f; //This does not guarantee a proper operation
2871         /// </code>
2872         /// </example>
2873         [EditorBrowsable(EditorBrowsableState.Never)]
2874         public Color Color
2875         {
2876             get
2877             {
2878                 return (Color)GetValue(ColorProperty);
2879             }
2880             set
2881             {
2882                 SetValue(ColorProperty, value);
2883                 NotifyPropertyChanged();
2884             }
2885         }
2886
2887         /// <summary>
2888         /// The Red component of View.Color.
2889         /// </summary>
2890         /// <remarks>
2891         /// <para>
2892         /// Animatable - This property can be animated using <c>Animation</c> class.
2893         /// </para>
2894         /// </remarks>
2895         [EditorBrowsable(EditorBrowsableState.Never)]
2896         public float ColorRed
2897         {
2898             get
2899             {
2900                 return (float)GetValue(ColorRedProperty);
2901             }
2902             set
2903             {
2904                 SetValue(ColorRedProperty, value);
2905                 NotifyPropertyChanged();
2906             }
2907         }
2908
2909         /// <summary>
2910         /// The Green component of View.Color.
2911         /// </summary>
2912         /// <remarks>
2913         /// <para>
2914         /// Animatable - This property can be animated using <c>Animation</c> class.
2915         /// </para>
2916         /// </remarks>
2917         [EditorBrowsable(EditorBrowsableState.Never)]
2918         public float ColorGreen
2919         {
2920             get
2921             {
2922                 return (float)GetValue(ColorGreenProperty);
2923             }
2924             set
2925             {
2926                 SetValue(ColorGreenProperty, value);
2927                 NotifyPropertyChanged();
2928             }
2929         }
2930
2931         /// <summary>
2932         /// The Blue component of View.Color.
2933         /// </summary>
2934         /// <remarks>
2935         /// <para>
2936         /// Animatable - This property can be animated using <c>Animation</c> class.
2937         /// </para>
2938         /// </remarks>
2939         [EditorBrowsable(EditorBrowsableState.Never)]
2940         public float ColorBlue
2941         {
2942             get
2943             {
2944                 return (float)GetValue(ColorBlueProperty);
2945             }
2946             set
2947             {
2948                 SetValue(ColorBlueProperty, value);
2949                 NotifyPropertyChanged();
2950             }
2951         }
2952
2953         /// <summary>
2954         /// Set the layout on this View. Replaces any existing Layout.
2955         /// </summary>
2956         /// <remarks>
2957         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
2958         /// </remarks>
2959         /// <since_tizen> 6 </since_tizen>
2960         public LayoutItem Layout
2961         {
2962             get
2963             {
2964                 return GetValue(LayoutProperty) as LayoutItem;
2965             }
2966             set
2967             {
2968                 SetValue(LayoutProperty, value);
2969             }
2970         }
2971
2972         private LayoutItem InternalLayout
2973         {
2974             get
2975             {
2976                 return layout;
2977             }
2978             set
2979             {
2980                 // Do nothing if layout provided is already set on this View.
2981                 if (value == layout)
2982                 {
2983                     return;
2984                 }
2985
2986                 LayoutingDisabled = false;
2987                 layoutSet = true;
2988
2989                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2990                 // First check if the layout to be set already has a owner.
2991                 if (value?.Owner != null)
2992                 {
2993                     // Previous owner of the layout gets a default layout as a replacement.
2994                     value.Owner.Layout = new AbsoluteLayout()
2995                     {
2996                         // Copy Margin and Padding to replacement LayoutGroup.
2997                         Margin = value.Margin,
2998                         Padding = value.Padding,
2999                     };
3000                 }
3001
3002                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3003                 // View if no replacement. Previously margin and padding values would have been moved from
3004                 // the View to the layout.
3005                 if (layout != null) // Existing layout
3006                 {
3007                     if (value != null)
3008                     {
3009                         // Existing layout being replaced so copy over margin and padding values.
3010                         value.Margin = layout.Margin;
3011                         value.Padding = layout.Padding;
3012                         value.SetPositionByLayout = !excludeLayouting;
3013                     }
3014                     else
3015                     {
3016                         // Layout not being replaced so restore margin and padding to View.
3017                         SetValue(MarginProperty, layout.Margin);
3018                         SetValue(PaddingProperty, layout.Padding);
3019                         NotifyPropertyChanged();
3020                     }
3021                 }
3022                 else
3023                 {
3024                     // First Layout to be added to the View hence copy
3025
3026                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3027                     if (value != null)
3028                     {
3029                         Extents margin = Margin;
3030                         Extents padding = Padding;
3031                         bool setMargin = false;
3032                         bool setPadding = false;
3033
3034                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
3035                         {
3036                             // If View already has a margin set then store it in Layout instead.
3037                             value.Margin = margin;
3038                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
3039                             setMargin = true;
3040                         }
3041
3042                         if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
3043                         {
3044                             // If View already has a padding set then store it in Layout instead.
3045                             value.Padding = padding;
3046                             SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
3047                             setPadding = true;
3048                         }
3049
3050                         if (setMargin || setPadding)
3051                         {
3052                             NotifyPropertyChanged();
3053                         }
3054
3055                         value.SetPositionByLayout = !excludeLayouting;
3056                     }
3057                 }
3058
3059                 // Remove existing layout from it's parent layout group.
3060                 layout?.Unparent();
3061
3062                 // Set layout to this view
3063                 SetLayout(value);
3064             }
3065         }
3066
3067         /// <summary>
3068         /// The weight of the View, used to share available space in a layout with siblings.
3069         /// </summary>
3070         /// <since_tizen> 6 </since_tizen>
3071         public float Weight
3072         {
3073             get
3074             {
3075                 return weight;
3076             }
3077             set
3078             {
3079                 weight = value;
3080                 layout?.RequestLayout();
3081             }
3082         }
3083
3084         /// <summary>
3085         ///  Whether to load the BackgroundImage synchronously.
3086         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3087         ///  Note: For Normal Quad images only.
3088         /// </summary>
3089         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3090         [EditorBrowsable(EditorBrowsableState.Never)]
3091         public bool BackgroundImageSynchronosLoading
3092         {
3093             get
3094             {
3095                 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
3096             }
3097             set
3098             {
3099                 SetValue(BackgroundImageSynchronosLoadingProperty, value);
3100                 NotifyPropertyChanged();
3101             }
3102         }
3103
3104         private bool InternalBackgroundImageSynchronosLoading
3105         {
3106             get
3107             {
3108                 return BackgroundImageSynchronousLoading;
3109             }
3110             set
3111             {
3112                 BackgroundImageSynchronousLoading = value;
3113             }
3114         }
3115
3116         /// <summary>
3117         ///  Whether to load the BackgroundImage synchronously.
3118         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3119         ///  Note: For Normal Quad images only.
3120         /// </summary>
3121         /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3122         [EditorBrowsable(EditorBrowsableState.Never)]
3123         public bool BackgroundImageSynchronousLoading
3124         {
3125             get
3126             {
3127                 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
3128             }
3129             set
3130             {
3131                 SetValue(BackgroundImageSynchronousLoadingProperty, value);
3132                 NotifyPropertyChanged();
3133             }
3134         }
3135
3136         private bool InternalBackgroundImageSynchronousLoading
3137         {
3138             get
3139             {
3140                 return backgroundImageSynchronousLoading;
3141             }
3142             set
3143             {
3144                 backgroundImageSynchronousLoading = value;
3145
3146 #if NUI_VISUAL_PROPERTY_CHANGE_1
3147                 if (!string.IsNullOrEmpty(BackgroundImage))
3148 #else
3149                 string bgUrl = null;
3150                 var pValue = Background.Find(ImageVisualProperty.URL);
3151                 pValue?.Get(out bgUrl);
3152                 pValue?.Dispose();
3153
3154                 if (!string.IsNullOrEmpty(bgUrl))
3155 #endif
3156                 {
3157                     PropertyMap bgMap = this.Background;
3158                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
3159                     bgMap[ImageVisualProperty.SynchronousLoading] = temp;
3160                     temp.Dispose();
3161                     Background = bgMap;
3162                 }
3163             }
3164         }
3165
3166         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3167         [EditorBrowsable(EditorBrowsableState.Never)]
3168         public Vector4 UpdateAreaHint
3169         {
3170             get
3171             {
3172                 return (Vector4)GetValue(UpdateAreaHintProperty);
3173             }
3174             set
3175             {
3176                 SetValue(UpdateAreaHintProperty, value);
3177                 NotifyPropertyChanged();
3178             }
3179         }
3180
3181         /// <summary>
3182         /// Enable/Disable ControlState propagation for children.
3183         /// It is false by default.
3184         /// If the View needs to share ControlState with descendants, please set it true.
3185         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
3186         /// </summary>
3187         [EditorBrowsable(EditorBrowsableState.Never)]
3188         public bool EnableControlStatePropagation
3189         {
3190             get
3191             {
3192                 return (bool)GetValue(EnableControlStatePropagationProperty);
3193             }
3194             set
3195             {
3196                 SetValue(EnableControlStatePropagationProperty, value);
3197                 NotifyPropertyChanged();
3198             }
3199         }
3200
3201         private bool InternalEnableControlStatePropagation
3202         {
3203             get => themeData?.ControlStatePropagation ?? false;
3204             set
3205             {
3206                 if (InternalEnableControlStatePropagation == value) return;
3207
3208                 if (themeData == null) themeData = new ThemeData();
3209
3210                 themeData.ControlStatePropagation = value;
3211
3212                 foreach (View child in Children)
3213                 {
3214                     child.EnableControlStatePropagation = value;
3215                 }
3216             }
3217         }
3218
3219         /// <summary>
3220         /// The ControlStates can propagate from the parent.
3221         /// Listed ControlStates will be accepted propagation of the parent ControlState changes
3222         /// if parent view EnableControlState is true.
3223         /// <see cref="EnableControlState"/>.
3224         /// Default is ControlState.All, so every ControlStates will be propagated from the parent.
3225         /// </summary>
3226         [EditorBrowsable(EditorBrowsableState.Never)]
3227         public ControlState PropagatableControlStates
3228         {
3229             get
3230             {
3231                 return (ControlState)GetValue(PropagatableControlStatesProperty);
3232             }
3233             set
3234             {
3235                 SetValue(PropagatableControlStatesProperty, value);
3236                 NotifyPropertyChanged();
3237             }
3238         }
3239
3240         private ControlState InternalPropagatableControlStates
3241         {
3242             get => propagatableControlStates;
3243             set => propagatableControlStates = value;
3244         }
3245
3246         /// <summary>
3247         /// By default, it is false in View, true in Control.
3248         /// Note that if the value is true, the View will be a touch receptor.
3249         /// </summary>
3250         [EditorBrowsable(EditorBrowsableState.Never)]
3251         public bool EnableControlState
3252         {
3253             get
3254             {
3255                 return (bool)GetValue(EnableControlStateProperty);
3256             }
3257             set
3258             {
3259                 SetValue(EnableControlStateProperty, value);
3260             }
3261         }
3262
3263         /// <summary>
3264         /// Whether the actor grab all touches even if touch leaves its boundary.
3265         /// </summary>
3266         /// <returns>true, if it grab all touch after start</returns>
3267         [EditorBrowsable(EditorBrowsableState.Never)]
3268         public bool GrabTouchAfterLeave
3269         {
3270             get
3271             {
3272                 return (bool)GetValue(GrabTouchAfterLeaveProperty);
3273             }
3274             set
3275             {
3276                 SetValue(GrabTouchAfterLeaveProperty, value);
3277             }
3278         }
3279
3280         private bool InternalGrabTouchAfterLeave
3281         {
3282             get
3283             {
3284 #if NUI_VISUAL_PROPERTY_CHANGE_1
3285                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
3286 #else
3287                 bool temp = false;
3288                 var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
3289                 pValue.Get(out temp);
3290                 pValue.Dispose();
3291                 return temp;
3292 #endif
3293             }
3294             set
3295             {
3296 #if NUI_VISUAL_PROPERTY_CHANGE_1
3297                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
3298 #else
3299                 var temp = new Tizen.NUI.PropertyValue(value);
3300                 SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
3301                 temp.Dispose();
3302 #endif
3303                 NotifyPropertyChanged();
3304             }
3305         }
3306
3307         /// <summary>
3308         /// Whether the view will only receive own touch.
3309         /// </summary>
3310         /// <returns>true, if it only receives touches that started from itself.</returns>
3311         [EditorBrowsable(EditorBrowsableState.Never)]
3312         public bool AllowOnlyOwnTouch
3313         {
3314             get
3315             {
3316                 return (bool)GetValue(AllowOnlyOwnTouchProperty);
3317             }
3318             set
3319             {
3320                 SetValue(AllowOnlyOwnTouchProperty, value);
3321             }
3322         }
3323
3324         private bool InternalAllowOnlyOwnTouch
3325         {
3326             get
3327             {
3328 #if NUI_VISUAL_PROPERTY_CHANGE_1
3329                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
3330 #else
3331                 bool temp = false;
3332                 var pValue = GetProperty(View.Property.AllowOnlyOwnTouch);
3333                 pValue.Get(out temp);
3334                 pValue.Dispose();
3335                 return temp;
3336 #endif
3337             }
3338             set
3339             {
3340 #if NUI_VISUAL_PROPERTY_CHANGE_1
3341                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
3342 #else
3343                 var temp = new Tizen.NUI.PropertyValue(value);
3344                 SetProperty(View.Property.AllowOnlyOwnTouch, temp);
3345                 temp.Dispose();
3346 #endif
3347                 NotifyPropertyChanged();
3348             }
3349         }
3350
3351         /// <summary>
3352         /// Determines which blend equation will be used to render renderers of this actor.
3353         /// </summary>
3354         /// <returns>blend equation enum currently assigned</returns>
3355         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
3356         [EditorBrowsable(EditorBrowsableState.Never)]
3357         public BlendEquationType BlendEquation
3358         {
3359             get
3360             {
3361                 return (BlendEquationType)GetValue(BlendEquationProperty);
3362             }
3363             set
3364             {
3365                 SetValue(BlendEquationProperty, value);
3366             }
3367         }
3368
3369         private BlendEquationType InternalBlendEquation
3370         {
3371             get
3372             {
3373 #if NUI_VISUAL_PROPERTY_CHANGE_1
3374                 return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
3375 #else
3376                 int temp = 0;
3377                 var pValue = GetProperty(View.Property.BlendEquation);
3378                 pValue.Get(out temp);
3379                 pValue.Dispose();
3380                 return (BlendEquationType)temp;
3381 #endif
3382             }
3383             set
3384             {
3385 #if NUI_VISUAL_PROPERTY_CHANGE_1
3386                 Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
3387 #else
3388                 var temp = new Tizen.NUI.PropertyValue((int)value);
3389                 SetProperty(View.Property.BlendEquation, temp);
3390                 temp.Dispose();
3391 #endif
3392                 NotifyPropertyChanged();
3393             }
3394         }
3395
3396         /// <summary>
3397         /// If the value is true, the View will change its style as the theme changes.
3398         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3399         /// </summary>
3400         /// <since_tizen> 9 </since_tizen>
3401         public bool ThemeChangeSensitive
3402         {
3403             get => (bool)GetValue(ThemeChangeSensitiveProperty);
3404             set => SetValue(ThemeChangeSensitiveProperty, value);
3405         }
3406
3407         /// <summary>
3408         /// Create Style, it is abstract function and must be override.
3409         /// </summary>
3410         [EditorBrowsable(EditorBrowsableState.Never)]
3411         protected virtual ViewStyle CreateViewStyle()
3412         {
3413             return new ViewStyle();
3414         }
3415
3416         /// <summary>
3417         /// Called after the View's ControlStates changed.
3418         /// </summary>
3419         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3420         [EditorBrowsable(EditorBrowsableState.Never)]
3421         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3422         {
3423         }
3424
3425         /// <summary>
3426         /// </summary>
3427         [EditorBrowsable(EditorBrowsableState.Never)]
3428         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3429         {
3430             isThemeChanged = true;
3431             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3432             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3433             isThemeChanged = false;
3434         }
3435
3436         /// <summary>
3437         /// Apply style instance to the view.
3438         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3439         /// </summary>
3440         /// <since_tizen> 9 </since_tizen>
3441         public virtual void ApplyStyle(ViewStyle viewStyle)
3442         {
3443             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3444
3445             if (themeData == null) themeData = new ThemeData();
3446
3447             themeData.viewStyle = viewStyle;
3448
3449             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3450             {
3451                 // Nothing to apply
3452                 return;
3453             }
3454
3455             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3456
3457             if (bindablePropertyOfView == null)
3458             {
3459                 return;
3460             }
3461
3462             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3463             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3464
3465             foreach (var sourceProperty in dirtyStyleProperties)
3466             {
3467                 var sourceValue = viewStyle.GetValue(sourceProperty);
3468
3469                 if (sourceValue == null)
3470                 {
3471                     continue;
3472                 }
3473
3474                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3475
3476                 // Do not set value again when theme is changed and the value has been set already.
3477                 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3478                 {
3479                     continue;
3480                 }
3481
3482                 if (destinationProperty != null)
3483                 {
3484                     InternalSetValue(destinationProperty, sourceValue);
3485                 }
3486             }
3487         }
3488
3489         /// <summary>
3490         /// Get whether the View is culled or not.
3491         /// True means that the View is out of the view frustum.
3492         /// </summary>
3493         /// <remarks>
3494         /// Hidden-API (Inhouse-API).
3495         /// </remarks>
3496         [EditorBrowsable(EditorBrowsableState.Never)]
3497         public bool Culled
3498         {
3499             get
3500             {
3501 #if NUI_VISUAL_PROPERTY_CHANGE_1
3502                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
3503 #else
3504                 bool temp = false;
3505                 var pValue = GetProperty(View.Property.Culled);
3506                 pValue.Get(out temp);
3507                 pValue.Dispose();
3508                 return temp;
3509 #endif
3510             }
3511         }
3512
3513         /// <summary>
3514         /// Set or Get TransitionOptions for the page transition.
3515         /// This property is used to define how this view will be transitioned during Page switching.
3516         /// </summary>
3517         /// <since_tizen> 9 </since_tizen>
3518         public TransitionOptions TransitionOptions
3519         {
3520             get
3521             {
3522                 return GetValue(TransitionOptionsProperty) as TransitionOptions;
3523             }
3524             set
3525             {
3526                 SetValue(TransitionOptionsProperty, value);
3527                 NotifyPropertyChanged();
3528             }
3529         }
3530
3531         private TransitionOptions InternalTransitionOptions
3532         {
3533             set
3534             {
3535                 transitionOptions = value;
3536             }
3537             get
3538             {
3539                 return transitionOptions;
3540             }
3541         }
3542
3543         /// <summary>
3544         /// Gets or sets the status of whether the view should emit key event signals.
3545         /// If a View's DispatchKeyEvents is set to false, then itself and parents will not receive key event signals.
3546         /// </summary>
3547         [EditorBrowsable(EditorBrowsableState.Never)]
3548         public bool DispatchKeyEvents
3549         {
3550             get
3551             {
3552                 return (bool)GetValue(DispatchKeyEventsProperty);
3553             }
3554             set
3555             {
3556                 SetValue(DispatchKeyEventsProperty, value);
3557                 NotifyPropertyChanged();
3558             }
3559         }
3560
3561         /// <summary>
3562         /// Gets or sets the status of whether touch events can be dispatched.
3563         /// 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.
3564         /// This works without adding a TouchEvent callback in the View.
3565         /// <note>
3566         /// 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.
3567         /// </note>
3568         /// </summary>
3569         [EditorBrowsable(EditorBrowsableState.Never)]
3570         public bool DispatchTouchEvents
3571         {
3572             get
3573             {
3574                 return dispatchTouchEvents;
3575             }
3576             set
3577             {
3578                 if (dispatchTouchEvents != value)
3579                 {
3580                     dispatchTouchEvents = value;
3581                     if (dispatchTouchEvents == false)
3582                     {
3583                         TouchEvent += OnDispatchTouchEvent;
3584                     }
3585                     else
3586                     {
3587                         TouchEvent -= OnDispatchTouchEvent;
3588                     }
3589                 }
3590             }
3591         }
3592
3593         private bool OnDispatchTouchEvent(object source, View.TouchEventArgs e)
3594         {
3595             return true;
3596         }
3597
3598         /// <summary>
3599         /// Gets or sets the status of whether the view should emit Gesture event signals.
3600         /// If a View's DispatchGestureEvents is set to false, then itself and parents will not receive all gesture event signals.
3601         /// The itself and parents does not receive tap, pinch, pan, rotation, or longpress gestures.
3602         /// </summary>
3603         [EditorBrowsable(EditorBrowsableState.Never)]
3604         public bool DispatchGestureEvents
3605         {
3606             get
3607             {
3608                 return dispatchGestureEvents;
3609             }
3610             set
3611             {
3612                 if (dispatchGestureEvents != value)
3613                 {
3614                     dispatchGestureEvents = value;
3615                     ConfigGestureDetector(dispatchGestureEvents);
3616                 }
3617             }
3618         }
3619
3620         /// <summary>
3621         /// Gets or sets the status of whether the view should emit Gesture event signals.
3622         /// If a View's DispatchParentGestureEvents is set to false, then parents will not receive all gesture event signals.
3623         /// The parents does not receive tap, pinch, pan, rotation, or longpress gestures.
3624         /// </summary>
3625         [EditorBrowsable(EditorBrowsableState.Never)]
3626         public bool DispatchParentGestureEvents
3627         {
3628             get
3629             {
3630                 return dispatchParentGestureEvents;
3631             }
3632             set
3633             {
3634                 if (dispatchParentGestureEvents != value)
3635                 {
3636                     dispatchParentGestureEvents = value;
3637                     ConfigGestureDetector(dispatchParentGestureEvents);
3638                 }
3639             }
3640         }
3641
3642         private void ConfigGestureDetector(bool dispatch)
3643         {
3644             if (panGestureDetector == null) panGestureDetector = new PanGestureDetector();
3645             if (longGestureDetector == null) longGestureDetector = new LongPressGestureDetector();
3646             if (pinchGestureDetector == null) pinchGestureDetector = new PinchGestureDetector();
3647             if (tapGestureDetector == null) tapGestureDetector = new TapGestureDetector();
3648             if (rotationGestureDetector == null) rotationGestureDetector = new RotationGestureDetector();
3649
3650             if (dispatch == true)
3651             {
3652                 configGestureCount = configGestureCount > 0 ? configGestureCount-- : 0;
3653                 if (configGestureCount == 0)
3654                 {
3655                     panGestureDetector.Detach(this);
3656                     longGestureDetector.Detach(this);
3657                     pinchGestureDetector.Detach(this);
3658                     tapGestureDetector.Detach(this);
3659                     rotationGestureDetector.Detach(this);
3660
3661                     panGestureDetector.Detected -= OnGestureDetected;
3662                     longGestureDetector.Detected -= OnGestureDetected;
3663                     pinchGestureDetector.Detected -= OnGestureDetected;
3664                     tapGestureDetector.Detected -= OnGestureDetected;
3665                     rotationGestureDetector.Detected -= OnGestureDetected;
3666
3667                     panGestureDetector = null;
3668                     longGestureDetector = null;
3669                     pinchGestureDetector = null;
3670                     tapGestureDetector = null;
3671                     rotationGestureDetector = null;
3672                 }
3673             }
3674             else
3675             {
3676                 if (configGestureCount == 0)
3677                 {
3678                     panGestureDetector.Attach(this);
3679                     longGestureDetector.Attach(this);
3680                     pinchGestureDetector.Attach(this);
3681                     tapGestureDetector.Attach(this);
3682                     rotationGestureDetector.Attach(this);
3683
3684                     panGestureDetector.Detected += OnGestureDetected;
3685                     longGestureDetector.Detected += OnGestureDetected;
3686                     pinchGestureDetector.Detected += OnGestureDetected;
3687                     tapGestureDetector.Detected += OnGestureDetected;
3688                     rotationGestureDetector.Detected += OnGestureDetected;
3689                 }
3690                 configGestureCount++;
3691             }
3692         }
3693
3694         private void OnGestureDetected(object source, EventArgs e)
3695         {
3696             // Does notting. This is to consume the gesture.
3697         }
3698
3699         /// <summary>
3700         /// Called when the view is hit through TouchEvent or GestureEvent.
3701         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
3702         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
3703         /// User can override whether hit or not in HitTest.
3704         /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
3705         /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
3706         /// </summary>
3707         // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
3708         [EditorBrowsable(EditorBrowsableState.Never)]
3709         protected virtual bool HitTest(Touch touch)
3710         {
3711             return true;
3712         }
3713
3714         /// <summary>
3715         /// Retrieve the View's current Color.
3716         /// </summary>
3717         /// <remarks>
3718         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
3719         /// 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).
3720         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
3721         /// and users can get the current actual values through them.
3722         /// </remarks>
3723         [EditorBrowsable(EditorBrowsableState.Never)]
3724         public Color CurrentColor => GetCurrentColor();
3725
3726         /// <summary>
3727         /// Retrieve the current scale factor applied to the View.
3728         /// </summary>
3729         /// <remarks>
3730         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
3731         /// 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).
3732         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
3733         /// and users can get the current actual values through them.
3734         /// </remarks>
3735         [EditorBrowsable(EditorBrowsableState.Never)]
3736         public Vector3 CurrentScale => GetCurrentScale();
3737
3738     }
3739 }