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