[NUI] Add FocusableInTouch property
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2021 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
35         internal BackgroundExtraData backgroundExtraData;
36
37         private bool layoutSet = false;
38         private LayoutItem layout; // Exclusive layout assigned to this View.
39
40         // List of transitions paired with the condition that uses the transition.
41         private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
42         private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
43         private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
44         private float weight = 0.0f; // Weighting of child View in a Layout
45         private bool backgroundImageSynchronosLoading = false;
46         private bool excludeLayouting = false;
47         private LayoutTransition layoutTransition;
48         private TransitionOptions transitionOptions = null;
49         private ThemeData themeData;
50
51         static View()
52         {
53             RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
54             RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
55             RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
56             RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
57
58             RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
59             RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
60             RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
61             RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
62
63             RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
64             RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
65             RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
66             RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
67         }
68
69         /// <summary>
70         /// Creates a new instance of a view.
71         /// </summary>
72         /// <since_tizen> 3 </since_tizen>
73         public View() : this(Interop.View.New(), true)
74         {
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76         }
77
78         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
79         [EditorBrowsable(EditorBrowsableState.Never)]
80         public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
81         {
82         }
83
84         /// <summary>
85         /// Create a new instance of a View with setting the status of shown or hidden.
86         /// </summary>
87         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
88         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
89         [EditorBrowsable(EditorBrowsableState.Never)]
90         public View(bool shown) : this(Interop.View.New(), true)
91         {
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93             SetVisible(shown);
94         }
95
96         internal View(View uiControl, bool shown = true) : this(Interop.View.NewView(View.getCPtr(uiControl)), true)
97         {
98             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99             if (!shown)
100             {
101                 SetVisible(false);
102             }
103
104             backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
105         }
106
107         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
108         {
109             InitializeStyle(viewStyle);
110         }
111
112         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn)
113         {
114             if (HasBody())
115             {
116                 PositionUsesPivotPoint = false;
117             }
118
119             onWindowSendEventCallback = SendViewAddedEventToWindow;
120             this.OnWindowSignal().Connect(onWindowSendEventCallback);
121
122             if (!shown)
123             {
124                 SetVisible(false);
125             }
126         }
127
128         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
129         {
130             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131
132             if (!shown)
133             {
134                 SetVisible(false);
135             }
136         }
137
138         /// <summary>
139         /// The event that is triggered when the View's ControlState is changed.
140         /// </summary>
141         [EditorBrowsable(EditorBrowsableState.Never)]
142         public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
143
144         internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
145
146
147         /// <summary>
148         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
149         /// </summary>
150         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
151         [EditorBrowsable(EditorBrowsableState.Never)]
152         public bool LayoutSet
153         {
154             get
155             {
156                 return layoutSet;
157             }
158         }
159
160         /// <summary>
161         /// Flag to allow Layouting to be disabled for Views.
162         /// Once a View has a Layout set then any children added to Views from then on will receive
163         /// automatic Layouts.
164         /// </summary>
165         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
166         [EditorBrowsable(EditorBrowsableState.Never)]
167         public static bool LayoutingDisabled { get; set; } = true;
168
169         /// <summary>
170         /// Deprecate. Please do not use this.
171         /// The style instance applied to this view.
172         /// Note that please do not modify the ViewStyle.
173         /// Modifying ViewStyle will affect other views with same ViewStyle.
174         /// </summary>
175         [EditorBrowsable(EditorBrowsableState.Never)]
176         protected ViewStyle ViewStyle
177         {
178             get
179             {
180                 if (themeData == null) themeData = new ThemeData();
181
182                 if (themeData.viewStyle == null)
183                 {
184                     ApplyStyle(CreateViewStyle());
185                 }
186                 return themeData.viewStyle;
187             }
188         }
189
190         /// <summary>
191         /// Get/Set the control state.
192         /// Note that the ControlState only available for the classes derived from Control.
193         /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
194         /// please set <see cref="EnableControlState"/> to true.
195         /// </summary>
196         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
197         [EditorBrowsable(EditorBrowsableState.Never)]
198         public ControlState ControlState
199         {
200             get
201             {
202                 return themeData == null ? ControlState.Normal : themeData.controlStates;
203             }
204             protected set
205             {
206                 if (ControlState == value)
207                 {
208                     return;
209                 }
210
211                 var prevState = ControlState;
212
213                 if (themeData == null) themeData = new ThemeData();
214                 themeData.controlStates = value;
215
216                 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
217
218                 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
219
220                 if (themeData.ControlStatePropagation)
221                 {
222                     foreach (View child in Children)
223                     {
224                         child.ControlState = value;
225                     }
226                 }
227
228                 OnControlStateChanged(changeInfo);
229
230                 ControlStateChangedEvent?.Invoke(this, changeInfo);
231             }
232         }
233
234         /// <summary>
235         /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
236         /// </summary>
237         /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
238         [EditorBrowsable(EditorBrowsableState.Never)]
239         public bool ExcludeLayouting
240         {
241             get
242             {
243                 return excludeLayouting;
244             }
245             set
246             {
247                 excludeLayouting = value;
248                 if (Layout != null && Layout.SetPositionByLayout == value)
249                 {
250                     Layout.SetPositionByLayout = !value;
251                     Layout.RequestLayout();
252                 }
253             }
254         }
255
256         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
257         [EditorBrowsable(EditorBrowsableState.Never)]
258         public bool IsResourcesCreated
259         {
260             get
261             {
262                 return Application.Current.IsResourcesCreated;
263             }
264         }
265
266         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
267         [EditorBrowsable(EditorBrowsableState.Never)]
268         public ResourceDictionary XamlResources
269         {
270             get
271             {
272                 return Application.Current.XamlResources;
273             }
274             set
275             {
276                 Application.Current.XamlResources = value;
277             }
278         }
279
280         /// <summary>
281         /// The StyleName, type string.
282         /// The value indicates DALi style name defined in json theme file.
283         /// </summary>
284         /// <since_tizen> 3 </since_tizen>
285         public string StyleName
286         {
287             get
288             {
289                 return (string)GetValue(StyleNameProperty);
290             }
291             set
292             {
293                 SetValue(StyleNameProperty, value);
294                 NotifyPropertyChanged();
295             }
296         }
297
298         /// <summary>
299         /// The KeyInputFocus, type bool.
300         /// </summary>
301         [EditorBrowsable(EditorBrowsableState.Never)]
302         public bool KeyInputFocus
303         {
304             get
305             {
306                 return (bool)GetValue(KeyInputFocusProperty);
307             }
308             set
309             {
310                 SetValue(KeyInputFocusProperty, value);
311                 NotifyPropertyChanged();
312             }
313         }
314
315         /// <summary>
316         /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
317         /// </summary>
318         /// <remarks>
319         /// <para>
320         /// The property cascade chaining set is possible. For example, this (view.BackgroundColor.X = 0.1f;) is possible.
321         /// </para>
322         /// <para>
323         /// Animatable - This property can be animated using <c>Animation</c> class.
324         /// <code>
325         /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
326         /// </code>
327         /// </para>
328         /// </remarks>
329         /// <since_tizen> 3 </since_tizen>
330         public Color BackgroundColor
331         {
332             get
333             {
334                 Color temp = (Color)GetValue(BackgroundColorProperty);
335                 return new Color(OnBackgroundColorChanged, temp.R, temp.G, temp.B, temp.A);
336             }
337             set
338             {
339                 SetValue(BackgroundColorProperty, value);
340                 NotifyPropertyChanged();
341             }
342         }
343
344         /// <summary>
345         /// The mutually exclusive with "backgroundColor" and "background" type Map.
346         /// </summary>
347         /// <since_tizen> 3 </since_tizen>
348         public string BackgroundImage
349         {
350             get
351             {
352                 return (string)GetValue(BackgroundImageProperty);
353             }
354             set
355             {
356                 SetValue(BackgroundImageProperty, value);
357                 NotifyPropertyChanged();
358             }
359         }
360
361         /// <summary>
362         /// Get or set the border of background image.
363         /// </summary>
364         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
365         [EditorBrowsable(EditorBrowsableState.Never)]
366         public Rectangle BackgroundImageBorder
367         {
368             get
369             {
370                 return (Rectangle)GetValue(BackgroundImageBorderProperty);
371             }
372             set
373             {
374                 SetValue(BackgroundImageBorderProperty, value);
375                 NotifyPropertyChanged();
376             }
377         }
378
379         /// <summary>
380         /// The background of view.
381         /// </summary>
382         /// <since_tizen> 3 </since_tizen>
383         public Tizen.NUI.PropertyMap Background
384         {
385             get
386             {
387                 return (PropertyMap)GetValue(BackgroundProperty);
388             }
389             set
390             {
391                 SetValue(BackgroundProperty, value);
392                 NotifyPropertyChanged();
393             }
394         }
395
396         /// <summary>
397         /// Describes a shadow as an image for a View.
398         /// It is null by default.
399         /// </summary>
400         /// <remarks>
401         /// Getter returns copied instance of current shadow.
402         /// </remarks>
403         /// <remarks>
404         /// The mutually exclusive with "BoxShadow".
405         /// </remarks>
406         /// <remarks>
407         /// <para>
408         /// Animatable - This property can be animated using <c>Animation</c> class.
409         /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
410         /// <code>
411         /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
412         /// </code>
413         /// Animatable sub-property : Offset.
414         /// </para>
415         /// </remarks>
416         [EditorBrowsable(EditorBrowsableState.Never)]
417         public ImageShadow ImageShadow
418         {
419             get
420             {
421                 return (ImageShadow)GetValue(ImageShadowProperty);
422             }
423             set
424             {
425                 SetValue(ImageShadowProperty, value);
426                 NotifyPropertyChanged();
427             }
428         }
429
430         /// <summary>
431         /// Describes a box shaped shadow drawing for a View.
432         /// It is null by default.
433         /// </summary>
434         /// <remarks>
435         /// The mutually exclusive with "ImageShadow".
436         /// </remarks>
437         /// <remarks>
438         /// <para>
439         /// Animatable - This property can be animated using <c>Animation</c> class.
440         /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
441         /// <code>
442         /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
443         /// </code>
444         /// Animatable sub-property : Offset, Color, BlurRadius.
445         /// </para>
446         /// </remarks>
447         /// <since_tizen> 9 </since_tizen>
448         public Shadow BoxShadow
449         {
450             get
451             {
452                 return (Shadow)GetValue(BoxShadowProperty);
453             }
454             set
455             {
456                 SetValue(BoxShadowProperty, value);
457                 NotifyPropertyChanged();
458             }
459         }
460
461         /// <summary>
462         /// The radius for the rounded corners of the View.
463         /// This will rounds background and shadow edges.
464         /// 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).
465         /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
466         /// </summary>
467         /// <remarks>
468         /// <para>
469         /// Animatable - This property can be animated using <c>Animation</c> class.
470         /// </para>
471         /// </remarks>
472         /// <since_tizen> 9 </since_tizen>
473         public Vector4 CornerRadius
474         {
475             get
476             {
477                 return (Vector4)GetValue(CornerRadiusProperty);
478             }
479             set
480             {
481                 SetValue(CornerRadiusProperty, value);
482                 NotifyPropertyChanged();
483             }
484         }
485
486         /// <summary>
487         /// Whether the CornerRadius property value is relative (percentage [0.0f to 1.0f] of the view size) or absolute (in world units).
488         /// It is absolute by default.
489         /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
490         /// </summary>
491         /// <since_tizen> 9 </since_tizen>
492         public VisualTransformPolicyType CornerRadiusPolicy
493         {
494             get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
495             set => SetValue(CornerRadiusPolicyProperty, value);
496         }
497
498         /// <summary>
499         /// The width for the borderline of the View.
500         /// This will draw borderline at background.
501         /// Note that, an image background may not have borderline if it uses a Border property.
502         /// </summary>
503         /// <remarks>
504         /// <para>
505         /// Animatable - This property can be animated using <c>Animation</c> class.
506         /// </para>
507         /// </remarks>
508         /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
509         [EditorBrowsable(EditorBrowsableState.Never)]
510         public float BorderlineWidth
511         {
512             get
513             {
514                 return (float)GetValue(BorderlineWidthProperty);
515             }
516             set
517             {
518                 SetValue(BorderlineWidthProperty, value);
519                 NotifyPropertyChanged();
520             }
521         }
522
523         /// <summary>
524         /// The color for the borderline of the View.
525         /// It is Color.Black by default.
526         /// </summary>
527         /// <remarks>
528         /// <para>
529         /// Animatable - This property can be animated using <c>Animation</c> class.
530         /// </para>
531         /// </remarks>
532         /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
533         [EditorBrowsable(EditorBrowsableState.Never)]
534         public Color BorderlineColor
535         {
536             get
537             {
538                 return (Color)GetValue(BorderlineColorProperty);
539             }
540             set
541             {
542                 SetValue(BorderlineColorProperty, value);
543                 NotifyPropertyChanged();
544             }
545         }
546
547         /// <summary>
548         /// The Relative offset for the borderline of the View.
549         /// recommand [-1.0f to 1.0f] range.
550         /// If -1.0f, borderline draw inside of View.
551         /// If 1.0f, borderline draw outside of View.
552         /// If 0.0f, borderline draw half at inside and half at outside.
553         /// It is 0.0f by default.
554         /// </summary>
555         /// <remarks>
556         /// <para>
557         /// Animatable - This property can be animated using <c>Animation</c> class.
558         /// </para>
559         /// </remarks>
560         /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
561         [EditorBrowsable(EditorBrowsableState.Never)]
562         public float BorderlineOffset
563         {
564             get
565             {
566                 return (float)GetValue(BorderlineOffsetProperty);
567             }
568             set
569             {
570                 SetValue(BorderlineOffsetProperty, value);
571                 NotifyPropertyChanged();
572             }
573         }
574
575         /// <summary>
576         /// The current state of the view.
577         /// </summary>
578         /// <since_tizen> 3 </since_tizen>
579         public States State
580         {
581             get
582             {
583                 return (States)GetValue(StateProperty);
584             }
585             set
586             {
587                 SetValue(StateProperty, value);
588                 NotifyPropertyChanged();
589             }
590         }
591
592         /// <summary>
593         /// The current sub state of the view.
594         /// </summary>
595         /// <since_tizen> 3 </since_tizen>
596         public States SubState
597         {
598             get
599             {
600                 return (States)GetValue(SubStateProperty);
601             }
602             set
603             {
604                 SetValue(SubStateProperty, value);
605                 NotifyPropertyChanged();
606             }
607         }
608
609         /// <summary>
610         /// Displays a tooltip
611         /// </summary>
612         /// <since_tizen> 3 </since_tizen>
613         public Tizen.NUI.PropertyMap Tooltip
614         {
615             get
616             {
617                 return (PropertyMap)GetValue(TooltipProperty);
618             }
619             set
620             {
621                 SetValue(TooltipProperty, value);
622                 NotifyPropertyChanged();
623             }
624         }
625
626         /// <summary>
627         /// Displays a tooltip as a text.
628         /// </summary>
629         /// <since_tizen> 3 </since_tizen>
630         public string TooltipText
631         {
632             get
633             {
634                 using (var propertyValue = GetProperty(Property.TOOLTIP))
635                 {
636                     if (propertyValue != null && propertyValue.Get(out string retrivedValue))
637                     {
638                         return retrivedValue;
639                     }
640                     NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
641                     return "error to get TooltipText";
642                 }
643             }
644             set
645             {
646                 var temp = new Tizen.NUI.PropertyValue(value);
647                 SetProperty(View.Property.TOOLTIP, temp);
648                 temp.Dispose();
649                 NotifyPropertyChanged();
650             }
651         }
652
653         /// <summary>
654         /// The Child property of FlexContainer.<br />
655         /// The proportion of the free space in the container, the flex item will receive.<br />
656         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
657         /// </summary>
658         /// <since_tizen> 3 </since_tizen>
659         [Obsolete("Deprecated in API8, will be removed in API10.")]
660         public float Flex
661         {
662             get
663             {
664                 return (float)GetValue(FlexProperty);
665             }
666             set
667             {
668                 SetValue(FlexProperty, value);
669                 NotifyPropertyChanged();
670             }
671         }
672
673         /// <summary>
674         /// The Child property of FlexContainer.<br />
675         /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
676         /// </summary>
677         /// <since_tizen> 3 </since_tizen>
678         [Obsolete("Deprecated in API8, will be removed in API10.")]
679         public int AlignSelf
680         {
681             get
682             {
683                 return (int)GetValue(AlignSelfProperty);
684             }
685             set
686             {
687                 SetValue(AlignSelfProperty, value);
688                 NotifyPropertyChanged();
689             }
690         }
691
692         /// <summary>
693         /// The Child property of FlexContainer.<br />
694         /// The space around the flex item.<br />
695         /// </summary>
696         /// <remarks>
697         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
698         /// </remarks>
699         /// <since_tizen> 3 </since_tizen>
700         [Obsolete("Deprecated in API8, will be removed in API10.")]
701         public Vector4 FlexMargin
702         {
703             get
704             {
705                 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
706                 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
707             }
708             set
709             {
710                 SetValue(FlexMarginProperty, value);
711                 NotifyPropertyChanged();
712             }
713         }
714
715         /// <summary>
716         /// The top-left cell this child occupies, if not set, the first available cell is used.
717         /// </summary>
718         /// <remarks>
719         /// The property cascade chaining set is possible. For example, this (view.CellIndex.X = 0.1f;) is possible.
720         /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
721         /// </remarks>
722         /// <since_tizen> 3 </since_tizen>
723         public Vector2 CellIndex
724         {
725             get
726             {
727                 Vector2 temp = (Vector2)GetValue(CellIndexProperty);
728                 return new Vector2(OnCellIndexChanged, temp.X, temp.Y);
729             }
730             set
731             {
732                 SetValue(CellIndexProperty, value);
733                 NotifyPropertyChanged();
734             }
735         }
736
737         /// <summary>
738         /// The number of rows this child occupies, if not set, the default value is 1.
739         /// </summary>
740         /// <remarks>
741         /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
742         /// </remarks>
743         /// <since_tizen> 3 </since_tizen>
744         public float RowSpan
745         {
746             get
747             {
748                 return (float)GetValue(RowSpanProperty);
749             }
750             set
751             {
752                 SetValue(RowSpanProperty, value);
753                 NotifyPropertyChanged();
754             }
755         }
756
757         /// <summary>
758         /// The number of columns this child occupies, if not set, the default value is 1.
759         /// </summary>
760         /// <remarks>
761         /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
762         /// </remarks>
763         /// <since_tizen> 3 </since_tizen>
764         public float ColumnSpan
765         {
766             get
767             {
768                 return (float)GetValue(ColumnSpanProperty);
769             }
770             set
771             {
772                 SetValue(ColumnSpanProperty, value);
773                 NotifyPropertyChanged();
774             }
775         }
776
777         /// <summary>
778         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
779         /// </summary>
780         /// <remarks>
781         /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
782         /// </remarks>
783         /// <since_tizen> 3 </since_tizen>
784         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
785         {
786             get
787             {
788                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
789             }
790             set
791             {
792                 SetValue(CellHorizontalAlignmentProperty, value);
793                 NotifyPropertyChanged();
794             }
795         }
796
797         /// <summary>
798         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
799         /// </summary>
800         /// <remarks>
801         /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
802         /// </remarks>
803         /// <since_tizen> 3 </since_tizen>
804         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
805         {
806             get
807             {
808                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
809             }
810             set
811             {
812                 SetValue(CellVerticalAlignmentProperty, value);
813                 NotifyPropertyChanged();
814             }
815         }
816
817         /// <summary>
818         /// The left focusable view.<br />
819         /// This will return null if not set.<br />
820         /// This will also return null if the specified left focusable view is not on a window.<br />
821         /// </summary>
822         /// <since_tizen> 3 </since_tizen>
823         public View LeftFocusableView
824         {
825             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
826             get
827             {
828                 return (View)GetValue(LeftFocusableViewProperty);
829             }
830             set
831             {
832                 SetValue(LeftFocusableViewProperty, value);
833                 NotifyPropertyChanged();
834             }
835         }
836
837         /// <summary>
838         /// The right focusable view.<br />
839         /// This will return null if not set.<br />
840         /// This will also return null if the specified right focusable view is not on a window.<br />
841         /// </summary>
842         /// <since_tizen> 3 </since_tizen>
843         public View RightFocusableView
844         {
845             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
846             get
847             {
848                 return (View)GetValue(RightFocusableViewProperty);
849             }
850             set
851             {
852                 SetValue(RightFocusableViewProperty, value);
853                 NotifyPropertyChanged();
854             }
855         }
856
857         /// <summary>
858         /// The up focusable view.<br />
859         /// This will return null if not set.<br />
860         /// This will also return null if the specified up focusable view is not on a window.<br />
861         /// </summary>
862         /// <since_tizen> 3 </since_tizen>
863         public View UpFocusableView
864         {
865             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
866             get
867             {
868                 return (View)GetValue(UpFocusableViewProperty);
869             }
870             set
871             {
872                 SetValue(UpFocusableViewProperty, value);
873                 NotifyPropertyChanged();
874             }
875         }
876
877         /// <summary>
878         /// The down focusable view.<br />
879         /// This will return null if not set.<br />
880         /// This will also return null if the specified down focusable view is not on a window.<br />
881         /// </summary>
882         /// <since_tizen> 3 </since_tizen>
883         public View DownFocusableView
884         {
885             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
886             get
887             {
888                 return (View)GetValue(DownFocusableViewProperty);
889             }
890             set
891             {
892                 SetValue(DownFocusableViewProperty, value);
893                 NotifyPropertyChanged();
894             }
895         }
896
897         /// <summary>
898         /// Whether the view should be focusable by keyboard navigation.
899         /// </summary>
900         /// <since_tizen> 3 </since_tizen>
901         public bool Focusable
902         {
903             set
904             {
905                 SetValue(FocusableProperty, value);
906                 NotifyPropertyChanged();
907             }
908             get
909             {
910                 return (bool)GetValue(FocusableProperty);
911             }
912         }
913
914         /// <summary>
915         /// Whether this view can focus by touch.
916         /// If Focusable is false, FocusableInTouch is disabled.
917         /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
918         /// </summary>
919         [EditorBrowsable(EditorBrowsableState.Never)]
920         public bool FocusableInTouch
921         {
922             set
923             {
924                 SetValue(FocusableInTouchProperty, value);
925                 NotifyPropertyChanged();
926             }
927             get
928             {
929                 return (bool)GetValue(FocusableInTouchProperty);
930             }
931         }
932
933         /// <summary>
934         ///  Retrieves the position of the view.<br />
935         ///  The coordinates are relative to the view's parent.<br />
936         /// </summary>
937         /// <since_tizen> 3 </since_tizen>
938         public Position CurrentPosition
939         {
940             get
941             {
942                 return GetCurrentPosition();
943             }
944         }
945
946         /// <summary>
947         /// Sets the size of a view for the width and the height.<br />
948         /// Geometry can be scaled to fit within this area.<br />
949         /// This does not interfere with the view's scale factor.<br />
950         /// The views default depth is the minimum of width and height.<br />
951         /// </summary>
952         /// <remarks>
953         /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
954         /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
955         /// </remarks>
956         /// <since_tizen> 3 </since_tizen>
957         public Size2D Size2D
958         {
959             get
960             {
961                 Size2D temp = (Size2D)GetValue(Size2DProperty);
962                 int width = temp.Width;
963                 int height = temp.Height;
964
965                 if (this.Layout == null)
966                 {
967                     if (width < 0) { width = 0; }
968                     if (height < 0) { height = 0; }
969                 }
970
971                 return new Size2D(OnSize2DChanged, width, height);
972             }
973             set
974             {
975                 SetValue(Size2DProperty, value);
976
977                 NotifyPropertyChanged();
978             }
979         }
980
981         /// <summary>
982         ///  Retrieves the size of the view.<br />
983         ///  The coordinates are relative to the view's parent.<br />
984         /// </summary>
985         /// <since_tizen> 3 </since_tizen>
986         public Size2D CurrentSize
987         {
988             get
989             {
990                 return GetCurrentSize();
991             }
992         }
993
994         /// <summary>
995         /// Retrieves and sets the view's opacity.<br />
996         /// </summary>
997         /// <since_tizen> 3 </since_tizen>
998         public float Opacity
999         {
1000             get
1001             {
1002                 return (float)GetValue(OpacityProperty);
1003             }
1004             set
1005             {
1006                 SetValue(OpacityProperty, value);
1007                 NotifyPropertyChanged();
1008             }
1009         }
1010
1011         /// <summary>
1012         /// Sets the position of the view for X and Y.<br />
1013         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1014         /// If the position inheritance is disabled, sets the world position.<br />
1015         /// </summary>
1016         /// <remarks>
1017         /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
1018         /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
1019         /// </remarks>
1020         /// <since_tizen> 3 </since_tizen>
1021         public Position2D Position2D
1022         {
1023             get
1024             {
1025                 Position2D temp = (Position2D)GetValue(Position2DProperty);
1026                 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
1027             }
1028             set
1029             {
1030                 SetValue(Position2DProperty, value);
1031                 NotifyPropertyChanged();
1032             }
1033         }
1034
1035         /// <summary>
1036         /// Retrieves the screen position of the view.<br />
1037         /// </summary>
1038         /// <since_tizen> 3 </since_tizen>
1039         public Vector2 ScreenPosition
1040         {
1041             get
1042             {
1043                 Vector2 temp = new Vector2(0.0f, 0.0f);
1044                 var pValue = GetProperty(View.Property.ScreenPosition);
1045                 pValue.Get(temp);
1046                 pValue.Dispose();
1047                 return temp;
1048             }
1049         }
1050
1051         /// <summary>
1052         /// Determines whether the pivot point should be used to determine the position of the view.
1053         /// This is false by default.
1054         /// </summary>
1055         /// <remarks>If false, then the top-left of the view is used for the position.
1056         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1057         /// </remarks>
1058         /// <since_tizen> 3 </since_tizen>
1059         public bool PositionUsesPivotPoint
1060         {
1061             get
1062             {
1063                 return (bool)GetValue(PositionUsesPivotPointProperty);
1064             }
1065             set
1066             {
1067                 SetValue(PositionUsesPivotPointProperty, value);
1068                 NotifyPropertyChanged();
1069             }
1070         }
1071
1072         /// <summary>
1073         /// Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead!
1074         /// </summary>
1075         /// <since_tizen> 3 </since_tizen>
1076         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead! " +
1077             "Like: " +
1078             "View view = new View(); " +
1079             "view.PivotPoint = PivotPoint.Center; " +
1080             "view.PositionUsesPivotPoint = true;" +
1081             " Deprecated in API5: Will be removed in API8")]
1082         [EditorBrowsable(EditorBrowsableState.Never)]
1083         public bool PositionUsesAnchorPoint
1084         {
1085             get
1086             {
1087                 bool temp = false;
1088                 var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
1089                 pValue.Get(out temp);
1090                 pValue.Dispose();
1091                 return temp;
1092             }
1093             set
1094             {
1095                 var temp = new Tizen.NUI.PropertyValue(value);
1096                 SetProperty(View.Property.PositionUsesAnchorPoint, temp);
1097                 temp.Dispose();
1098                 NotifyPropertyChanged();
1099             }
1100         }
1101
1102         /// <summary>
1103         /// Queries whether the view is connected to the stage.<br />
1104         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1105         /// </summary>
1106         /// <since_tizen> 3 </since_tizen>
1107         public bool IsOnWindow
1108         {
1109             get
1110             {
1111                 return OnWindow();
1112             }
1113         }
1114
1115         /// <summary>
1116         /// Gets the depth in the hierarchy for the view.
1117         /// </summary>
1118         /// <since_tizen> 3 </since_tizen>
1119         public int HierarchyDepth
1120         {
1121             get
1122             {
1123                 return GetHierarchyDepth();
1124             }
1125         }
1126
1127         /// <summary>
1128         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1129         /// </summary>
1130         /// <remarks>
1131         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1132         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1133         /// The values set by this property will likely change.
1134         /// </remarks>
1135         /// <since_tizen> 3 </since_tizen>
1136         public int SiblingOrder
1137         {
1138             get
1139             {
1140                 return (int)GetValue(SiblingOrderProperty);
1141             }
1142             set
1143             {
1144                 SetValue(SiblingOrderProperty, value);
1145
1146                 LayoutGroup layout = Layout as LayoutGroup;
1147                 layout?.ChangeLayoutSiblingOrder(value);
1148
1149                 NotifyPropertyChanged();
1150             }
1151         }
1152
1153         /// <summary>
1154         /// Returns the natural size of the view.
1155         /// </summary>
1156         /// <remarks>
1157         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1158         /// </remarks>
1159         /// <since_tizen> 5 </since_tizen>
1160         public Vector3 NaturalSize
1161         {
1162             get
1163             {
1164                 Vector3 ret = new Vector3(Interop.Actor.GetNaturalSize(SwigCPtr), true);
1165                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1166                 return ret;
1167             }
1168         }
1169
1170         /// <summary>
1171         /// Returns the natural size (Size2D) of the view.
1172         /// </summary>
1173         /// <remarks>
1174         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1175         /// </remarks>
1176         /// <since_tizen> 4 </since_tizen>
1177         public Size2D NaturalSize2D
1178         {
1179             get
1180             {
1181                 Vector3 temp = new Vector3(Interop.Actor.GetNaturalSize(SwigCPtr), true);
1182                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1183
1184                 Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
1185                 temp.Dispose();
1186                 return sz;
1187             }
1188         }
1189
1190         /// <summary>
1191         /// Gets or sets the origin of a view within its parent's area.<br />
1192         /// 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 />
1193         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1194         /// A view's position is the distance between this origin and the view's anchor-point.<br />
1195         /// </summary>
1196         /// <pre>The view has been initialized.</pre>
1197         /// <since_tizen> 3 </since_tizen>
1198         public Position ParentOrigin
1199         {
1200             get
1201             {
1202                 Position tmp = (Position)GetValue(ParentOriginProperty);
1203                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1204             }
1205             set
1206             {
1207                 SetValue(ParentOriginProperty, value);
1208                 NotifyPropertyChanged();
1209             }
1210         }
1211
1212         /// <summary>
1213         /// Gets or sets the anchor-point of a view.<br />
1214         /// 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 />
1215         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1216         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1217         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1218         /// <pre>The view has been initialized.</pre>
1219         /// </summary>
1220         /// <remarks>
1221         /// The property cascade chaining set is possible. For example, this (view.PivotPoint.X = 0.1f;) is possible.
1222         /// </remarks>
1223         /// <since_tizen> 3 </since_tizen>
1224         public Position PivotPoint
1225         {
1226             get
1227             {
1228                 Position tmp = (Position)GetValue(PivotPointProperty);
1229                 return new Position(OnPivotPointChanged, tmp.X, tmp.Y, tmp.Z);
1230             }
1231             set
1232             {
1233                 SetValue(PivotPointProperty, value);
1234                 NotifyPropertyChanged();
1235             }
1236         }
1237
1238         /// <summary>
1239         /// Gets or sets the size width of the view.
1240         /// </summary>
1241         /// <remarks>
1242         /// <para>
1243         /// Animatable - This property can be animated using <c>Animation</c> class.
1244         /// </para>
1245         /// </remarks>
1246         /// <since_tizen> 3 </since_tizen>
1247         public float SizeWidth
1248         {
1249             get
1250             {
1251                 return (float)GetValue(SizeWidthProperty);
1252             }
1253             set
1254             {
1255                 SetValue(SizeWidthProperty, value);
1256                 NotifyPropertyChanged();
1257             }
1258         }
1259
1260         /// <summary>
1261         /// Gets or sets the size height of the view.
1262         /// </summary>
1263         /// <remarks>
1264         /// <para>
1265         /// Animatable - This property can be animated using <c>Animation</c> class.
1266         /// </para>
1267         /// </remarks>
1268         /// <since_tizen> 3 </since_tizen>
1269         public float SizeHeight
1270         {
1271             get
1272             {
1273                 return (float)GetValue(SizeHeightProperty);
1274             }
1275             set
1276             {
1277                 SetValue(SizeHeightProperty, value);
1278                 NotifyPropertyChanged();
1279             }
1280         }
1281
1282         /// <summary>
1283         /// Gets or sets the position of the view.<br />
1284         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1285         /// If the position inheritance is disabled, sets the world position.<br />
1286         /// </summary>
1287         /// <remarks>
1288         /// <para>
1289         /// Animatable - This property can be animated using <c>Animation</c> class.
1290         /// </para>
1291         /// The property cascade chaining set is possible. For example, this (view.Position.X = 1.0f;) is possible.
1292         /// </remarks>
1293         /// <since_tizen> 3 </since_tizen>
1294         public Position Position
1295         {
1296             get
1297             {
1298                 Position tmp = (Position)GetValue(PositionProperty);
1299                 return new Position(OnPositionChanged, tmp.X, tmp.Y, tmp.Z);
1300             }
1301             set
1302             {
1303                 SetValue(PositionProperty, value);
1304                 NotifyPropertyChanged();
1305             }
1306         }
1307
1308         /// <summary>
1309         /// Gets or sets the position X of the view.
1310         /// </summary>
1311         /// <remarks>
1312         /// <para>
1313         /// Animatable - This property can be animated using <c>Animation</c> class.
1314         /// </para>
1315         /// </remarks>
1316         /// <since_tizen> 3 </since_tizen>
1317         public float PositionX
1318         {
1319             get
1320             {
1321                 return (float)GetValue(PositionXProperty);
1322             }
1323             set
1324             {
1325                 SetValue(PositionXProperty, value);
1326                 NotifyPropertyChanged();
1327             }
1328         }
1329
1330         /// <summary>
1331         /// Gets or sets the position Y of the view.
1332         /// </summary>
1333         /// <remarks>
1334         /// <para>
1335         /// Animatable - This property can be animated using <c>Animation</c> class.
1336         /// </para>
1337         /// </remarks>
1338         /// <since_tizen> 3 </since_tizen>
1339         public float PositionY
1340         {
1341             get
1342             {
1343                 return (float)GetValue(PositionYProperty);
1344             }
1345             set
1346             {
1347                 SetValue(PositionYProperty, value);
1348                 NotifyPropertyChanged();
1349             }
1350         }
1351
1352         /// <summary>
1353         /// Gets or sets the position Z of the view.
1354         /// </summary>
1355         /// <remarks>
1356         /// <para>
1357         /// Animatable - This property can be animated using <c>Animation</c> class.
1358         /// </para>
1359         /// </remarks>
1360         /// <since_tizen> 3 </since_tizen>
1361         public float PositionZ
1362         {
1363             get
1364             {
1365                 return (float)GetValue(PositionZProperty);
1366             }
1367             set
1368             {
1369                 SetValue(PositionZProperty, value);
1370                 NotifyPropertyChanged();
1371             }
1372         }
1373
1374         /// <summary>
1375         /// Gets or sets the world position of the view.
1376         /// </summary>
1377         /// <since_tizen> 3 </since_tizen>
1378         public Vector3 WorldPosition
1379         {
1380             get
1381             {
1382                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1383                 var pValue = GetProperty(View.Property.WorldPosition);
1384                 pValue.Get(temp);
1385                 pValue.Dispose();
1386                 return temp;
1387             }
1388         }
1389
1390         /// <summary>
1391         /// Gets or sets the orientation of the view.<br />
1392         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1393         /// </summary>
1394         /// <remarks>
1395         /// <para>
1396         /// This is an asynchronous method.
1397         /// </para>
1398         /// <para>
1399         /// Animatable - This property can be animated using <c>Animation</c> class.
1400         /// </para>
1401         /// </remarks>
1402         /// <since_tizen> 3 </since_tizen>
1403         public Rotation Orientation
1404         {
1405             get
1406             {
1407                 return (Rotation)GetValue(OrientationProperty);
1408             }
1409             set
1410             {
1411                 SetValue(OrientationProperty, value);
1412                 NotifyPropertyChanged();
1413             }
1414         }
1415
1416         /// <summary>
1417         /// Gets or sets the world orientation of the view.<br />
1418         /// </summary>
1419         /// <since_tizen> 3 </since_tizen>
1420         public Rotation WorldOrientation
1421         {
1422             get
1423             {
1424                 Rotation temp = new Rotation();
1425                 var pValue = GetProperty(View.Property.WorldOrientation);
1426                 pValue.Get(temp);
1427                 pValue.Dispose();
1428                 return temp;
1429             }
1430         }
1431
1432         /// <summary>
1433         /// Gets or sets the scale factor applied to the view.<br />
1434         /// </summary>
1435         /// <remarks>
1436         /// <para>
1437         /// Animatable - This property can be animated using <c>Animation</c> class.
1438         /// </para>
1439         /// The property cascade chaining set is possible. For example, this (view.Scale.X = 0.1f;) is possible.
1440         /// </remarks>
1441         /// <since_tizen> 3 </since_tizen>
1442         public Vector3 Scale
1443         {
1444             get
1445             {
1446                 Vector3 temp = (Vector3)GetValue(ScaleProperty);
1447                 return new Vector3(OnScaleChanged, temp.X, temp.Y, temp.Z);
1448             }
1449             set
1450             {
1451                 SetValue(ScaleProperty, value);
1452                 NotifyPropertyChanged();
1453             }
1454         }
1455
1456         /// <summary>
1457         /// Gets or sets the scale X factor applied to the view.
1458         /// </summary>
1459         /// <remarks>
1460         /// <para>
1461         /// Animatable - This property can be animated using <c>Animation</c> class.
1462         /// </para>
1463         /// </remarks>
1464         /// <since_tizen> 3 </since_tizen>
1465         public float ScaleX
1466         {
1467             get
1468             {
1469                 return (float)GetValue(ScaleXProperty);
1470             }
1471             set
1472             {
1473                 SetValue(ScaleXProperty, value);
1474                 NotifyPropertyChanged();
1475             }
1476         }
1477
1478         /// <summary>
1479         /// Gets or sets the scale Y factor applied to the view.
1480         /// </summary>
1481         /// <remarks>
1482         /// <para>
1483         /// Animatable - This property can be animated using <c>Animation</c> class.
1484         /// </para>
1485         /// </remarks>
1486         /// <since_tizen> 3 </since_tizen>
1487         public float ScaleY
1488         {
1489             get
1490             {
1491                 return (float)GetValue(ScaleYProperty);
1492             }
1493             set
1494             {
1495                 SetValue(ScaleYProperty, value);
1496                 NotifyPropertyChanged();
1497             }
1498         }
1499
1500         /// <summary>
1501         /// Gets or sets the scale Z factor applied to the view.
1502         /// </summary>
1503         /// <remarks>
1504         /// <para>
1505         /// Animatable - This property can be animated using <c>Animation</c> class.
1506         /// </para>
1507         /// </remarks>
1508         /// <since_tizen> 3 </since_tizen>
1509         public float ScaleZ
1510         {
1511             get
1512             {
1513                 return (float)GetValue(ScaleZProperty);
1514             }
1515             set
1516             {
1517                 SetValue(ScaleZProperty, value);
1518                 NotifyPropertyChanged();
1519             }
1520         }
1521
1522         /// <summary>
1523         /// Gets the world scale of the view.
1524         /// </summary>
1525         /// <since_tizen> 3 </since_tizen>
1526         public Vector3 WorldScale
1527         {
1528             get
1529             {
1530                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1531                 var pValue = GetProperty(View.Property.WorldScale);
1532                 pValue.Get(temp);
1533                 pValue.Dispose();
1534                 return temp;
1535             }
1536         }
1537
1538         /// <summary>
1539         /// Retrieves the visibility flag of the view.
1540         /// </summary>
1541         /// <remarks>
1542         /// <para>
1543         /// If the view is not visible, then the view and its children will not be rendered.
1544         /// 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.
1545         /// </para>
1546         /// <para>
1547         /// Animatable - This property can be animated using <c>Animation</c> class.
1548         /// </para>
1549         /// </remarks>
1550         /// <since_tizen> 3 </since_tizen>
1551         public bool Visibility
1552         {
1553             get
1554             {
1555                 bool temp = false;
1556                 var pValue = GetProperty(View.Property.VISIBLE);
1557                 pValue.Get(out temp);
1558                 pValue.Dispose();
1559                 return temp;
1560             }
1561         }
1562
1563         /// <summary>
1564         /// Gets the view's world color.
1565         /// </summary>
1566         /// <since_tizen> 3 </since_tizen>
1567         public Vector4 WorldColor
1568         {
1569             get
1570             {
1571                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1572                 var pValue = GetProperty(View.Property.WorldColor);
1573                 pValue.Get(temp);
1574                 pValue.Dispose();
1575                 return temp;
1576             }
1577         }
1578
1579         /// <summary>
1580         /// Gets or sets the view's name.
1581         /// </summary>
1582         /// <since_tizen> 3 </since_tizen>
1583         public string Name
1584         {
1585             get
1586             {
1587                 return (string)GetValue(NameProperty);
1588             }
1589             set
1590             {
1591                 SetValue(NameProperty, value);
1592                 NotifyPropertyChanged();
1593             }
1594         }
1595
1596         /// <summary>
1597         /// Get the number of children held by the view.
1598         /// </summary>
1599         /// <since_tizen> 3 </since_tizen>
1600         public new uint ChildCount
1601         {
1602             get
1603             {
1604                 return Convert.ToUInt32(Children.Count);
1605             }
1606         }
1607
1608         /// <summary>
1609         /// Gets the view's ID.
1610         /// Read-only
1611         /// </summary>
1612         /// <since_tizen> 3 </since_tizen>
1613         public uint ID
1614         {
1615             get
1616             {
1617                 return GetId();
1618             }
1619         }
1620
1621         /// <summary>
1622         /// Gets or sets the status of whether the view should emit touch or hover signals.
1623         /// </summary>
1624         /// <since_tizen> 3 </since_tizen>
1625         public bool Sensitive
1626         {
1627             get
1628             {
1629                 return (bool)GetValue(SensitiveProperty);
1630             }
1631             set
1632             {
1633                 SetValue(SensitiveProperty, value);
1634                 NotifyPropertyChanged();
1635             }
1636         }
1637
1638         /// <summary>
1639         /// 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.
1640         /// </summary>
1641         /// <since_tizen> 3 </since_tizen>
1642         public bool LeaveRequired
1643         {
1644             get
1645             {
1646                 return (bool)GetValue(LeaveRequiredProperty);
1647             }
1648             set
1649             {
1650                 SetValue(LeaveRequiredProperty, value);
1651                 NotifyPropertyChanged();
1652             }
1653         }
1654
1655         /// <summary>
1656         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
1657         /// </summary>
1658         /// <since_tizen> 3 </since_tizen>
1659         public bool InheritOrientation
1660         {
1661             get
1662             {
1663                 return (bool)GetValue(InheritOrientationProperty);
1664             }
1665             set
1666             {
1667                 SetValue(InheritOrientationProperty, value);
1668                 NotifyPropertyChanged();
1669             }
1670         }
1671
1672         /// <summary>
1673         /// Gets or sets the status of whether a child view inherits it's parent's scale.
1674         /// </summary>
1675         /// <since_tizen> 3 </since_tizen>
1676         public bool InheritScale
1677         {
1678             get
1679             {
1680                 return (bool)GetValue(InheritScaleProperty);
1681             }
1682             set
1683             {
1684                 SetValue(InheritScaleProperty, value);
1685                 NotifyPropertyChanged();
1686             }
1687         }
1688
1689         /// <summary>
1690         /// Gets or sets the status of how the view and its children should be drawn.<br />
1691         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
1692         /// 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 />
1693         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
1694         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
1695         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
1696         /// </summary>
1697         /// <since_tizen> 3 </since_tizen>
1698         public DrawModeType DrawMode
1699         {
1700             get
1701             {
1702                 return (DrawModeType)GetValue(DrawModeProperty);
1703             }
1704             set
1705             {
1706                 SetValue(DrawModeProperty, value);
1707                 NotifyPropertyChanged();
1708             }
1709         }
1710
1711         /// <summary>
1712         /// Gets or sets the relative to parent size factor of the view.<br />
1713         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
1714         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
1715         /// </summary>
1716         /// <remarks>
1717         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
1718         /// </remarks>
1719         /// <since_tizen> 3 </since_tizen>
1720         [Obsolete("Deprecated. Since Tizen.NUI.ResizePolicyType is deprecated, SizeModeFactor is no longer supported. Instead, please use parent view having Tizen.NUI.RelativeLayout as its Layout.")]
1721         public Vector3 SizeModeFactor
1722         {
1723             get
1724             {
1725                 Vector3 temp = (Vector3)GetValue(SizeModeFactorProperty);
1726                 return new Vector3(OnSizeModeFactorChanged, temp.X, temp.Y, temp.Z);
1727             }
1728             set
1729             {
1730                 SetValue(SizeModeFactorProperty, value);
1731                 NotifyPropertyChanged();
1732             }
1733         }
1734
1735         /// <summary>
1736         /// Gets or sets the width resize policy to be used.
1737         /// </summary>
1738         /// <since_tizen> 3 </since_tizen>
1739         [Obsolete("Deprecated. Please set Layout and use WidthSpecification instead.")]
1740         public ResizePolicyType WidthResizePolicy
1741         {
1742             get
1743             {
1744                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
1745             }
1746             set
1747             {
1748                 SetValue(WidthResizePolicyProperty, value);
1749                 NotifyPropertyChanged();
1750             }
1751         }
1752
1753         /// <summary>
1754         /// Gets or sets the height resize policy to be used.
1755         /// </summary>
1756         /// <since_tizen> 3 </since_tizen>
1757         [Obsolete("Deprecated. Please set Layout and use HeightSpecification instead.")]
1758         public ResizePolicyType HeightResizePolicy
1759         {
1760             get
1761             {
1762                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
1763             }
1764             set
1765             {
1766                 SetValue(HeightResizePolicyProperty, value);
1767                 NotifyPropertyChanged();
1768             }
1769         }
1770
1771         /// <summary>
1772         /// Gets or sets the policy to use when setting size with size negotiation.<br />
1773         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
1774         /// </summary>
1775         /// <since_tizen> 3 </since_tizen>
1776         public SizeScalePolicyType SizeScalePolicy
1777         {
1778             get
1779             {
1780                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
1781             }
1782             set
1783             {
1784                 SetValue(SizeScalePolicyProperty, value);
1785                 NotifyPropertyChanged();
1786             }
1787         }
1788
1789         /// <summary>
1790         ///  Gets or sets the status of whether the width size is dependent on the height size.
1791         /// </summary>
1792         /// <since_tizen> 3 </since_tizen>
1793         public bool WidthForHeight
1794         {
1795             get
1796             {
1797                 return (bool)GetValue(WidthForHeightProperty);
1798             }
1799             set
1800             {
1801                 SetValue(WidthForHeightProperty, value);
1802                 NotifyPropertyChanged();
1803             }
1804         }
1805
1806         /// <summary>
1807         /// Gets or sets the status of whether the height size is dependent on the width size.
1808         /// </summary>
1809         /// <since_tizen> 3 </since_tizen>
1810         public bool HeightForWidth
1811         {
1812             get
1813             {
1814                 return (bool)GetValue(HeightForWidthProperty);
1815             }
1816             set
1817             {
1818                 SetValue(HeightForWidthProperty, value);
1819                 NotifyPropertyChanged();
1820             }
1821         }
1822
1823         /// <summary>
1824         /// Gets or sets the padding for use in layout.
1825         /// </summary>
1826         /// <remarks>
1827         /// The property cascade chaining set is possible. For example, this (view.Padding.X = 0.1f;) is possible.
1828         /// </remarks>
1829         /// <since_tizen> 5 </since_tizen>
1830         public Extents Padding
1831         {
1832             get
1833             {
1834                 // If View has a Layout then padding in stored in the base Layout class
1835                 if (Layout != null)
1836                 {
1837                     return Layout.Padding;
1838                 }
1839                 else
1840                 {
1841                     Extents temp = (Extents)GetValue(PaddingProperty);
1842                     return new Extents(OnPaddingChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1843                 }
1844                 // Two return points to prevent creating a zeroed Extent native object before assignment
1845             }
1846             set
1847             {
1848                 Extents padding = value;
1849                 if (Layout != null)
1850                 {
1851                     // Layout set so store Padding in LayoutItem instead of in View.
1852                     // If View stores the Padding value then Legacy Size Negotiation will overwrite
1853                     // the position and sizes measure in the Layouting.
1854                     Layout.Padding = value;
1855                     // If Layout is a LayoutItem then it could be a View that handles it's own padding.
1856                     // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
1857                     if (typeof(LayoutGroup).IsAssignableFrom(Layout.GetType())) // If a Layout container of some kind.
1858                     {
1859                         padding = new Extents(0, 0, 0, 0); // Reset value stored in View.
1860                     }
1861                 }
1862
1863                 SetValue(PaddingProperty, padding);
1864                 NotifyPropertyChanged();
1865             }
1866         }
1867
1868         /// <summary>
1869         /// Gets or sets the minimum size the view can be assigned in size negotiation.
1870         /// </summary>
1871         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
1872         /// <remarks>
1873         /// The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.
1874         /// </remarks>
1875         /// <since_tizen> 3 </since_tizen>
1876         public Size2D MinimumSize
1877         {
1878             get
1879             {
1880                 Size2D tmp = (Size2D)GetValue(MinimumSizeProperty);
1881                 return new Size2D(OnMinimumSizeChanged, tmp.Width, tmp.Height);
1882             }
1883             set
1884             {
1885                 if (value == null)
1886                 {
1887                     throw new ArgumentNullException(nameof(value));
1888                 }
1889                 if (layout != null)
1890                 {
1891                     // Note: it only works if minimum size is >= than natural size.
1892                     // To force the size it should be done through the width&height spec or Size2D.
1893                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
1894                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
1895                     layout.RequestLayout();
1896                 }
1897                 SetValue(MinimumSizeProperty, value);
1898                 NotifyPropertyChanged();
1899             }
1900         }
1901
1902         /// <summary>
1903         /// Gets or sets the maximum size the view can be assigned in size negotiation.
1904         /// </summary>
1905         /// <remarks>
1906         /// The property cascade chaining set is possible. For example, this (view.MaximumSize.Width = 1;) is possible.
1907         /// </remarks>
1908         /// <since_tizen> 3 </since_tizen>
1909         public Size2D MaximumSize
1910         {
1911             get
1912             {
1913                 Size2D tmp = (Size2D)GetValue(MaximumSizeProperty);
1914                 return new Size2D(OnMaximumSizeChanged, tmp.Width, tmp.Height);
1915             }
1916             set
1917             {
1918                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
1919                 // MATCH_PARENT spec + parent container size can be used to limit
1920                 if (layout != null)
1921                 {
1922                     layout.RequestLayout();
1923                 }
1924                 SetValue(MaximumSizeProperty, value);
1925                 NotifyPropertyChanged();
1926             }
1927         }
1928
1929         /// <summary>
1930         /// Gets or sets whether a child view inherits it's parent's position.<br />
1931         /// Default is to inherit.<br />
1932         /// 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 />
1933         /// </summary>
1934         /// <since_tizen> 3 </since_tizen>
1935         public bool InheritPosition
1936         {
1937             get
1938             {
1939                 return (bool)GetValue(InheritPositionProperty);
1940             }
1941             set
1942             {
1943                 SetValue(InheritPositionProperty, value);
1944                 NotifyPropertyChanged();
1945             }
1946         }
1947
1948         /// <summary>
1949         /// Gets or sets the clipping behavior (mode) of it's children.
1950         /// </summary>
1951         /// <since_tizen> 3 </since_tizen>
1952         public ClippingModeType ClippingMode
1953         {
1954             get
1955             {
1956                 return (ClippingModeType)GetValue(ClippingModeProperty);
1957             }
1958             set
1959             {
1960                 SetValue(ClippingModeProperty, value);
1961                 NotifyPropertyChanged();
1962             }
1963         }
1964
1965         /// <summary>
1966         /// Gets the number of renderers held by the view.
1967         /// </summary>
1968         /// <since_tizen> 3 </since_tizen>
1969         public uint RendererCount
1970         {
1971             get
1972             {
1973                 return GetRendererCount();
1974             }
1975         }
1976
1977         /// <summary>
1978         /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
1979         /// </summary>
1980         /// <remarks>
1981         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
1982         /// </remarks>
1983         /// <since_tizen> 3 </since_tizen>
1984         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
1985             "Like: " +
1986             "View view = new View(); " +
1987             "view.PivotPoint = PivotPoint.Center; " +
1988             "view.PositionUsesPivotPoint = true;")]
1989         [EditorBrowsable(EditorBrowsableState.Never)]
1990         public Position AnchorPoint
1991         {
1992             get
1993             {
1994                 Position temp = new Position(0.0f, 0.0f, 0.0f);
1995                 var pValue = GetProperty(View.Property.AnchorPoint);
1996                 pValue.Get(temp);
1997                 pValue.Dispose();
1998                 Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
1999                 temp.Dispose();
2000                 return ret;
2001             }
2002             set
2003             {
2004                 var temp = new Tizen.NUI.PropertyValue(value);
2005                 SetProperty(View.Property.AnchorPoint, temp);
2006                 temp.Dispose();
2007                 NotifyPropertyChanged();
2008             }
2009         }
2010
2011         /// <summary>
2012         /// Sets the size of a view for the width, the height and the depth.<br />
2013         /// Geometry can be scaled to fit within this area.<br />
2014         /// This does not interfere with the view's scale factor.<br />
2015         /// The views default depth is the minimum of width and height.<br />
2016         /// </summary>
2017         /// <remarks>
2018         /// <para>
2019         /// Animatable - This property can be animated using <c>Animation</c> class.
2020         /// </para>
2021         /// The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.
2022         /// </remarks>
2023         /// <since_tizen> 5 </since_tizen>
2024         public Size Size
2025         {
2026             get
2027             {
2028                 Size tmp = (Size)GetValue(SizeProperty);
2029                 return new Size(OnSizeChanged, tmp.Width, tmp.Height, tmp.Depth);
2030             }
2031             set
2032             {
2033                 SetValue(SizeProperty, value);
2034                 NotifyPropertyChanged();
2035             }
2036         }
2037
2038         /// <summary>
2039         /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
2040         /// </summary>
2041         /// <since_tizen> 3 </since_tizen>
2042         [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
2043             "Like: " +
2044             "Container parent =  view.GetParent(); " +
2045             "View view = parent as View;")]
2046         [EditorBrowsable(EditorBrowsableState.Never)]
2047         public new View Parent
2048         {
2049             get
2050             {
2051                 View ret;
2052                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2053                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2054                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2055
2056                 if (basehandle is Layer layer)
2057                 {
2058                     ret = new View(Layer.getCPtr(layer).Handle, false);
2059                     NUILog.Error("This Parent property is deprecated, should do not be used");
2060                 }
2061                 else
2062                 {
2063                     ret = basehandle as View;
2064                 }
2065
2066                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2067                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2068
2069                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2070                 return ret;
2071             }
2072         }
2073
2074         /// <summary>
2075         /// Gets/Sets whether inherit parent's the layout Direction.
2076         /// </summary>
2077         /// <since_tizen> 4 </since_tizen>
2078         public bool InheritLayoutDirection
2079         {
2080             get
2081             {
2082                 return (bool)GetValue(InheritLayoutDirectionProperty);
2083             }
2084             set
2085             {
2086                 SetValue(InheritLayoutDirectionProperty, value);
2087                 NotifyPropertyChanged();
2088             }
2089         }
2090
2091         /// <summary>
2092         /// Gets/Sets the layout Direction.
2093         /// </summary>
2094         /// <since_tizen> 4 </since_tizen>
2095         public ViewLayoutDirectionType LayoutDirection
2096         {
2097             get
2098             {
2099                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2100             }
2101             set
2102             {
2103                 SetValue(LayoutDirectionProperty, value);
2104                 NotifyPropertyChanged();
2105                 layout?.RequestLayout();
2106             }
2107         }
2108
2109         /// <summary>
2110         /// Gets or sets the Margin for use in layout.
2111         /// </summary>
2112         /// <remarks>
2113         /// Margin property is supported by Layout algorithms and containers.
2114         /// Please Set Layout if you want to use Margin property.
2115         /// The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.
2116         /// </remarks>
2117         /// <since_tizen> 4 </since_tizen>
2118         public Extents Margin
2119         {
2120             get
2121             {
2122                 // If View has a Layout then margin is stored in Layout.
2123                 if (Layout != null)
2124                 {
2125                     return Layout.Margin;
2126                 }
2127                 else
2128                 {
2129                     // If Layout not set then return margin stored in View.
2130                     Extents temp = (Extents)GetValue(MarginProperty);
2131                     return new Extents(OnMarginChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2132                 }
2133                 // Two return points to prevent creating a zeroed Extent native object before assignment
2134             }
2135             set
2136             {
2137                 if (Layout != null)
2138                 {
2139                     // Layout set so store Margin in LayoutItem instead of View.
2140                     // If View stores the Margin too then the Legacy Size Negotiation will
2141                     // overwrite the position and size values measured in the Layouting.
2142                     Layout.Margin = value;
2143                     SetValue(MarginProperty, new Extents(0, 0, 0, 0));
2144                     layout?.RequestLayout();
2145                 }
2146                 else
2147                 {
2148                     SetValue(MarginProperty, value);
2149                 }
2150                 NotifyPropertyChanged();
2151                 layout?.RequestLayout();
2152             }
2153         }
2154
2155         ///<summary>
2156         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2157         ///</summary>
2158         /// <example>
2159         /// <code>
2160         /// // matchParentView matches its size to its parent size.
2161         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2162         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2163         ///
2164         /// // wrapContentView wraps its children with their desired size.
2165         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2166         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2167         ///
2168         /// // exactSizeView shows itself with an exact size.
2169         /// exactSizeView.WidthSpecification = 100;
2170         /// exactSizeView.HeightSpecification = 100;
2171         /// </code>
2172         /// </example>
2173         /// <since_tizen> 6 </since_tizen>
2174         public int WidthSpecification
2175         {
2176             get
2177             {
2178                 return widthPolicy;
2179             }
2180             set
2181             {
2182                 if (value == widthPolicy)
2183                     return;
2184
2185                 widthPolicy = value;
2186                 if (widthPolicy >= 0)
2187                 {
2188                     if (heightPolicy >= 0) // Policy an exact value
2189                     {
2190                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
2191                         Size2D = new Size2D(widthPolicy, heightPolicy);
2192                     }
2193                 }
2194                 layout?.RequestLayout();
2195             }
2196         }
2197
2198         ///<summary>
2199         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2200         ///</summary>
2201         /// <example>
2202         /// <code>
2203         /// // matchParentView matches its size to its parent size.
2204         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2205         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2206         ///
2207         /// // wrapContentView wraps its children with their desired size.
2208         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2209         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2210         ///
2211         /// // exactSizeView shows itself with an exact size.
2212         /// exactSizeView.WidthSpecification = 100;
2213         /// exactSizeView.HeightSpecification = 100;
2214         /// </code>
2215         /// </example>
2216         /// <since_tizen> 6 </since_tizen>
2217         public int HeightSpecification
2218         {
2219             get
2220             {
2221                 return heightPolicy;
2222             }
2223             set
2224             {
2225                 if (value == heightPolicy)
2226                     return;
2227
2228                 heightPolicy = value;
2229                 if (heightPolicy >= 0)
2230                 {
2231                     if (widthPolicy >= 0) // Policy an exact value
2232                     {
2233                         // Create Size2D only both _widthPolicy and _heightPolicy are set.
2234                         Size2D = new Size2D(widthPolicy, heightPolicy);
2235                     }
2236                 }
2237                 layout?.RequestLayout();
2238             }
2239         }
2240
2241         ///<summary>
2242         /// Gets the List of transitions for this View.
2243         ///</summary>
2244         /// <since_tizen> 6 </since_tizen>
2245         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2246         {
2247             get
2248             {
2249                 if (layoutTransitions == null)
2250                 {
2251                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2252                 }
2253                 return layoutTransitions;
2254             }
2255         }
2256
2257         ///<summary>
2258         /// Sets a layout transitions for this View.
2259         ///</summary>
2260         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2261         /// <remarks>
2262         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2263         /// </remarks>
2264         /// <since_tizen> 6 </since_tizen>
2265         public LayoutTransition LayoutTransition
2266         {
2267             get
2268             {
2269                 return layoutTransition;
2270             }
2271             set
2272             {
2273                 if (value == null)
2274                 {
2275                     throw new global::System.ArgumentNullException(nameof(value));
2276                 }
2277                 if (layoutTransitions == null)
2278                 {
2279                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2280                 }
2281
2282                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
2283
2284                 AttachTransitionsToChildren(value);
2285
2286                 layoutTransition = value;
2287             }
2288         }
2289
2290         /// <summary>
2291         /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
2292         /// </summary>
2293         /// <remarks>
2294         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2295         /// </remarks>
2296         /// <since_tizen> 4 </since_tizen>
2297         [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
2298         [EditorBrowsable(EditorBrowsableState.Never)]
2299         public Extents PaddingEX
2300         {
2301             get
2302             {
2303                 Extents temp = new Extents(0, 0, 0, 0);
2304                 var pValue = GetProperty(View.Property.PADDING);
2305                 pValue.Get(temp);
2306                 pValue.Dispose();
2307                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2308                 temp.Dispose();
2309                 return ret;
2310             }
2311             set
2312             {
2313                 var temp = new Tizen.NUI.PropertyValue(value);
2314                 SetProperty(View.Property.PADDING, temp);
2315                 temp.Dispose();
2316                 NotifyPropertyChanged();
2317                 layout?.RequestLayout();
2318             }
2319         }
2320
2321         /// <summary>
2322         /// The Color of View. This is an RGBA value.
2323         /// </summary>
2324         /// <remarks>
2325         /// <para>
2326         /// Animatable - This property can be animated using <c>Animation</c> class.
2327         /// </para>
2328         /// The property cascade chaining set is possible. For example, this (view.Color.X = 0.1f;) is possible.
2329         /// </remarks>
2330         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2331         [EditorBrowsable(EditorBrowsableState.Never)]
2332         public Color Color
2333         {
2334             get
2335             {
2336                 Color temp = (Color)GetValue(ColorProperty);
2337                 return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
2338             }
2339             set
2340             {
2341                 SetValue(ColorProperty, value);
2342                 NotifyPropertyChanged();
2343             }
2344         }
2345
2346         /// <summary>
2347         /// Set the layout on this View. Replaces any existing Layout.
2348         /// </summary>
2349         /// <remarks>
2350         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
2351         /// </remarks>
2352         /// <since_tizen> 6 </since_tizen>
2353         public LayoutItem Layout
2354         {
2355             get
2356             {
2357                 return layout;
2358             }
2359             set
2360             {
2361                 // Do nothing if layout provided is already set on this View.
2362                 if (value == layout)
2363                 {
2364                     return;
2365                 }
2366
2367                 LayoutingDisabled = false;
2368                 layoutSet = true;
2369
2370                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2371                 // First check if the layout to be set already has a owner.
2372                 if (value?.Owner != null)
2373                 {
2374                     // Previous owner of the layout gets a default layout as a replacement.
2375                     value.Owner.Layout = new AbsoluteLayout();
2376
2377                     // Copy Margin and Padding to replacement LayoutGroup.
2378                     if (value.Owner.Layout != null)
2379                     {
2380                         value.Owner.Layout.Margin = value.Margin;
2381                         value.Owner.Layout.Padding = value.Padding;
2382                     }
2383                 }
2384
2385                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2386                 // View if no replacement. Previously margin and padding values would have been moved from
2387                 // the View to the layout.
2388                 if (layout != null) // Existing layout
2389                 {
2390                     if (value != null)
2391                     {
2392                         // Existing layout being replaced so copy over margin and padding values.
2393                         value.Margin = layout.Margin;
2394                         value.Padding = layout.Padding;
2395                     }
2396                     else
2397                     {
2398                         // Layout not being replaced so restore margin and padding to View.
2399                         SetValue(MarginProperty, layout.Margin);
2400                         SetValue(PaddingProperty, layout.Padding);
2401                         NotifyPropertyChanged();
2402                     }
2403                 }
2404                 else
2405                 {
2406                     // First Layout to be added to the View hence copy
2407
2408                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2409                     if (value != null)
2410                     {
2411                         Extents margin = Margin;
2412                         Extents padding = Padding;
2413                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
2414                         {
2415                             // If View already has a margin set then store it in Layout instead.
2416                             value.Margin = margin;
2417                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
2418                             NotifyPropertyChanged();
2419                         }
2420
2421                         if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
2422                         {
2423                             // If View already has a padding set then store it in Layout instead.
2424                             value.Padding = padding;
2425
2426                             // If Layout is a LayoutItem then it could be a View that handles it's own padding.
2427                             // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
2428                             if (typeof(LayoutGroup).IsAssignableFrom(value.GetType()))
2429                             {
2430                                 SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
2431                                 NotifyPropertyChanged();
2432                             }
2433                         }
2434                     }
2435                 }
2436
2437                 // Remove existing layout from it's parent layout group.
2438                 layout?.Unparent();
2439
2440                 value.SetPositionByLayout = !excludeLayouting;
2441
2442                 // Set layout to this view
2443                 SetLayout(value);
2444             }
2445         }
2446
2447         /// <summary>
2448         /// The weight of the View, used to share available space in a layout with siblings.
2449         /// </summary>
2450         /// <since_tizen> 6 </since_tizen>
2451         public float Weight
2452         {
2453             get
2454             {
2455                 return weight;
2456             }
2457             set
2458             {
2459                 weight = value;
2460                 layout?.RequestLayout();
2461             }
2462         }
2463
2464         /// <summary>
2465         ///  Whether to load the BackgroundImage synchronously.
2466         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2467         ///  Note: For Normal Quad images only.
2468         /// </summary>
2469         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2470         [EditorBrowsable(EditorBrowsableState.Never)]
2471         public bool BackgroundImageSynchronosLoading
2472         {
2473             get
2474             {
2475                 return backgroundImageSynchronosLoading;
2476             }
2477             set
2478             {
2479                 backgroundImageSynchronosLoading = value;
2480
2481                 string bgUrl = null;
2482                 var pValue = Background.Find(ImageVisualProperty.URL);
2483                 pValue?.Get(out bgUrl);
2484                 pValue?.Dispose();
2485
2486                 if (!string.IsNullOrEmpty(bgUrl))
2487                 {
2488                     PropertyMap bgMap = this.Background;
2489                     var temp = new PropertyValue(backgroundImageSynchronosLoading);
2490                     bgMap.Add("synchronousLoading", temp);
2491                     temp.Dispose();
2492                     Background = bgMap;
2493                 }
2494             }
2495         }
2496
2497         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2498         [EditorBrowsable(EditorBrowsableState.Never)]
2499         public Vector2 UpdateSizeHint
2500         {
2501             get
2502             {
2503                 return (Vector2)GetValue(UpdateSizeHintProperty);
2504             }
2505             set
2506             {
2507                 SetValue(UpdateSizeHintProperty, value);
2508                 NotifyPropertyChanged();
2509             }
2510         }
2511
2512         /// <summary>
2513         /// Enable/Disable ControlState propagation for children.
2514         /// It is false by default.
2515         /// If the View needs to share ControlState with descendants, please set it true.
2516         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
2517         /// </summary>
2518         [EditorBrowsable(EditorBrowsableState.Never)]
2519         public bool EnableControlStatePropagation
2520         {
2521             get => themeData?.ControlStatePropagation ?? false;
2522             set
2523             {
2524                 if (EnableControlStatePropagation == value) return;
2525
2526                 if (themeData == null) themeData = new ThemeData();
2527
2528                 themeData.ControlStatePropagation = value;
2529
2530                 foreach (View child in Children)
2531                 {
2532                     child.EnableControlStatePropagation = value;
2533                 }
2534             }
2535         }
2536
2537         /// <summary>
2538         /// By default, it is false in View, true in Control.
2539         /// Note that if the value is true, the View will be a touch receptor.
2540         /// </summary>
2541         [EditorBrowsable(EditorBrowsableState.Never)]
2542         public bool EnableControlState
2543         {
2544             get
2545             {
2546                 return (bool)GetValue(EnableControlStateProperty);
2547             }
2548             set
2549             {
2550                 SetValue(EnableControlStateProperty, value);
2551             }
2552         }
2553
2554         /// <summary>
2555         /// Whether the actor grab all touches even if touch leaves its boundary.
2556         /// </summary>
2557         /// <returns>true, if it grab all touch after start</returns>
2558         [EditorBrowsable(EditorBrowsableState.Never)]
2559         public bool GrabTouchAfterLeave
2560         {
2561             get
2562             {
2563                 bool temp = false;
2564                 var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
2565                 pValue.Get(out temp);
2566                 pValue.Dispose();
2567                 return temp;
2568             }
2569             set
2570             {
2571                 var temp = new Tizen.NUI.PropertyValue(value);
2572                 SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
2573                 temp.Dispose();
2574                 NotifyPropertyChanged();
2575             }
2576         }
2577
2578         /// <summary>
2579         /// Determines which blend equation will be used to render renderers of this actor.
2580         /// </summary>
2581         /// <returns>blend equation enum currently assigned</returns>
2582         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
2583         [EditorBrowsable(EditorBrowsableState.Never)]
2584         public BlendEquationType BlendEquation
2585         {
2586             get
2587             {
2588                 int temp = 0;
2589                 var pValue = GetProperty(View.Property.BlendEquation);
2590                 pValue.Get(out temp);
2591                 pValue.Dispose();
2592                 return (BlendEquationType)temp;
2593             }
2594             set
2595             {
2596                 var temp = new Tizen.NUI.PropertyValue((int)value);
2597                 SetProperty(View.Property.BlendEquation, temp);
2598                 temp.Dispose();
2599                 NotifyPropertyChanged();
2600             }
2601         }
2602
2603         /// <summary>
2604         /// If the value is true, the View will change its style as the theme changes.
2605         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
2606         /// </summary>
2607         /// <since_tizen> 9 </since_tizen>
2608         public bool ThemeChangeSensitive
2609         {
2610             get => (bool)GetValue(ThemeChangeSensitiveProperty);
2611             set => SetValue(ThemeChangeSensitiveProperty, value);
2612         }
2613
2614         /// <summary>
2615         /// Create Style, it is abstract function and must be override.
2616         /// </summary>
2617         [EditorBrowsable(EditorBrowsableState.Never)]
2618         protected virtual ViewStyle CreateViewStyle()
2619         {
2620             return new ViewStyle();
2621         }
2622
2623         /// <summary>
2624         /// Called after the View's ControlStates changed.
2625         /// </summary>
2626         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
2627         [EditorBrowsable(EditorBrowsableState.Never)]
2628         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
2629         {
2630         }
2631
2632         /// <summary>
2633         /// </summary>
2634         [EditorBrowsable(EditorBrowsableState.Never)]
2635         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
2636         {
2637             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
2638             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
2639         }
2640
2641         /// <summary>
2642         /// Apply style instance to the view.
2643         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
2644         /// </summary>
2645         /// <since_tizen> 9 </since_tizen>
2646         public virtual void ApplyStyle(ViewStyle viewStyle)
2647         {
2648             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
2649
2650             if (themeData == null) themeData = new ThemeData();
2651
2652             themeData.viewStyle = viewStyle;
2653
2654             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
2655             {
2656                 // Nothing to apply
2657                 return;
2658             }
2659
2660             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
2661
2662             if (bindablePropertyOfView == null)
2663             {
2664                 return;
2665             }
2666
2667             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
2668             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
2669
2670             foreach (var sourceProperty in dirtyStyleProperties)
2671             {
2672                 var sourceValue = viewStyle.GetValue(sourceProperty);
2673
2674                 if (sourceValue == null)
2675                 {
2676                     continue;
2677                 }
2678
2679                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
2680
2681                 if (destinationProperty != null)
2682                 {
2683                     SetValue(destinationProperty, sourceValue);
2684                 }
2685             }
2686         }
2687
2688         /// <summary>
2689         /// Get whether the View is culled or not.
2690         /// True means that the View is out of the view frustum.
2691         /// </summary>
2692         /// <remarks>
2693         /// Hidden-API (Inhouse-API).
2694         /// </remarks>
2695         [EditorBrowsable(EditorBrowsableState.Never)]
2696         public bool Culled
2697         {
2698             get
2699             {
2700                 bool temp = false;
2701                 var pValue = GetProperty(View.Property.Culled);
2702                 pValue.Get(out temp);
2703                 pValue.Dispose();
2704                 return temp;
2705             }
2706         }
2707
2708         /// <summary>
2709         /// Set or Get TransitionOptions for the page transition.
2710         /// This property is used to define how this view will be transitioned during Page switching.
2711         /// </summary>
2712         /// <since_tizen> 9 </since_tizen>
2713         public TransitionOptions TransitionOptions
2714         {
2715             set
2716             {
2717                 transitionOptions = value;
2718             }
2719             get
2720             {
2721                 return transitionOptions;
2722             }
2723         }
2724     }
2725 }