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