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