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