Make View.TooltipText return valid value
[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                     using var propertyMap = new PropertyMap();
860                     if (propertyValue != null && propertyValue.Get(propertyMap))
861                     {
862                         using var retrivedContentValue = propertyMap?.Find(NDalic.TooltipContent);
863                         if (retrivedContentValue != null)
864                         {
865                             using var contextPropertyMap = new PropertyMap();
866                             if (retrivedContentValue.Get(contextPropertyMap))
867                             {
868                                 using var retrivedTextValue = contextPropertyMap?.Find(NDalic.TextVisualText);
869                                 if (retrivedTextValue != null && retrivedTextValue.Get(out string retrivedValue))
870                                 {
871                                     return retrivedValue;
872                                 }
873                             }
874                         }
875                     }
876                     return "";
877                 }
878             }
879             set
880             {
881                 var temp = new Tizen.NUI.PropertyValue(value);
882                 SetProperty(View.Property.TOOLTIP, temp);
883                 temp.Dispose();
884                 NotifyPropertyChanged();
885             }
886         }
887
888         /// <summary>
889         /// The Child property of FlexContainer.<br />
890         /// The proportion of the free space in the container, the flex item will receive.<br />
891         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
892         /// </summary>
893         /// <since_tizen> 3 </since_tizen>
894         [Obsolete("Deprecated in API8, will be removed in API10.")]
895         public float Flex
896         {
897             get
898             {
899                 return (float)GetValue(FlexProperty);
900             }
901             set
902             {
903                 SetValue(FlexProperty, value);
904                 NotifyPropertyChanged();
905             }
906         }
907
908         /// <summary>
909         /// The Child property of FlexContainer.<br />
910         /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
911         /// </summary>
912         /// <since_tizen> 3 </since_tizen>
913         [Obsolete("Deprecated in API8, will be removed in API10.")]
914         public int AlignSelf
915         {
916             get
917             {
918                 return (int)GetValue(AlignSelfProperty);
919             }
920             set
921             {
922                 SetValue(AlignSelfProperty, value);
923                 NotifyPropertyChanged();
924             }
925         }
926
927         /// <summary>
928         /// The Child property of FlexContainer.<br />
929         /// The space around the flex item.<br />
930         /// </summary>
931         /// <remarks>
932         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
933         /// </remarks>
934         /// <since_tizen> 3 </since_tizen>
935         [Obsolete("Deprecated in API8, will be removed in API10.")]
936         public Vector4 FlexMargin
937         {
938             get
939             {
940                 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
941                 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
942             }
943             set
944             {
945                 SetValue(FlexMarginProperty, value);
946                 NotifyPropertyChanged();
947             }
948         }
949
950         /// <summary>
951         /// The top-left cell this child occupies, if not set, the first available cell is used.
952         /// </summary>
953         /// <remarks>
954         /// The property cascade chaining set is not recommended.
955         /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
956         /// </remarks>
957         /// <example>
958         /// This way is recommended for setting the property
959         /// <code>
960         /// var view = new View();
961         /// view.CellIndex = new Vector2(1, 3);
962         /// </code>
963         /// This way to set the property is prohibited
964         /// <code>
965         /// view.CellIndex.X = 1; //This does not guarantee a proper operation
966         /// </code>
967         /// </example>
968         /// <since_tizen> 3 </since_tizen>
969         public Vector2 CellIndex
970         {
971             get
972             {
973                 return (Vector2)GetValue(CellIndexProperty);
974             }
975             set
976             {
977                 SetValue(CellIndexProperty, value);
978                 NotifyPropertyChanged();
979             }
980         }
981
982         /// <summary>
983         /// The number of rows this child occupies, if not set, the default value is 1.
984         /// </summary>
985         /// <remarks>
986         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
987         /// </remarks>
988         /// <since_tizen> 3 </since_tizen>
989         public float RowSpan
990         {
991             get
992             {
993                 return (float)GetValue(RowSpanProperty);
994             }
995             set
996             {
997                 SetValue(RowSpanProperty, value);
998                 NotifyPropertyChanged();
999             }
1000         }
1001
1002         /// <summary>
1003         /// The number of columns this child occupies, if not set, the default value is 1.
1004         /// </summary>
1005         /// <remarks>
1006         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1007         /// </remarks>
1008         /// <since_tizen> 3 </since_tizen>
1009         public float ColumnSpan
1010         {
1011             get
1012             {
1013                 return (float)GetValue(ColumnSpanProperty);
1014             }
1015             set
1016             {
1017                 SetValue(ColumnSpanProperty, value);
1018                 NotifyPropertyChanged();
1019             }
1020         }
1021
1022         /// <summary>
1023         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1024         /// </summary>
1025         /// <remarks>
1026         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1027         /// </remarks>
1028         /// <since_tizen> 3 </since_tizen>
1029         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1030         {
1031             get
1032             {
1033                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
1034             }
1035             set
1036             {
1037                 SetValue(CellHorizontalAlignmentProperty, value);
1038                 NotifyPropertyChanged();
1039             }
1040         }
1041
1042         /// <summary>
1043         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1044         /// </summary>
1045         /// <remarks>
1046         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1047         /// </remarks>
1048         /// <since_tizen> 3 </since_tizen>
1049         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1050         {
1051             get
1052             {
1053                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
1054             }
1055             set
1056             {
1057                 SetValue(CellVerticalAlignmentProperty, value);
1058                 NotifyPropertyChanged();
1059             }
1060         }
1061
1062         /// <summary>
1063         /// The left focusable view.<br />
1064         /// This will return null if not set.<br />
1065         /// This will also return null if the specified left focusable view is not on a window.<br />
1066         /// </summary>
1067         /// <since_tizen> 3 </since_tizen>
1068         public View LeftFocusableView
1069         {
1070             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1071             get
1072             {
1073                 return (View)GetValue(LeftFocusableViewProperty);
1074             }
1075             set
1076             {
1077                 SetValue(LeftFocusableViewProperty, value);
1078                 NotifyPropertyChanged();
1079             }
1080         }
1081
1082         /// <summary>
1083         /// The right focusable view.<br />
1084         /// This will return null if not set.<br />
1085         /// This will also return null if the specified right focusable view is not on a window.<br />
1086         /// </summary>
1087         /// <since_tizen> 3 </since_tizen>
1088         public View RightFocusableView
1089         {
1090             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1091             get
1092             {
1093                 return (View)GetValue(RightFocusableViewProperty);
1094             }
1095             set
1096             {
1097                 SetValue(RightFocusableViewProperty, value);
1098                 NotifyPropertyChanged();
1099             }
1100         }
1101
1102         /// <summary>
1103         /// The up focusable view.<br />
1104         /// This will return null if not set.<br />
1105         /// This will also return null if the specified up focusable view is not on a window.<br />
1106         /// </summary>
1107         /// <since_tizen> 3 </since_tizen>
1108         public View UpFocusableView
1109         {
1110             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1111             get
1112             {
1113                 return (View)GetValue(UpFocusableViewProperty);
1114             }
1115             set
1116             {
1117                 SetValue(UpFocusableViewProperty, value);
1118                 NotifyPropertyChanged();
1119             }
1120         }
1121
1122         /// <summary>
1123         /// The down focusable view.<br />
1124         /// This will return null if not set.<br />
1125         /// This will also return null if the specified down focusable view is not on a window.<br />
1126         /// </summary>
1127         /// <since_tizen> 3 </since_tizen>
1128         public View DownFocusableView
1129         {
1130             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1131             get
1132             {
1133                 return (View)GetValue(DownFocusableViewProperty);
1134             }
1135             set
1136             {
1137                 SetValue(DownFocusableViewProperty, value);
1138                 NotifyPropertyChanged();
1139             }
1140         }
1141
1142         /// <summary>
1143         /// The clockwise focusable view by rotary wheel.<br />
1144         /// This will return null if not set.<br />
1145         /// This will also return null if the specified clockwise focusable view is not on a window.<br />
1146         /// </summary>
1147         [EditorBrowsable(EditorBrowsableState.Never)]
1148         public View ClockwiseFocusableView
1149         {
1150             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1151             get
1152             {
1153                 return (View)GetValue(ClockwiseFocusableViewProperty);
1154             }
1155             set
1156             {
1157                 SetValue(ClockwiseFocusableViewProperty, value);
1158                 NotifyPropertyChanged();
1159             }
1160         }
1161
1162         /// <summary>
1163         /// The counter clockwise focusable view by rotary wheel.<br />
1164         /// This will return null if not set.<br />
1165         /// This will also return null if the specified counter clockwise focusable view is not on a window.<br />
1166         /// </summary>
1167         [EditorBrowsable(EditorBrowsableState.Never)]
1168         public View CounterClockwiseFocusableView
1169         {
1170             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1171             get
1172             {
1173                 return (View)GetValue(CounterClockwiseFocusableViewProperty);
1174             }
1175             set
1176             {
1177                 SetValue(CounterClockwiseFocusableViewProperty, value);
1178                 NotifyPropertyChanged();
1179             }
1180         }
1181
1182         /// <summary>
1183         /// Whether the view should be focusable by keyboard navigation.
1184         /// </summary>
1185         /// <since_tizen> 3 </since_tizen>
1186         public bool Focusable
1187         {
1188             set
1189             {
1190                 SetValue(FocusableProperty, value);
1191                 NotifyPropertyChanged();
1192             }
1193             get
1194             {
1195                 return (bool)GetValue(FocusableProperty);
1196             }
1197         }
1198
1199         /// <summary>
1200         /// 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.
1201         /// Note : Default value is true.
1202         /// </summary>
1203         [EditorBrowsable(EditorBrowsableState.Never)]
1204         public bool FocusableChildren
1205         {
1206             set
1207             {
1208                 SetValue(FocusableChildrenProperty, value);
1209                 NotifyPropertyChanged();
1210             }
1211             get
1212             {
1213                 return (bool)GetValue(FocusableChildrenProperty);
1214             }
1215         }
1216
1217         /// <summary>
1218         /// Whether this view can focus by touch.
1219         /// If Focusable is false, FocusableInTouch is disabled.
1220         /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
1221         /// </summary>
1222         [EditorBrowsable(EditorBrowsableState.Never)]
1223         public bool FocusableInTouch
1224         {
1225             set
1226             {
1227                 SetValue(FocusableInTouchProperty, value);
1228                 NotifyPropertyChanged();
1229             }
1230             get
1231             {
1232                 return (bool)GetValue(FocusableInTouchProperty);
1233             }
1234         }
1235
1236         /// <summary>
1237         /// Retrieves the position of the view.
1238         /// The coordinates are relative to the view's parent.
1239         /// </summary>
1240         /// <remarks>
1241         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1242         /// 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).
1243         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1244         /// and users can get the current actual values through them.
1245         /// </remarks>
1246         /// <since_tizen> 3 </since_tizen>
1247         public Position CurrentPosition
1248         {
1249             get
1250             {
1251                 return GetCurrentPosition();
1252             }
1253         }
1254
1255         /// <summary>
1256         /// Sets the size of a view for the width and the height.<br />
1257         /// Geometry can be scaled to fit within this area.<br />
1258         /// This does not interfere with the view's scale factor.<br />
1259         /// The views default depth is the minimum of width and height.<br />
1260         /// </summary>
1261         /// <remarks>
1262         /// The property cascade chaining set is not recommended.
1263         /// </remarks>
1264         /// <example>
1265         /// This way is recommended for setting the property
1266         /// <code>
1267         /// var view = new View();
1268         /// view.Size2D = new Size2D(100, 200);
1269         /// </code>
1270         /// This way to set the property is prohibited
1271         /// <code>
1272         /// view.Size2D.Width = 100; //This does not guarantee a proper operation
1273         /// </code>
1274         /// </example>
1275         /// <since_tizen> 3 </since_tizen>
1276         public Size2D Size2D
1277         {
1278             get
1279             {
1280                 var temp = (Size2D)GetValue(Size2DProperty);
1281
1282                 if (this.Layout == null)
1283                 {
1284                     if (temp.Width < 0) { temp.Width = 0; }
1285                     if (temp.Height < 0) { temp.Height = 0; }
1286                 }
1287
1288                 return temp;
1289             }
1290             set
1291             {
1292                 SetValue(Size2DProperty, value);
1293
1294                 NotifyPropertyChanged();
1295             }
1296         }
1297
1298         /// <summary>
1299         /// Retrieves the size of the view.
1300         /// The coordinates are relative to the view's parent.
1301         /// </summary>
1302         /// <remarks>
1303         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1304         /// 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).
1305         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1306         /// and users can get the current actual values through them.
1307         /// </remarks>
1308         /// <since_tizen> 3 </since_tizen>
1309         public Size2D CurrentSize
1310         {
1311             get
1312             {
1313                 return GetCurrentSize();
1314             }
1315         }
1316
1317         /// <summary>
1318         /// Retrieves and sets the view's opacity.<br />
1319         /// </summary>
1320         /// <remarks>
1321         /// <para>
1322         /// Animatable - This property can be animated using <c>Animation</c> class.
1323         /// <code>
1324         /// animation.AnimateTo(view, "Opacity", 0.5f);
1325         /// </code>
1326         /// </para>
1327         /// </remarks>
1328         /// <since_tizen> 3 </since_tizen>
1329         public float Opacity
1330         {
1331             get
1332             {
1333                 return (float)GetValue(OpacityProperty);
1334             }
1335             set
1336             {
1337                 SetValue(OpacityProperty, value);
1338                 NotifyPropertyChanged();
1339             }
1340         }
1341
1342         /// <summary>
1343         /// Sets the position of the view for X and Y.<br />
1344         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1345         /// If the position inheritance is disabled, sets the world position.<br />
1346         /// </summary>
1347         /// <remarks>
1348         /// The property cascade chaining set is not recommended.
1349         ///</remarks>
1350         /// <example>
1351         /// This way is recommended for setting the property
1352         /// <code>
1353         /// var view = new View();
1354         /// view.Position2D = new Position2D(100, 200);
1355         /// </code>
1356         /// This way to set the property is prohibited
1357         /// <code>
1358         /// view.Position2D.X = 100; //This does not guarantee a proper operation
1359         /// </code>
1360         /// </example>
1361         /// <since_tizen> 3 </since_tizen>
1362         public Position2D Position2D
1363         {
1364             get
1365             {
1366                 return (Position2D)GetValue(Position2DProperty);
1367             }
1368             set
1369             {
1370                 SetValue(Position2DProperty, value);
1371                 NotifyPropertyChanged();
1372             }
1373         }
1374
1375         /// <summary>
1376         /// Retrieves the screen position of the view.<br />
1377         /// </summary>
1378         /// <since_tizen> 3 </since_tizen>
1379         public Vector2 ScreenPosition
1380         {
1381             get
1382             {
1383                 return GetCurrentScreenPosition();
1384             }
1385         }
1386
1387         /// <summary>
1388         /// Retrieves the screen position and size of the view.<br />
1389         /// </summary>
1390         /// <remarks>
1391         /// The float type Rectangle class is not ready yet.
1392         /// Therefore, it transmits data in Vector4 class.
1393         /// This type should later be changed to the appropriate data type.
1394         /// </remarks>
1395         [EditorBrowsable(EditorBrowsableState.Never)]
1396         public Vector4 ScreenPositionSize
1397         {
1398             get
1399             {
1400                 return GetCurrentScreenPositionSize();
1401             }
1402         }
1403
1404         /// <summary>
1405         /// Determines whether the pivot point should be used to determine the position of the view.
1406         /// This is false by default.
1407         /// </summary>
1408         /// <remarks>If false, then the top-left of the view is used for the position.
1409         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1410         /// </remarks>
1411         /// <since_tizen> 3 </since_tizen>
1412         public bool PositionUsesPivotPoint
1413         {
1414             get
1415             {
1416                 return (bool)GetValue(PositionUsesPivotPointProperty);
1417             }
1418             set
1419             {
1420                 SetValue(PositionUsesPivotPointProperty, value);
1421                 NotifyPropertyChanged();
1422             }
1423         }
1424
1425         /// <summary>
1426         /// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
1427         /// </summary>
1428         /// <since_tizen> 3 </since_tizen>
1429         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
1430             "Like: " +
1431             "View view = new View(); " +
1432             "view.PivotPoint = PivotPoint.Center; " +
1433             "view.PositionUsesPivotPoint = true;" +
1434             " This has been deprecated in API5 and will be removed in API8")]
1435         [EditorBrowsable(EditorBrowsableState.Never)]
1436         public bool PositionUsesAnchorPoint
1437         {
1438             get
1439             {
1440                 return (bool)GetValue(PositionUsesAnchorPointProperty);
1441             }
1442             set
1443             {
1444                 SetValue(PositionUsesAnchorPointProperty, value);
1445             }
1446         }
1447
1448         private bool InternalPositionUsesAnchorPoint
1449         {
1450             get
1451             {
1452                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
1453             }
1454             set
1455             {
1456                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
1457                 NotifyPropertyChanged();
1458             }
1459         }
1460
1461         /// <summary>
1462         /// Queries whether the view is connected to the stage.<br />
1463         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1464         /// </summary>
1465         /// <since_tizen> 3 </since_tizen>
1466         public bool IsOnWindow
1467         {
1468             get
1469             {
1470                 return OnWindow();
1471             }
1472         }
1473
1474         /// <summary>
1475         /// Gets the depth in the hierarchy for the view.
1476         /// </summary>
1477         /// <since_tizen> 3 </since_tizen>
1478         public int HierarchyDepth
1479         {
1480             get
1481             {
1482                 return GetHierarchyDepth();
1483             }
1484         }
1485
1486         /// <summary>
1487         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1488         /// </summary>
1489         /// <remarks>
1490         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1491         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1492         /// The values set by this property will likely change.
1493         /// </remarks>
1494         /// <since_tizen> 3 </since_tizen>
1495         public int SiblingOrder
1496         {
1497             get
1498             {
1499                 return (int)GetValue(SiblingOrderProperty);
1500             }
1501             set
1502             {
1503                 SetValue(SiblingOrderProperty, value);
1504
1505                 Layout?.ChangeLayoutSiblingOrder(value);
1506
1507                 NotifyPropertyChanged();
1508             }
1509         }
1510
1511         /// <summary>
1512         /// Returns the natural size of the view.
1513         /// </summary>
1514         /// <remarks>
1515         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1516         /// </remarks>
1517         /// <since_tizen> 5 </since_tizen>
1518         public Vector3 NaturalSize
1519         {
1520             get
1521             {
1522                 Vector3 ret = GetNaturalSize();
1523                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1524                 return ret;
1525             }
1526         }
1527
1528         /// <summary>
1529         /// Returns the natural size (Size2D) of the view.
1530         /// </summary>
1531         /// <remarks>
1532         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1533         /// </remarks>
1534         /// <since_tizen> 4 </since_tizen>
1535         public Size2D NaturalSize2D
1536         {
1537             get
1538             {
1539                 Vector3 temp = GetNaturalSize();
1540                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1541                 Size2D sz = null;
1542                 if (temp != null)
1543                 {
1544                     sz = new Size2D((int)temp.Width, (int)temp.Height);
1545                     temp.Dispose();
1546                 }
1547                 return sz;
1548             }
1549         }
1550
1551         /// <summary>
1552         /// Gets or sets the origin of a view within its parent's area.<br />
1553         /// 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 />
1554         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1555         /// A view's position is the distance between this origin and the view's anchor-point.<br />
1556         /// </summary>
1557         /// <pre>The view has been initialized.</pre>
1558         /// <since_tizen> 3 </since_tizen>
1559         public Position ParentOrigin
1560         {
1561             get
1562             {
1563                 Position tmp = (Position)GetValue(ParentOriginProperty);
1564                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1565             }
1566             set
1567             {
1568                 SetValue(ParentOriginProperty, value);
1569                 NotifyPropertyChanged();
1570             }
1571         }
1572
1573         /// <summary>
1574         /// Gets or sets the anchor-point of a view.<br />
1575         /// 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 />
1576         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1577         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1578         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1579         /// <pre>The view has been initialized.</pre>
1580         /// </summary>
1581         /// <remarks>
1582         /// The property cascade chaining set is not recommended.
1583         ///</remarks>
1584         /// <example>
1585         /// This way is recommended for setting the property
1586         /// <code>
1587         /// var view = new View();
1588         /// view.PivotPoint = PivotPoint.Center;
1589         /// </code>
1590         /// This way to set the property is prohibited
1591         /// <code>
1592         /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1593         /// </code>
1594         /// </example>
1595         /// <since_tizen> 3 </since_tizen>
1596         public Position PivotPoint
1597         {
1598             get
1599             {
1600                 return (Position)GetValue(PivotPointProperty);
1601             }
1602             set
1603             {
1604                 SetValue(PivotPointProperty, value);
1605                 NotifyPropertyChanged();
1606             }
1607         }
1608
1609         /// <summary>
1610         /// Gets or sets the size width of the view.
1611         /// </summary>
1612         /// <remarks>
1613         /// <para>
1614         /// Animatable - This property can be animated using <c>Animation</c> class.
1615         /// <code>
1616         /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1617         /// </code>
1618         /// </para>
1619         /// </remarks>
1620         /// <since_tizen> 3 </since_tizen>
1621         public float SizeWidth
1622         {
1623             get
1624             {
1625                 return (float)GetValue(SizeWidthProperty);
1626             }
1627             set
1628             {
1629                 SetValue(SizeWidthProperty, value);
1630                 NotifyPropertyChanged();
1631             }
1632         }
1633
1634         /// <summary>
1635         /// Gets or sets the size height of the view.
1636         /// </summary>
1637         /// <remarks>
1638         /// <para>
1639         /// Animatable - This property can be animated using <c>Animation</c> class.
1640         /// </para>
1641         /// <code>
1642         /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1643         /// </code>
1644         /// </remarks>
1645         /// <since_tizen> 3 </since_tizen>
1646         public float SizeHeight
1647         {
1648             get
1649             {
1650                 return (float)GetValue(SizeHeightProperty);
1651             }
1652             set
1653             {
1654                 SetValue(SizeHeightProperty, value);
1655                 NotifyPropertyChanged();
1656             }
1657         }
1658
1659         /// <summary>
1660         /// Gets or sets the position of the view.<br />
1661         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1662         /// If the position inheritance is disabled, sets the world position.<br />
1663         /// </summary>
1664         /// <remarks>
1665         /// <para>
1666         /// Animatable - This property can be animated using <c>Animation</c> class.
1667         /// <code>
1668         /// animation.AnimateTo(view, "Position", new Position(50, 0));
1669         /// </code>
1670         /// </para>
1671         /// The property cascade chaining set is not recommended.
1672         /// </remarks>
1673         /// <example>
1674         /// This way is recommended for setting the property
1675         /// <code>
1676         /// var view = new View();
1677         /// view.Position = new Position(100, 200.5f, 0);
1678         /// </code>
1679         /// This way to set the property is prohibited
1680         /// <code>
1681         /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1682         /// </code>
1683         /// </example>
1684         /// <since_tizen> 3 </since_tizen>
1685         public Position Position
1686         {
1687             get
1688             {
1689                 return (Position)GetValue(PositionProperty);
1690             }
1691             set
1692             {
1693                 SetValue(PositionProperty, value);
1694                 NotifyPropertyChanged();
1695             }
1696         }
1697
1698         /// <summary>
1699         /// Gets or sets the position X of the view.
1700         /// </summary>
1701         /// <remarks>
1702         /// <para>
1703         /// Animatable - This property can be animated using <c>Animation</c> class.
1704         /// <code>
1705         /// animation.AnimateTo(view, "PositionX", 50.0f);
1706         /// </code>
1707         /// </para>
1708         /// </remarks>
1709         /// <since_tizen> 3 </since_tizen>
1710         public float PositionX
1711         {
1712             get
1713             {
1714                 return (float)GetValue(PositionXProperty);
1715             }
1716             set
1717             {
1718                 SetValue(PositionXProperty, value);
1719                 NotifyPropertyChanged();
1720             }
1721         }
1722
1723         /// <summary>
1724         /// Gets or sets the position Y of the view.
1725         /// </summary>
1726         /// <remarks>
1727         /// <para>
1728         /// Animatable - This property can be animated using <c>Animation</c> class.
1729         /// <code>
1730         /// animation.AnimateTo(view, "PositionY", 50.0f);
1731         /// </code>
1732         /// </para>
1733         /// </remarks>
1734         /// <since_tizen> 3 </since_tizen>
1735         public float PositionY
1736         {
1737             get
1738             {
1739                 return (float)GetValue(PositionYProperty);
1740             }
1741             set
1742             {
1743                 SetValue(PositionYProperty, value);
1744                 NotifyPropertyChanged();
1745             }
1746         }
1747
1748         /// <summary>
1749         /// Gets or sets the position Z of the view.
1750         /// </summary>
1751         /// <remarks>
1752         /// <para>
1753         /// Animatable - This property can be animated using <c>Animation</c> class.
1754         /// <code>
1755         /// animation.AnimateTo(view, "PositionZ", 50.0f);
1756         /// </code>
1757         /// </para>
1758         /// </remarks>
1759         /// <since_tizen> 3 </since_tizen>
1760         public float PositionZ
1761         {
1762             get
1763             {
1764                 return (float)GetValue(PositionZProperty);
1765             }
1766             set
1767             {
1768                 SetValue(PositionZProperty, value);
1769                 NotifyPropertyChanged();
1770             }
1771         }
1772
1773         /// <summary>
1774         /// Gets or sets the world position of the view.
1775         /// </summary>
1776         /// <since_tizen> 3 </since_tizen>
1777         public Vector3 WorldPosition
1778         {
1779             get
1780             {
1781                 return GetCurrentWorldPosition();
1782             }
1783         }
1784
1785         /// <summary>
1786         /// Gets or sets the orientation of the view.<br />
1787         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1788         /// </summary>
1789         /// <remarks>
1790         /// <para>
1791         /// This is an asynchronous method.
1792         /// </para>
1793         /// <para>
1794         /// Animatable - This property can be animated using <c>Animation</c> class.
1795         /// <code>
1796         /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
1797         /// </code>
1798         /// </para>
1799         /// </remarks>
1800         /// <since_tizen> 3 </since_tizen>
1801         public Rotation Orientation
1802         {
1803             get
1804             {
1805                 return (Rotation)GetValue(OrientationProperty);
1806             }
1807             set
1808             {
1809                 SetValue(OrientationProperty, value);
1810                 NotifyPropertyChanged();
1811             }
1812         }
1813
1814         /// <summary>
1815         /// Gets or sets the world orientation of the view.<br />
1816         /// </summary>
1817         /// <since_tizen> 3 </since_tizen>
1818         public Rotation WorldOrientation
1819         {
1820             get
1821             {
1822                 Rotation temp = new Rotation();
1823                 var pValue = GetProperty(View.Property.WorldOrientation);
1824                 pValue.Get(temp);
1825                 pValue.Dispose();
1826                 return temp;
1827             }
1828         }
1829
1830         /// <summary>
1831         /// Gets or sets the scale factor applied to the view.<br />
1832         /// </summary>
1833         /// <remarks>
1834         /// <para>
1835         /// Animatable - This property can be animated using <c>Animation</c> class.
1836         /// <code>
1837         /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
1838         /// </code>
1839         /// </para>
1840         /// The property cascade chaining set is not recommended.
1841         /// </remarks>
1842         /// <example>
1843         /// This way is recommended for setting the property
1844         /// <code>
1845         /// var view = new View();
1846         /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
1847         /// </code>
1848         /// This way to set the property is prohibited
1849         /// <code>
1850         /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
1851         /// </code>
1852         /// </example>
1853         /// <since_tizen> 3 </since_tizen>
1854         public Vector3 Scale
1855         {
1856             get
1857             {
1858                 return (Vector3)GetValue(ScaleProperty);
1859             }
1860             set
1861             {
1862                 SetValue(ScaleProperty, value);
1863                 NotifyPropertyChanged();
1864             }
1865         }
1866
1867         /// <summary>
1868         /// Gets or sets the scale X factor applied to the view.
1869         /// </summary>
1870         /// <remarks>
1871         /// <para>
1872         /// Animatable - This property can be animated using <c>Animation</c> class.
1873         /// <code>
1874         /// animation.AnimateTo(view, "ScaleX", 1.5f);
1875         /// </code>
1876         /// </para>
1877         /// </remarks>
1878         /// <since_tizen> 3 </since_tizen>
1879         public float ScaleX
1880         {
1881             get
1882             {
1883                 return (float)GetValue(ScaleXProperty);
1884             }
1885             set
1886             {
1887                 SetValue(ScaleXProperty, value);
1888                 NotifyPropertyChanged();
1889             }
1890         }
1891
1892         /// <summary>
1893         /// Gets or sets the scale Y factor applied to the view.
1894         /// </summary>
1895         /// <remarks>
1896         /// <para>
1897         /// Animatable - This property can be animated using <c>Animation</c> class.
1898         /// <code>
1899         /// animation.AnimateTo(view, "ScaleY", 1.5f);
1900         /// </code>
1901         /// </para>
1902         /// </remarks>
1903         /// <since_tizen> 3 </since_tizen>
1904         public float ScaleY
1905         {
1906             get
1907             {
1908                 return (float)GetValue(ScaleYProperty);
1909             }
1910             set
1911             {
1912                 SetValue(ScaleYProperty, value);
1913                 NotifyPropertyChanged();
1914             }
1915         }
1916
1917         /// <summary>
1918         /// Gets or sets the scale Z factor applied to the view.
1919         /// </summary>
1920         /// <remarks>
1921         /// <para>
1922         /// Animatable - This property can be animated using <c>Animation</c> class.
1923         /// <code>
1924         /// animation.AnimateTo(view, "ScaleZ", 1.5f);
1925         /// </code>
1926         /// </para>
1927         /// </remarks>
1928         /// <since_tizen> 3 </since_tizen>
1929         public float ScaleZ
1930         {
1931             get
1932             {
1933                 return (float)GetValue(ScaleZProperty);
1934             }
1935             set
1936             {
1937                 SetValue(ScaleZProperty, value);
1938                 NotifyPropertyChanged();
1939             }
1940         }
1941
1942         /// <summary>
1943         /// Gets the world scale of the view.
1944         /// </summary>
1945         /// <since_tizen> 3 </since_tizen>
1946         public Vector3 WorldScale
1947         {
1948             get
1949             {
1950                 return GetCurrentWorldScale();
1951             }
1952         }
1953
1954         /// <summary>
1955         /// Retrieves the visibility flag of the view.
1956         /// </summary>
1957         /// <remarks>
1958         /// <para>
1959         /// If the view is not visible, then the view and its children will not be rendered.
1960         /// 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.
1961         /// </para>
1962         /// <para>
1963         /// Animatable - This property can be animated using <c>Animation</c> class.
1964         /// <code>
1965         /// animation.AnimateTo(view, "Visibility", false);
1966         /// </code>
1967         /// </para>
1968         /// </remarks>
1969         /// <since_tizen> 3 </since_tizen>
1970         public bool Visibility
1971         {
1972             get
1973             {
1974                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
1975             }
1976         }
1977
1978         /// <summary>
1979         /// Gets the view's world color.
1980         /// </summary>
1981         /// <since_tizen> 3 </since_tizen>
1982         public Vector4 WorldColor
1983         {
1984             get
1985             {
1986                 return GetCurrentWorldColor();
1987             }
1988         }
1989
1990         /// <summary>
1991         /// Gets or sets the view's name.
1992         /// </summary>
1993         /// <since_tizen> 3 </since_tizen>
1994         public string Name
1995         {
1996             get
1997             {
1998                 return (string)GetValue(NameProperty);
1999             }
2000             set
2001             {
2002                 SetValue(NameProperty, value);
2003                 NotifyPropertyChanged();
2004             }
2005         }
2006
2007         /// <summary>
2008         /// Get the number of children held by the view.
2009         /// </summary>
2010         /// <since_tizen> 3 </since_tizen>
2011         public new uint ChildCount
2012         {
2013             get
2014             {
2015                 return Convert.ToUInt32(Children.Count);
2016             }
2017         }
2018
2019         /// <summary>
2020         /// Gets the view's ID.
2021         /// Read-only
2022         /// </summary>
2023         /// <since_tizen> 3 </since_tizen>
2024         public uint ID
2025         {
2026             get
2027             {
2028                 return GetId();
2029             }
2030         }
2031
2032         /// <summary>
2033         /// Gets or sets the status of whether the view should emit touch or hover signals.
2034         /// If a View is made insensitive, then the View and its children are not hittable.
2035         /// </summary>
2036         /// <since_tizen> 3 </since_tizen>
2037         public bool Sensitive
2038         {
2039             get
2040             {
2041                 return (bool)GetValue(SensitiveProperty);
2042             }
2043             set
2044             {
2045                 SetValue(SensitiveProperty, value);
2046                 NotifyPropertyChanged();
2047             }
2048         }
2049
2050         /// <summary>
2051         /// Gets or sets the status of whether the view should be enabled user interactions.
2052         /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
2053         /// </summary>
2054         /// <since_tizen> tizen_next </since_tizen>
2055         [EditorBrowsable(EditorBrowsableState.Never)]
2056         public bool IsEnabled
2057         {
2058             get
2059             {
2060                 return (bool)GetValue(IsEnabledProperty);
2061             }
2062             set
2063             {
2064                 SetValue(IsEnabledProperty, value);
2065                 NotifyPropertyChanged();
2066             }
2067         }
2068
2069         /// <summary>
2070         /// 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.
2071         /// </summary>
2072         /// <since_tizen> 3 </since_tizen>
2073         public bool LeaveRequired
2074         {
2075             get
2076             {
2077                 return (bool)GetValue(LeaveRequiredProperty);
2078             }
2079             set
2080             {
2081                 SetValue(LeaveRequiredProperty, value);
2082                 NotifyPropertyChanged();
2083             }
2084         }
2085
2086         /// <summary>
2087         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2088         /// </summary>
2089         /// <since_tizen> 3 </since_tizen>
2090         public bool InheritOrientation
2091         {
2092             get
2093             {
2094                 return (bool)GetValue(InheritOrientationProperty);
2095             }
2096             set
2097             {
2098                 SetValue(InheritOrientationProperty, value);
2099                 NotifyPropertyChanged();
2100             }
2101         }
2102
2103         /// <summary>
2104         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2105         /// </summary>
2106         /// <since_tizen> 3 </since_tizen>
2107         public bool InheritScale
2108         {
2109             get
2110             {
2111                 return (bool)GetValue(InheritScaleProperty);
2112             }
2113             set
2114             {
2115                 SetValue(InheritScaleProperty, value);
2116                 NotifyPropertyChanged();
2117             }
2118         }
2119
2120         /// <summary>
2121         /// Gets or sets the status of how the view and its children should be drawn.<br />
2122         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2123         /// 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 />
2124         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2125         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2126         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2127         /// </summary>
2128         /// <since_tizen> 3 </since_tizen>
2129         public DrawModeType DrawMode
2130         {
2131             get
2132             {
2133                 return (DrawModeType)GetValue(DrawModeProperty);
2134             }
2135             set
2136             {
2137                 SetValue(DrawModeProperty, value);
2138                 NotifyPropertyChanged();
2139             }
2140         }
2141
2142         /// <summary>
2143         /// Gets or sets the relative to parent size factor of the view.<br />
2144         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2145         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2146         /// </summary>
2147         /// <remarks>
2148         /// The property cascade chaining set is not recommended.
2149         /// </remarks>
2150         /// <example>
2151         /// This way is recommended for setting the property
2152         /// <code>
2153         /// var text = new TextField();
2154         /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
2155         /// </code>
2156         /// This way to set the property is prohibited
2157         /// <code>
2158         /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
2159         /// </code>
2160         /// </example>
2161         /// <since_tizen> 3 </since_tizen>
2162         public Vector3 SizeModeFactor
2163         {
2164             get
2165             {
2166                 return (Vector3)GetValue(SizeModeFactorProperty);
2167             }
2168             set
2169             {
2170                 SetValue(SizeModeFactorProperty, value);
2171                 NotifyPropertyChanged();
2172             }
2173         }
2174
2175         /// <summary>
2176         /// Gets or sets the width resize policy to be used.
2177         /// </summary>
2178         /// <since_tizen> 3 </since_tizen>
2179         public ResizePolicyType WidthResizePolicy
2180         {
2181             get
2182             {
2183                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2184             }
2185             set
2186             {
2187                 SetValue(WidthResizePolicyProperty, value);
2188                 NotifyPropertyChanged();
2189             }
2190         }
2191
2192         /// <summary>
2193         /// Gets or sets the height resize policy to be used.
2194         /// </summary>
2195         /// <since_tizen> 3 </since_tizen>
2196         public ResizePolicyType HeightResizePolicy
2197         {
2198             get
2199             {
2200                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2201             }
2202             set
2203             {
2204                 SetValue(HeightResizePolicyProperty, value);
2205                 NotifyPropertyChanged();
2206             }
2207         }
2208
2209         /// <summary>
2210         /// Gets or sets the policy to use when setting size with size negotiation.<br />
2211         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2212         /// </summary>
2213         /// <since_tizen> 3 </since_tizen>
2214         public SizeScalePolicyType SizeScalePolicy
2215         {
2216             get
2217             {
2218                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2219             }
2220             set
2221             {
2222                 SetValue(SizeScalePolicyProperty, value);
2223                 NotifyPropertyChanged();
2224             }
2225         }
2226
2227         /// <summary>
2228         ///  Gets or sets the status of whether the width size is dependent on the height size.
2229         /// </summary>
2230         /// <since_tizen> 3 </since_tizen>
2231         public bool WidthForHeight
2232         {
2233             get
2234             {
2235                 return (bool)GetValue(WidthForHeightProperty);
2236             }
2237             set
2238             {
2239                 SetValue(WidthForHeightProperty, value);
2240                 NotifyPropertyChanged();
2241             }
2242         }
2243
2244         /// <summary>
2245         /// Gets or sets the status of whether the height size is dependent on the width size.
2246         /// </summary>
2247         /// <since_tizen> 3 </since_tizen>
2248         public bool HeightForWidth
2249         {
2250             get
2251             {
2252                 return (bool)GetValue(HeightForWidthProperty);
2253             }
2254             set
2255             {
2256                 SetValue(HeightForWidthProperty, value);
2257                 NotifyPropertyChanged();
2258             }
2259         }
2260
2261         /// <summary>
2262         /// Gets or sets the padding for use in layout.
2263         /// </summary>
2264         /// <remarks>
2265         /// The property cascade chaining set is not recommended.
2266         /// </remarks>
2267         /// <example>
2268         /// This way is recommended for setting the property
2269         /// <code>
2270         /// var view = new View();
2271         /// view.Padding = new Extents(5, 5, 5, 5);
2272         /// </code>
2273         /// This way to set the property is prohibited
2274         /// <code>
2275         /// view.Padding.Start = 5; //This does not guarantee a proper operation
2276         /// </code>
2277         /// </example>
2278         /// <since_tizen> 5 </since_tizen>
2279         public Extents Padding
2280         {
2281             get
2282             {
2283                 return (Extents)GetValue(PaddingProperty);
2284             }
2285             set
2286             {
2287                 SetValue(PaddingProperty, value);
2288                 NotifyPropertyChanged();
2289             }
2290         }
2291
2292         /// <summary>
2293         /// Gets or sets the minimum size the view can be assigned in size negotiation.
2294         /// </summary>
2295         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2296         /// <remarks>
2297         /// The property cascade chaining set is not recommended.
2298         /// </remarks>
2299         /// <example>
2300         /// This way is recommended for setting the property
2301         /// <code>
2302         /// var view = new View();
2303         /// view.MinimumSize = new Size2D(100, 200);
2304         /// </code>
2305         /// This way to set the property is prohibited
2306         /// <code>
2307         /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2308         /// </code>
2309         /// </example>
2310         /// <since_tizen> 3 </since_tizen>
2311         public Size2D MinimumSize
2312         {
2313             get
2314             {
2315                 return (Size2D)GetValue(MinimumSizeProperty);
2316             }
2317             set
2318             {
2319                 if (value == null)
2320                 {
2321                     throw new ArgumentNullException(nameof(value));
2322                 }
2323                 if (layout != null)
2324                 {
2325                     // Note: it only works if minimum size is >= than natural size.
2326                     // To force the size it should be done through the width&height spec or Size2D.
2327                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2328                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2329                     layout.RequestLayout();
2330                 }
2331                 SetValue(MinimumSizeProperty, value);
2332                 NotifyPropertyChanged();
2333             }
2334         }
2335
2336         /// <summary>
2337         /// Gets or sets the maximum size the view can be assigned in size negotiation.
2338         /// </summary>
2339         /// <example>
2340         /// This way is recommended for setting the property
2341         /// <code>
2342         /// var view = new View();
2343         /// view.MaximumSize = new Size2D(100, 200);
2344         /// </code>
2345         /// This way to set the property is prohibited
2346         /// <code>
2347         /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2348         /// </code>
2349         /// </example>
2350         /// <since_tizen> 3 </since_tizen>
2351         public Size2D MaximumSize
2352         {
2353             get
2354             {
2355                 return (Size2D)GetValue(MaximumSizeProperty);
2356             }
2357             set
2358             {
2359                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2360                 // MATCH_PARENT spec + parent container size can be used to limit
2361                 if (layout != null)
2362                 {
2363                     layout.RequestLayout();
2364                 }
2365                 SetValue(MaximumSizeProperty, value);
2366                 NotifyPropertyChanged();
2367             }
2368         }
2369
2370         /// <summary>
2371         /// Gets or sets whether a child view inherits it's parent's position.<br />
2372         /// Default is to inherit.<br />
2373         /// 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 />
2374         /// </summary>
2375         /// <since_tizen> 3 </since_tizen>
2376         public bool InheritPosition
2377         {
2378             get
2379             {
2380                 return (bool)GetValue(InheritPositionProperty);
2381             }
2382             set
2383             {
2384                 SetValue(InheritPositionProperty, value);
2385                 NotifyPropertyChanged();
2386             }
2387         }
2388
2389         /// <summary>
2390         /// Gets or sets the clipping behavior (mode) of it's children.
2391         /// </summary>
2392         /// <since_tizen> 3 </since_tizen>
2393         public ClippingModeType ClippingMode
2394         {
2395             get
2396             {
2397                 return (ClippingModeType)GetValue(ClippingModeProperty);
2398             }
2399             set
2400             {
2401                 SetValue(ClippingModeProperty, value);
2402                 NotifyPropertyChanged();
2403             }
2404         }
2405
2406         /// <summary>
2407         /// Gets the number of renderers held by the view.
2408         /// </summary>
2409         /// <since_tizen> 3 </since_tizen>
2410         public uint RendererCount
2411         {
2412             get
2413             {
2414                 return GetRendererCount();
2415             }
2416         }
2417
2418         /// <summary>
2419         /// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
2420         /// </summary>
2421         /// <remarks>
2422         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2423         /// </remarks>
2424         /// <since_tizen> 3 </since_tizen>
2425         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
2426             "Like: " +
2427             "View view = new View(); " +
2428             "view.PivotPoint = PivotPoint.Center; " +
2429             "view.PositionUsesPivotPoint = true;")]
2430         [EditorBrowsable(EditorBrowsableState.Never)]
2431         public Position AnchorPoint
2432         {
2433             get
2434             {
2435                 return GetValue(AnchorPointProperty) as Position;
2436             }
2437             set
2438             {
2439                 SetValue(AnchorPointProperty, value);
2440             }
2441         }
2442
2443         private Position InternalAnchorPoint
2444         {
2445             get
2446             {
2447                 return GetCurrentAnchorPoint();
2448             }
2449             set
2450             {
2451                 SetAnchorPoint(value);
2452                 NotifyPropertyChanged();
2453             }
2454         }
2455
2456         /// <summary>
2457         /// Sets the size of a view for the width, the height and the depth.<br />
2458         /// Geometry can be scaled to fit within this area.<br />
2459         /// This does not interfere with the view's scale factor.<br />
2460         /// The views default depth is the minimum of width and height.<br />
2461         /// </summary>
2462         /// <remarks>
2463         /// <para>
2464         /// Animatable - This property can be animated using <c>Animation</c> class.
2465         /// <code>
2466         /// animation.AnimateTo(view, "Size", new Size(100, 100));
2467         /// </code>
2468         /// </para>
2469         /// The property cascade chaining set is not recommended.
2470         /// </remarks>
2471         /// <example>
2472         /// This way is recommended for setting the property
2473         /// <code>
2474         /// var view = new View();
2475         /// view.Size = new Size(100.5f, 200, 0);
2476         /// </code>
2477         /// This way to set the property is prohibited
2478         /// <code>
2479         /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2480         /// </code>
2481         /// </example>
2482         /// <since_tizen> 5 </since_tizen>
2483         public Size Size
2484         {
2485             get
2486             {
2487                 return (Size)GetValue(SizeProperty);
2488             }
2489             set
2490             {
2491                 SetValue(SizeProperty, value);
2492                 NotifyPropertyChanged();
2493             }
2494         }
2495
2496         /// <summary>
2497         /// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
2498         /// </summary>
2499         /// <since_tizen> 3 </since_tizen>
2500         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
2501             "Like: " +
2502             "Container parent =  view.GetParent(); " +
2503             "View view = parent as View;")]
2504         [EditorBrowsable(EditorBrowsableState.Never)]
2505         public new View Parent
2506         {
2507             get
2508             {
2509                 View ret;
2510                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2511                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2512                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2513
2514                 if (basehandle is Layer layer)
2515                 {
2516                     ret = new View(Layer.getCPtr(layer).Handle, false);
2517                     NUILog.Error("This Parent property is deprecated, should do not be used");
2518                 }
2519                 else
2520                 {
2521                     ret = basehandle as View;
2522                 }
2523
2524                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2525                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2526
2527                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2528                 return ret;
2529             }
2530         }
2531
2532         /// <summary>
2533         /// Gets/Sets whether inherit parent's the layout Direction.
2534         /// </summary>
2535         /// <since_tizen> 4 </since_tizen>
2536         public bool InheritLayoutDirection
2537         {
2538             get
2539             {
2540                 return (bool)GetValue(InheritLayoutDirectionProperty);
2541             }
2542             set
2543             {
2544                 SetValue(InheritLayoutDirectionProperty, value);
2545                 NotifyPropertyChanged();
2546             }
2547         }
2548
2549         /// <summary>
2550         /// Gets/Sets the layout Direction.
2551         /// </summary>
2552         /// <since_tizen> 4 </since_tizen>
2553         public ViewLayoutDirectionType LayoutDirection
2554         {
2555             get
2556             {
2557                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2558             }
2559             set
2560             {
2561                 SetValue(LayoutDirectionProperty, value);
2562                 NotifyPropertyChanged();
2563                 layout?.RequestLayout();
2564             }
2565         }
2566
2567         /// <summary>
2568         /// Gets or sets the Margin for use in layout.
2569         /// </summary>
2570         /// <remarks>
2571         /// Margin property is supported by Layout algorithms and containers.
2572         /// Please Set Layout if you want to use Margin property.
2573         /// The property cascade chaining set is not recommended.
2574         /// </remarks>
2575         /// <example>
2576         /// This way is recommended for setting the property
2577         /// <code>
2578         /// var view = new View();
2579         /// view.Margin = new Extents(10, 5, 15, 20);
2580         /// </code>
2581         /// This way to set the property is prohibited
2582         /// <code>
2583         /// view.Margin.Top = 15; //This does not guarantee a proper operation
2584         /// </code>
2585         /// </example>
2586         /// <since_tizen> 4 </since_tizen>
2587         public Extents Margin
2588         {
2589             get
2590             {
2591                 return (Extents)GetValue(MarginProperty);
2592             }
2593             set
2594             {
2595                 SetValue(MarginProperty, value);
2596                 NotifyPropertyChanged();
2597             }
2598         }
2599
2600         ///<summary>
2601         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2602         ///</summary>
2603         /// <example>
2604         /// <code>
2605         /// // matchParentView matches its size to its parent size.
2606         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2607         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2608         ///
2609         /// // wrapContentView wraps its children with their desired size.
2610         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2611         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2612         ///
2613         /// // exactSizeView shows itself with an exact size.
2614         /// exactSizeView.WidthSpecification = 100;
2615         /// exactSizeView.HeightSpecification = 100;
2616         /// </code>
2617         /// </example>
2618         /// <since_tizen> 6 </since_tizen>
2619         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2620         public int WidthSpecification
2621         {
2622             get
2623             {
2624                 return (int)GetValue(WidthSpecificationProperty);
2625             }
2626             set
2627             {
2628                 SetValue(WidthSpecificationProperty, value);
2629                 NotifyPropertyChanged();
2630             }
2631         }
2632
2633         private int InternalWidthSpecification
2634         {
2635             get
2636             {
2637                 return widthPolicy;
2638             }
2639             set
2640             {
2641                 if (value == widthPolicy)
2642                     return;
2643
2644                 widthPolicy = value;
2645                 if (widthPolicy >= 0)
2646                 {
2647                     SizeWidth = widthPolicy;
2648                 }
2649                 layout?.RequestLayout();
2650             }
2651         }
2652
2653         ///<summary>
2654         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2655         ///</summary>
2656         /// <example>
2657         /// <code>
2658         /// // matchParentView matches its size to its parent size.
2659         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2660         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2661         ///
2662         /// // wrapContentView wraps its children with their desired size.
2663         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2664         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2665         ///
2666         /// // exactSizeView shows itself with an exact size.
2667         /// exactSizeView.WidthSpecification = 100;
2668         /// exactSizeView.HeightSpecification = 100;
2669         /// </code>
2670         /// </example>
2671         /// <since_tizen> 6 </since_tizen>
2672         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2673         public int HeightSpecification
2674         {
2675             get
2676             {
2677                 return (int)GetValue(HeightSpecificationProperty);
2678             }
2679             set
2680             {
2681                 SetValue(HeightSpecificationProperty, value);
2682                 NotifyPropertyChanged();
2683             }
2684         }
2685
2686         private int InternalHeightSpecification
2687         {
2688             get
2689             {
2690                 return heightPolicy;
2691             }
2692             set
2693             {
2694                 if (value == heightPolicy)
2695                     return;
2696
2697                 heightPolicy = value;
2698                 if (heightPolicy >= 0)
2699                 {
2700                     SizeHeight = heightPolicy;
2701                 }
2702                 layout?.RequestLayout();
2703             }
2704         }
2705
2706         ///<summary>
2707         /// Gets the List of transitions for this View.
2708         ///</summary>
2709         /// <since_tizen> 6 </since_tizen>
2710         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2711         {
2712             get
2713             {
2714                 if (layoutTransitions == null)
2715                 {
2716                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2717                 }
2718                 return layoutTransitions;
2719             }
2720         }
2721
2722         ///<summary>
2723         /// Sets a layout transitions for this View.
2724         ///</summary>
2725         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2726         /// <remarks>
2727         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2728         /// </remarks>
2729         /// <since_tizen> 6 </since_tizen>
2730         public LayoutTransition LayoutTransition
2731         {
2732             get
2733             {
2734                 return GetValue(LayoutTransitionProperty) as LayoutTransition;
2735             }
2736             set
2737             {
2738                 SetValue(LayoutTransitionProperty, value);
2739                 NotifyPropertyChanged();
2740             }
2741         }
2742
2743         private LayoutTransition InternalLayoutTransition
2744         {
2745             get
2746             {
2747                 return layoutTransition;
2748             }
2749             set
2750             {
2751                 if (value == null)
2752                 {
2753                     throw new global::System.ArgumentNullException(nameof(value));
2754                 }
2755                 if (layoutTransitions == null)
2756                 {
2757                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2758                 }
2759
2760                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
2761
2762                 AttachTransitionsToChildren(value);
2763
2764                 layoutTransition = value;
2765             }
2766         }
2767
2768         /// <summary>
2769         /// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
2770         /// </summary>
2771         /// <remarks>
2772         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2773         /// </remarks>
2774         /// <since_tizen> 4 </since_tizen>
2775         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
2776         [EditorBrowsable(EditorBrowsableState.Never)]
2777         public Extents PaddingEX
2778         {
2779             get
2780             {
2781                 return GetValue(PaddingEXProperty) as Extents;
2782             }
2783             set
2784             {
2785                 SetValue(PaddingEXProperty, value);
2786             }
2787         }
2788
2789         private Extents InternalPaddingEX
2790         {
2791             get
2792             {
2793                 Extents temp = new Extents(0, 0, 0, 0);
2794                 var pValue = GetProperty(View.Property.PADDING);
2795                 pValue.Get(temp);
2796                 pValue.Dispose();
2797                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2798                 temp.Dispose();
2799                 return ret;
2800             }
2801             set
2802             {
2803                 var temp = new Tizen.NUI.PropertyValue(value);
2804                 SetProperty(View.Property.PADDING, temp);
2805                 temp.Dispose();
2806                 NotifyPropertyChanged();
2807                 layout?.RequestLayout();
2808             }
2809         }
2810
2811         /// <summary>
2812         /// The Color of View. This is an RGBA value.
2813         /// Each RGBA components match as <see cref="ColorRed"/>, <see cref="ColorGreen"/>, <see cref="ColorBlue"/>, and <see cref="Opacity"/>.
2814         /// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
2815         /// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
2816         /// Inherient of color value depend on <see cref="ColorMode"/>.
2817         /// </summary>
2818         /// <remarks>
2819         /// <para>
2820         /// Animatable - This property can be animated using <c>Animation</c> class.
2821         /// </para>
2822         /// The property cascade chaining set is not recommended.
2823         /// </remarks>
2824         /// <example>
2825         /// This way is recommended for setting the property
2826         /// <code>
2827         /// var view = new View();
2828         /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
2829         /// </code>
2830         /// This way to set the property is prohibited
2831         /// <code>
2832         /// view.Color.A = 0.5f; //This does not guarantee a proper operation
2833         /// </code>
2834         /// </example>
2835         [EditorBrowsable(EditorBrowsableState.Never)]
2836         public Color Color
2837         {
2838             get
2839             {
2840                 return (Color)GetValue(ColorProperty);
2841             }
2842             set
2843             {
2844                 SetValue(ColorProperty, value);
2845                 NotifyPropertyChanged();
2846             }
2847         }
2848
2849         /// <summary>
2850         /// The Red component of View.Color.
2851         /// </summary>
2852         /// <remarks>
2853         /// <para>
2854         /// Animatable - This property can be animated using <c>Animation</c> class.
2855         /// </para>
2856         /// </remarks>
2857         [EditorBrowsable(EditorBrowsableState.Never)]
2858         public float ColorRed
2859         {
2860             get
2861             {
2862                 return (float)GetValue(ColorRedProperty);
2863             }
2864             set
2865             {
2866                 SetValue(ColorRedProperty, value);
2867                 NotifyPropertyChanged();
2868             }
2869         }
2870
2871         /// <summary>
2872         /// The Green component of View.Color.
2873         /// </summary>
2874         /// <remarks>
2875         /// <para>
2876         /// Animatable - This property can be animated using <c>Animation</c> class.
2877         /// </para>
2878         /// </remarks>
2879         [EditorBrowsable(EditorBrowsableState.Never)]
2880         public float ColorGreen
2881         {
2882             get
2883             {
2884                 return (float)GetValue(ColorGreenProperty);
2885             }
2886             set
2887             {
2888                 SetValue(ColorGreenProperty, value);
2889                 NotifyPropertyChanged();
2890             }
2891         }
2892
2893         /// <summary>
2894         /// The Blue component of View.Color.
2895         /// </summary>
2896         /// <remarks>
2897         /// <para>
2898         /// Animatable - This property can be animated using <c>Animation</c> class.
2899         /// </para>
2900         /// </remarks>
2901         [EditorBrowsable(EditorBrowsableState.Never)]
2902         public float ColorBlue
2903         {
2904             get
2905             {
2906                 return (float)GetValue(ColorBlueProperty);
2907             }
2908             set
2909             {
2910                 SetValue(ColorBlueProperty, value);
2911                 NotifyPropertyChanged();
2912             }
2913         }
2914
2915         /// <summary>
2916         /// Set the layout on this View. Replaces any existing Layout.
2917         /// </summary>
2918         /// <remarks>
2919         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
2920         /// </remarks>
2921         /// <since_tizen> 6 </since_tizen>
2922         public LayoutItem Layout
2923         {
2924             get
2925             {
2926                 return GetValue(LayoutProperty) as LayoutItem;
2927             }
2928             set
2929             {
2930                 SetValue(LayoutProperty, value);
2931             }
2932         }
2933
2934         private LayoutItem InternalLayout
2935         {
2936             get
2937             {
2938                 return layout;
2939             }
2940             set
2941             {
2942                 // Do nothing if layout provided is already set on this View.
2943                 if (value == layout)
2944                 {
2945                     return;
2946                 }
2947
2948                 LayoutingDisabled = false;
2949                 layoutSet = true;
2950
2951                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2952                 // First check if the layout to be set already has a owner.
2953                 if (value?.Owner != null)
2954                 {
2955                     // Previous owner of the layout gets a default layout as a replacement.
2956                     value.Owner.Layout = new AbsoluteLayout()
2957                     {
2958                         // Copy Margin and Padding to replacement LayoutGroup.
2959                         Margin = value.Margin,
2960                         Padding = value.Padding,
2961                     };
2962                 }
2963
2964                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2965                 // View if no replacement. Previously margin and padding values would have been moved from
2966                 // the View to the layout.
2967                 if (layout != null) // Existing layout
2968                 {
2969                     if (value != null)
2970                     {
2971                         // Existing layout being replaced so copy over margin and padding values.
2972                         value.Margin = layout.Margin;
2973                         value.Padding = layout.Padding;
2974                         value.SetPositionByLayout = !excludeLayouting;
2975                     }
2976                     else
2977                     {
2978                         // Layout not being replaced so restore margin and padding to View.
2979                         SetValue(MarginProperty, layout.Margin);
2980                         SetValue(PaddingProperty, layout.Padding);
2981                         NotifyPropertyChanged();
2982                     }
2983                 }
2984                 else
2985                 {
2986                     // First Layout to be added to the View hence copy
2987
2988                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2989                     if (value != null)
2990                     {
2991                         Extents margin = Margin;
2992                         Extents padding = Padding;
2993                         bool setMargin = false;
2994                         bool setPadding = false;
2995
2996                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
2997                         {
2998                             // If View already has a margin set then store it in Layout instead.
2999                             value.Margin = margin;
3000                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
3001                             setMargin = true;
3002                         }
3003
3004                         if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
3005                         {
3006                             // If View already has a padding set then store it in Layout instead.
3007                             value.Padding = padding;
3008                             SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
3009                             setPadding = true;
3010                         }
3011
3012                         if (setMargin || setPadding)
3013                         {
3014                             NotifyPropertyChanged();
3015                         }
3016
3017                         value.SetPositionByLayout = !excludeLayouting;
3018                     }
3019                 }
3020
3021                 // Remove existing layout from it's parent layout group.
3022                 layout?.Unparent();
3023
3024                 // Set layout to this view
3025                 SetLayout(value);
3026             }
3027         }
3028
3029         /// <summary>
3030         /// The weight of the View, used to share available space in a layout with siblings.
3031         /// </summary>
3032         /// <since_tizen> 6 </since_tizen>
3033         public float Weight
3034         {
3035             get
3036             {
3037                 return weight;
3038             }
3039             set
3040             {
3041                 weight = value;
3042                 layout?.RequestLayout();
3043             }
3044         }
3045
3046         /// <summary>
3047         ///  Whether to load the BackgroundImage synchronously.
3048         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3049         ///  Note: For Normal Quad images only.
3050         /// </summary>
3051         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3052         [EditorBrowsable(EditorBrowsableState.Never)]
3053         public bool BackgroundImageSynchronosLoading
3054         {
3055             get
3056             {
3057                 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
3058             }
3059             set
3060             {
3061                 SetValue(BackgroundImageSynchronosLoadingProperty, value);
3062                 NotifyPropertyChanged();
3063             }
3064         }
3065
3066         private bool InternalBackgroundImageSynchronosLoading
3067         {
3068             get
3069             {
3070                 return BackgroundImageSynchronousLoading;
3071             }
3072             set
3073             {
3074                 BackgroundImageSynchronousLoading = value;
3075             }
3076         }
3077
3078         /// <summary>
3079         ///  Whether to load the BackgroundImage synchronously.
3080         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3081         ///  Note: For Normal Quad images only.
3082         /// </summary>
3083         /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3084         [EditorBrowsable(EditorBrowsableState.Never)]
3085         public bool BackgroundImageSynchronousLoading
3086         {
3087             get
3088             {
3089                 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
3090             }
3091             set
3092             {
3093                 SetValue(BackgroundImageSynchronousLoadingProperty, value);
3094                 NotifyPropertyChanged();
3095             }
3096         }
3097
3098         private bool InternalBackgroundImageSynchronousLoading
3099         {
3100             get
3101             {
3102                 return backgroundImageSynchronousLoading;
3103             }
3104             set
3105             {
3106                 backgroundImageSynchronousLoading = value;
3107
3108                 if (!string.IsNullOrEmpty(BackgroundImage))
3109                 {
3110                     PropertyMap bgMap = this.Background;
3111                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
3112                     bgMap[ImageVisualProperty.SynchronousLoading] = temp;
3113                     temp.Dispose();
3114                     Background = bgMap;
3115                 }
3116             }
3117         }
3118
3119         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3120         [EditorBrowsable(EditorBrowsableState.Never)]
3121         public Vector4 UpdateAreaHint
3122         {
3123             get
3124             {
3125                 return (Vector4)GetValue(UpdateAreaHintProperty);
3126             }
3127             set
3128             {
3129                 SetValue(UpdateAreaHintProperty, value);
3130                 NotifyPropertyChanged();
3131             }
3132         }
3133
3134         /// <summary>
3135         /// Enable/Disable ControlState propagation for children.
3136         /// It is false by default.
3137         /// If the View needs to share ControlState with descendants, please set it true.
3138         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
3139         /// </summary>
3140         [EditorBrowsable(EditorBrowsableState.Never)]
3141         public bool EnableControlStatePropagation
3142         {
3143             get
3144             {
3145                 return (bool)GetValue(EnableControlStatePropagationProperty);
3146             }
3147             set
3148             {
3149                 SetValue(EnableControlStatePropagationProperty, value);
3150                 NotifyPropertyChanged();
3151             }
3152         }
3153
3154         private bool InternalEnableControlStatePropagation
3155         {
3156             get => themeData?.ControlStatePropagation ?? false;
3157             set
3158             {
3159                 if (InternalEnableControlStatePropagation == value) return;
3160
3161                 if (themeData == null) themeData = new ThemeData();
3162
3163                 themeData.ControlStatePropagation = value;
3164
3165                 foreach (View child in Children)
3166                 {
3167                     child.EnableControlStatePropagation = value;
3168                 }
3169             }
3170         }
3171
3172         /// <summary>
3173         /// The ControlStates can propagate from the parent.
3174         /// Listed ControlStates will be accepted propagation of the parent ControlState changes
3175         /// if parent view EnableControlState is true.
3176         /// <see cref="EnableControlState"/>.
3177         /// Default is ControlState.All, so every ControlStates will be propagated from the parent.
3178         /// </summary>
3179         [EditorBrowsable(EditorBrowsableState.Never)]
3180         public ControlState PropagatableControlStates
3181         {
3182             get
3183             {
3184                 return (ControlState)GetValue(PropagatableControlStatesProperty);
3185             }
3186             set
3187             {
3188                 SetValue(PropagatableControlStatesProperty, value);
3189                 NotifyPropertyChanged();
3190             }
3191         }
3192
3193         private ControlState InternalPropagatableControlStates
3194         {
3195             get => propagatableControlStates;
3196             set => propagatableControlStates = value;
3197         }
3198
3199         /// <summary>
3200         /// By default, it is false in View, true in Control.
3201         /// Note that if the value is true, the View will be a touch receptor.
3202         /// </summary>
3203         [EditorBrowsable(EditorBrowsableState.Never)]
3204         public bool EnableControlState
3205         {
3206             get
3207             {
3208                 return (bool)GetValue(EnableControlStateProperty);
3209             }
3210             set
3211             {
3212                 SetValue(EnableControlStateProperty, value);
3213             }
3214         }
3215
3216         /// <summary>
3217         /// Whether the actor grab all touches even if touch leaves its boundary.
3218         /// </summary>
3219         /// <returns>true, if it grab all touch after start</returns>
3220         [EditorBrowsable(EditorBrowsableState.Never)]
3221         public bool GrabTouchAfterLeave
3222         {
3223             get
3224             {
3225                 return (bool)GetValue(GrabTouchAfterLeaveProperty);
3226             }
3227             set
3228             {
3229                 SetValue(GrabTouchAfterLeaveProperty, value);
3230             }
3231         }
3232
3233         private bool InternalGrabTouchAfterLeave
3234         {
3235             get
3236             {
3237                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
3238             }
3239             set
3240             {
3241                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
3242
3243                 // Use custom HitTest callback only if GrabTouchAfterLeave is true.
3244                 if (value)
3245                 {
3246                     RegisterHitTestCallback();
3247                 }
3248                 else
3249                 {
3250                     UnregisterHitTestCallback();
3251                 }
3252
3253                 NotifyPropertyChanged();
3254             }
3255         }
3256
3257         /// <summary>
3258         /// Whether the view will only receive own touch.
3259         /// </summary>
3260         /// <returns>true, if it only receives touches that started from itself.</returns>
3261         [EditorBrowsable(EditorBrowsableState.Never)]
3262         public bool AllowOnlyOwnTouch
3263         {
3264             get
3265             {
3266                 return (bool)GetValue(AllowOnlyOwnTouchProperty);
3267             }
3268             set
3269             {
3270                 SetValue(AllowOnlyOwnTouchProperty, value);
3271             }
3272         }
3273
3274         private bool InternalAllowOnlyOwnTouch
3275         {
3276             get
3277             {
3278                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
3279             }
3280             set
3281             {
3282                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
3283                 NotifyPropertyChanged();
3284             }
3285         }
3286
3287         /// <summary>
3288         /// Determines which blend equation will be used to render renderers of this actor.
3289         /// </summary>
3290         /// <returns>blend equation enum currently assigned</returns>
3291         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
3292         [EditorBrowsable(EditorBrowsableState.Never)]
3293         public BlendEquationType BlendEquation
3294         {
3295             get
3296             {
3297                 return (BlendEquationType)GetValue(BlendEquationProperty);
3298             }
3299             set
3300             {
3301                 SetValue(BlendEquationProperty, value);
3302             }
3303         }
3304
3305         private BlendEquationType InternalBlendEquation
3306         {
3307             get
3308             {
3309                 return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
3310             }
3311             set
3312             {
3313                 Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
3314                 NotifyPropertyChanged();
3315             }
3316         }
3317
3318         /// <summary>
3319         /// If the value is true, the View will change its style as the theme changes.
3320         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3321         /// </summary>
3322         /// <since_tizen> 9 </since_tizen>
3323         public bool ThemeChangeSensitive
3324         {
3325             get => (bool)GetValue(ThemeChangeSensitiveProperty);
3326             set => SetValue(ThemeChangeSensitiveProperty, value);
3327         }
3328
3329         /// <summary>
3330         /// Create Style, it is abstract function and must be override.
3331         /// </summary>
3332         [EditorBrowsable(EditorBrowsableState.Never)]
3333         protected virtual ViewStyle CreateViewStyle()
3334         {
3335             return new ViewStyle();
3336         }
3337
3338         /// <summary>
3339         /// Called after the View's ControlStates changed.
3340         /// </summary>
3341         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3342         [EditorBrowsable(EditorBrowsableState.Never)]
3343         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3344         {
3345         }
3346
3347         /// <summary>
3348         /// </summary>
3349         [EditorBrowsable(EditorBrowsableState.Never)]
3350         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3351         {
3352             isThemeChanged = true;
3353             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3354             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3355             isThemeChanged = false;
3356         }
3357
3358         /// <summary>
3359         /// Apply style instance to the view.
3360         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3361         /// </summary>
3362         /// <since_tizen> 9 </since_tizen>
3363         public virtual void ApplyStyle(ViewStyle viewStyle)
3364         {
3365             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3366
3367             if (themeData == null) themeData = new ThemeData();
3368
3369             themeData.viewStyle = viewStyle;
3370
3371             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3372             {
3373                 // Nothing to apply
3374                 return;
3375             }
3376
3377             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3378
3379             if (bindablePropertyOfView == null)
3380             {
3381                 return;
3382             }
3383
3384             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3385             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3386
3387             foreach (var sourceProperty in dirtyStyleProperties)
3388             {
3389                 var sourceValue = viewStyle.GetValue(sourceProperty);
3390
3391                 if (sourceValue == null)
3392                 {
3393                     continue;
3394                 }
3395
3396                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3397
3398                 // Do not set value again when theme is changed and the value has been set already.
3399                 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3400                 {
3401                     continue;
3402                 }
3403
3404                 if (destinationProperty != null)
3405                 {
3406                     InternalSetValue(destinationProperty, sourceValue);
3407                 }
3408             }
3409         }
3410
3411         /// <summary>
3412         /// Get whether the View is culled or not.
3413         /// True means that the View is out of the view frustum.
3414         /// </summary>
3415         /// <remarks>
3416         /// Hidden-API (Inhouse-API).
3417         /// </remarks>
3418         [EditorBrowsable(EditorBrowsableState.Never)]
3419         public bool Culled
3420         {
3421             get
3422             {
3423                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
3424             }
3425         }
3426
3427         /// <summary>
3428         /// Set or Get TransitionOptions for the page transition.
3429         /// This property is used to define how this view will be transitioned during Page switching.
3430         /// </summary>
3431         /// <since_tizen> 9 </since_tizen>
3432         public TransitionOptions TransitionOptions
3433         {
3434             get
3435             {
3436                 return GetValue(TransitionOptionsProperty) as TransitionOptions;
3437             }
3438             set
3439             {
3440                 SetValue(TransitionOptionsProperty, value);
3441                 NotifyPropertyChanged();
3442             }
3443         }
3444
3445         private TransitionOptions InternalTransitionOptions
3446         {
3447             set
3448             {
3449                 transitionOptions = value;
3450             }
3451             get
3452             {
3453                 return transitionOptions;
3454             }
3455         }
3456
3457         /// <summary>
3458         /// Called when the view is hit through TouchEvent or GestureEvent.
3459         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
3460         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
3461         /// User can override whether hit or not in HitTest.
3462         /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
3463         /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
3464         /// </summary>
3465         // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
3466         [EditorBrowsable(EditorBrowsableState.Never)]
3467         protected virtual bool HitTest(Touch touch)
3468         {
3469             return true;
3470         }
3471
3472         /// <summary>
3473         /// Retrieve the View's current Color.
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 Color CurrentColor => GetCurrentColor();
3483
3484         /// <summary>
3485         /// Retrieve the current scale factor applied to the View.
3486         /// </summary>
3487         /// <remarks>
3488         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
3489         /// 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).
3490         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
3491         /// and users can get the current actual values through them.
3492         /// </remarks>
3493         [EditorBrowsable(EditorBrowsableState.Never)]
3494         public Vector3 CurrentScale => GetCurrentScale();
3495
3496     }
3497 }