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