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