940dee31bd4200c82145528b07de740077cecf39
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI.BaseComponents
24 {
25     /// <summary>
26     /// View is the base class for all views.
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     public partial class View : Container, IResourcesProvider
30     {
31         private static HashSet<BindableProperty> positionPropertyGroup = new HashSet<BindableProperty>();
32         private static HashSet<BindableProperty> sizePropertyGroup = new HashSet<BindableProperty>();
33         private static HashSet<BindableProperty> scalePropertyGroup = new HashSet<BindableProperty>();
34         private static bool defaultGrabTouchAfterLeave = false;
35         private static bool defaultAllowOnlyOwnTouch = false;
36
37         internal BackgroundExtraData backgroundExtraData;
38
39         private bool layoutSet = false;
40         private LayoutItem layout; // Exclusive layout assigned to this View.
41
42         // List of transitions paired with the condition that uses the transition.
43         private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
44         private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
45         private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
46         private float weight = 0.0f; // Weighting of child View in a Layout
47         private bool backgroundImageSynchronousLoading = false;
48         private bool excludeLayouting = false;
49         private LayoutTransition layoutTransition;
50         private TransitionOptions transitionOptions = null;
51         private ThemeData themeData;
52         private bool isThemeChanged = false;
53
54         // List of constraints
55         private Constraint widthConstraint = null;
56         private Constraint heightConstraint = null;
57
58         private Size2D internalMaximumSize = null;
59         private Size2D internalMinimumSize = null;
60         private Extents internalMargin = null;
61         private Extents internalPadding = null;
62         private Vector3 internalSizeModeFactor = null;
63         private Vector2 internalCellIndex = null;
64         private Color internalBackgroundColor = null;
65         private Color internalColor = null;
66         private Position internalPivotPoint = null;
67         private Position internalPosition = null;
68         private Position2D internalPosition2D = null;
69         private Vector3 internalScale = null;
70         private Size internalSize = null;
71         private Size2D internalSize2D = null;
72         private int layoutCount = 0;
73         private ControlState propagatableControlStates = ControlState.All;
74
75         private string internalName = string.Empty;
76         private Position internalCurrentParentOrigin = null;
77         private Position internalCurrentAnchorPoint = null;
78         private Vector3 internalTargetSize = null;
79         private Size2D internalCurrentSize = null;
80         private Position internalCurrentPosition = null;
81         private Vector3 internalCurrentWorldPosition = null;
82         private Vector3 internalCurrentScale = null;
83         private Vector3 internalCurrentWorldScale = null;
84         private Vector4 internalCurrentColor = null;
85         private Vector4 internalCurrentWorldColor = null;
86         private Vector2 internalCurrentScreenPosition = null;
87
88         private static int aliveCount = 0;
89
90         static View()
91         {
92             if (NUIApplication.IsUsingXaml)
93             {
94 #if REMOVE_READONLY
95                 CreateBindableProperties();
96 #else
97                 BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
98                     propertyChanged: SetInternalBackgroundColorProperty, defaultValueCreator: GetInternalBackgroundColorProperty);
99
100                 ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
101                     propertyChanged: SetInternalColorProperty, defaultValueCreator: GetInternalColorProperty);
102
103                 ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
104                     propertyChanged: SetInternalColorRedProperty, defaultValueCreator: GetInternalColorRedProperty);
105
106                 ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
107                     propertyChanged: SetInternalColorGreenProperty, defaultValueCreator: GetInternalColorGreenProperty);
108
109                 ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
110                     propertyChanged: SetInternalColorBlueProperty, defaultValueCreator: GetInternalColorBlueProperty);
111
112                 CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
113                     propertyChanged: SetInternalCellIndexProperty, defaultValueCreator: GetInternalCellIndexProperty);
114
115                 Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
116                     propertyChanged: SetInternalSize2DProperty, defaultValueCreator: GetInternalSize2DProperty);
117
118                 Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
119                     propertyChanged: SetInternalPosition2DProperty, defaultValueCreator: GetInternalPosition2DProperty);
120
121                 ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null,
122                     propertyChanged: SetInternalParentOriginProperty, defaultValueCreator: GetInternalParentOriginProperty);
123
124                 PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
125                     propertyChanged: SetInternalPivotPointProperty, defaultValueCreator: GetInternalPivotPointProperty);
126
127                 SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float),
128                     propertyChanged: SetInternalSizeWidthProperty, defaultValueCreator: GetInternalSizeWidthProperty);
129
130                 SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float),
131                     propertyChanged: SetInternalSizeHeightProperty, defaultValueCreator: GetInternalSizeHeightProperty);
132
133                 PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
134                     propertyChanged: SetInternalPositionProperty, defaultValueCreator: GetInternalPositionProperty);
135
136                 PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float),
137                     propertyChanged: SetInternalPositionXProperty, defaultValueCreator: GetInternalPositionXProperty);
138
139                 PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float),
140                     propertyChanged: SetInternalPositionYProperty, defaultValueCreator: GetInternalPositionYProperty);
141
142                 PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float),
143                     propertyChanged: SetInternalPositionZProperty, defaultValueCreator: GetInternalPositionZProperty);
144
145                 ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
146                     propertyChanged: SetInternalScaleProperty, defaultValueCreator: GetInternalScaleProperty);
147
148                 ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float),
149                     propertyChanged: SetInternalScaleXProperty, defaultValueCreator: GetInternalScaleXProperty);
150
151                 ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float),
152                     propertyChanged: SetInternalScaleYProperty, defaultValueCreator: GetInternalScaleYProperty);
153
154                 ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float),
155                     propertyChanged: SetInternalScaleZProperty, defaultValueCreator: GetInternalScaleZProperty);
156
157                 NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
158                     propertyChanged: SetInternalNameProperty, defaultValueCreator: GetInternalNameProperty);
159
160                 SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
161                     propertyChanged: SetInternalSizeModeFactorProperty, defaultValueCreator: GetInternalSizeModeFactorProperty);
162
163                 PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
164                     propertyChanged: SetInternalPaddingProperty, defaultValueCreator: GetInternalPaddingProperty);
165
166                 SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
167                     propertyChanged: SetInternalSizeProperty, defaultValueCreator: GetInternalSizeProperty);
168
169                 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
170                     propertyChanged: SetInternalMinimumSizeProperty, defaultValueCreator: GetInternalMinimumSizeProperty);
171
172                 MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
173                     propertyChanged: SetInternalMaximumSizeProperty, defaultValueCreator: GetInternalMaximumSizeProperty);
174
175                 MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
176                     propertyChanged: SetInternalMarginProperty, defaultValueCreator: GetInternalMarginProperty);
177
178                 AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null,
179                     propertyChanged: SetInternalAnchorPointProperty, defaultValueCreator: GetInternalAnchorPointProperty);
180 #endif
181
182                 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
183                 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
184                 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
185                 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
186
187                 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
188                 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
189                 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
190                 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
191
192                 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
193                 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
194                 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
195                 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
196             }
197
198             RegisterAccessibilityDelegate();
199         }
200
201         static internal new void Preload()
202         {
203             Container.Preload();
204
205             if (NUIApplication.IsUsingXaml)
206             {
207                 // Do nothing. Just call for load static values.
208                 var temporalPositionPropertyGroup = positionPropertyGroup;
209                 var temporalSizePropertyGroup = sizePropertyGroup;
210                 var temporalScalePropertyGroup = scalePropertyGroup;
211             }
212         }
213
214         /// <summary>
215         /// Accessibility mode for controlling View's Accessible implementation.
216         /// It is only relevant when deriving custom controls from View directly,
217         /// as classes derived from CustomView (or any of its subclasses) get the
218         /// Custom mode by default.
219         /// </summary>
220         [EditorBrowsable(EditorBrowsableState.Never)]
221         public enum ViewAccessibilityMode
222         {
223             /// <summary>
224             /// Default accessibility implementation. Overriding View.Accessibility...()
225             /// virtual methods will have no effect.
226             /// </summary>
227             [EditorBrowsable(EditorBrowsableState.Never)]
228             Default,
229             /// <summary>
230             /// Custom accessibility implementation. Overriding View.Accessibility...()
231             /// will be necessary to provide accessibility support for the View.
232             /// </summary>
233             [EditorBrowsable(EditorBrowsableState.Never)]
234             Custom,
235         }
236
237         private static IntPtr NewWithAccessibilityMode(ViewAccessibilityMode accessibilityMode)
238         {
239             switch (accessibilityMode)
240             {
241                 case ViewAccessibilityMode.Custom:
242                     {
243                         return Interop.View.NewCustom();
244                     }
245                 case ViewAccessibilityMode.Default:
246                 default:
247                     {
248                         return Interop.View.New();
249                     }
250             }
251         }
252
253         /// <summary>
254         /// Creates a new instance of a view.
255         /// </summary>
256         /// <since_tizen> 3 </since_tizen>
257         public View() : this(ViewAccessibilityMode.Default)
258         {
259         }
260
261         [EditorBrowsable(EditorBrowsableState.Never)]
262         public View(ViewAccessibilityMode accessibilityMode) : this(NewWithAccessibilityMode(accessibilityMode), true)
263         {
264             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265         }
266
267         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
268         [EditorBrowsable(EditorBrowsableState.Never)]
269         public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
270         {
271         }
272
273         /// <summary>
274         /// Create a new instance of a View with setting the status of shown or hidden.
275         /// </summary>
276         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
277         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
278         [EditorBrowsable(EditorBrowsableState.Never)]
279         public View(bool shown) : this(Interop.View.New(), true)
280         {
281             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282             SetVisible(shown);
283         }
284
285         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
286         {
287             InitializeStyle(viewStyle);
288         }
289
290         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : this(cPtr, cMemoryOwn, shown, cMemoryOwn)
291         {
292         }
293
294         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
295         {
296             if (HasBody())
297             {
298                 PositionUsesPivotPoint = false;
299                 GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
300                 AllowOnlyOwnTouch = defaultAllowOnlyOwnTouch;
301             }
302
303             if (!shown)
304             {
305                 SetVisible(false);
306             }
307
308             aliveCount++;
309         }
310
311         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
312         {
313             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
314
315             if (!shown)
316             {
317                 SetVisible(false);
318             }
319         }
320
321         /// <summary>
322         /// The event that is triggered when the View's ControlState is changed.
323         /// </summary>
324         [EditorBrowsable(EditorBrowsableState.Never)]
325         public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
326
327         internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
328
329
330         /// <summary>
331         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
332         /// </summary>
333         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
334         [EditorBrowsable(EditorBrowsableState.Never)]
335         public bool LayoutSet
336         {
337             get
338             {
339                 return layoutSet;
340             }
341         }
342
343         /// <summary>
344         /// Flag to allow Layouting to be disabled for Views.
345         /// Once a View has a Layout set then any children added to Views from then on will receive
346         /// automatic Layouts.
347         /// </summary>
348         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
349         [EditorBrowsable(EditorBrowsableState.Never)]
350         public static bool LayoutingDisabled { get; set; } = true;
351
352         /// <summary>
353         /// If set to true, the <see cref="GrabTouchAfterLeave"/> property value is set to true when all Views are created.
354         /// </summary>
355         /// <param name="enable">Sets value of GrabTouchAfterLeave property</param>
356         [EditorBrowsable(EditorBrowsableState.Never)]
357         public static void SetDefaultGrabTouchAfterLeave(bool enable)
358         {
359             defaultGrabTouchAfterLeave = enable;
360         }
361
362         /// <summary>
363         /// If set to true, the <see cref="AllowOnlyOwnTouch"/> property value is set to true when all Views are created.
364         /// </summary>
365         /// <param name="enable">Sets value of AllowOnlyOwnTouch property</param>
366         [EditorBrowsable(EditorBrowsableState.Never)]
367         public static void SetDefaultAllowOnlyOwnTouch(bool enable)
368         {
369             defaultAllowOnlyOwnTouch = enable;
370         }
371
372         /// <summary>
373         /// Deprecate. Do not use this.
374         /// The style instance applied to this view.
375         /// Note that do not modify the ViewStyle.
376         /// Modifying ViewStyle will affect other views with same ViewStyle.
377         /// </summary>
378         [EditorBrowsable(EditorBrowsableState.Never)]
379         protected ViewStyle ViewStyle
380         {
381             get
382             {
383                 if (themeData == null) themeData = new ThemeData();
384
385                 if (themeData.viewStyle == null)
386                 {
387                     ApplyStyle(CreateViewStyle());
388                 }
389                 return themeData.viewStyle;
390             }
391         }
392
393         /// <summary>
394         /// Get/Set the control state.
395         /// Note that the ControlState only available for the classes derived from Control.
396         /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
397         /// please set <see cref="EnableControlState"/> to true.
398         /// </summary>
399         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
400         [EditorBrowsable(EditorBrowsableState.Never)]
401         public ControlState ControlState
402         {
403             get
404             {
405                 return themeData == null ? ControlState.Normal : themeData.controlStates;
406             }
407             protected set
408             {
409                 if (ControlState == value)
410                 {
411                     return;
412                 }
413
414                 var prevState = ControlState;
415
416                 if (themeData == null) themeData = new ThemeData();
417                 themeData.controlStates = value;
418
419                 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
420
421                 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
422
423                 if (themeData.ControlStatePropagation)
424                 {
425                     foreach (View child in Children)
426                     {
427                         ControlState allowed = child.PropagatableControlStates;
428                         if (allowed.Contains(ControlState.All))
429                         {
430                             child.ControlState = value;
431                         }
432                         else
433                         {
434                             ControlState newControlState = child.ControlState;
435
436                             if (allowed.Contains(ControlState.Normal))
437                             {
438                                 if (value.Contains(ControlState.Normal))
439                                 {
440                                     newControlState += ControlState.Normal;
441                                 }
442                                 else
443                                 {
444                                     newControlState -= ControlState.Normal;
445                                 }
446                             }
447
448                             if (allowed.Contains(ControlState.Disabled))
449                             {
450                                 if (value.Contains(ControlState.Disabled))
451                                 {
452                                     newControlState += ControlState.Disabled;
453                                 }
454                                 else
455                                 {
456                                     newControlState -= ControlState.Disabled;
457                                 }
458                             }
459
460                             if (allowed.Contains(ControlState.Selected))
461                             {
462                                 if (value.Contains(ControlState.Selected))
463                                 {
464                                     newControlState += ControlState.Selected;
465                                 }
466                                 else
467                                 {
468                                     newControlState -= ControlState.Selected;
469                                 }
470                             }
471
472                             if (allowed.Contains(ControlState.Pressed))
473                             {
474                                 if (value.Contains(ControlState.Pressed))
475                                 {
476                                     newControlState += ControlState.Pressed;
477                                 }
478                                 else
479                                 {
480                                     newControlState -= ControlState.Pressed;
481                                 }
482                             }
483
484                             if (allowed.Contains(ControlState.Focused))
485                             {
486                                 if (value.Contains(ControlState.Focused))
487                                 {
488                                     newControlState += ControlState.Focused;
489                                 }
490                                 else
491                                 {
492                                     newControlState -= ControlState.Focused;
493                                 }
494                             }
495
496                             if (allowed.Contains(ControlState.Other))
497                             {
498                                 if (value.Contains(ControlState.Other))
499                                 {
500                                     newControlState += ControlState.Other;
501                                 }
502                                 else
503                                 {
504                                     newControlState -= ControlState.Other;
505                                 }
506                             }
507
508                             if (child.ControlState != newControlState)
509                                 child.ControlState = newControlState;
510                         }
511                     }
512                 }
513
514                 OnControlStateChanged(changeInfo);
515
516                 ControlStateChangedEvent?.Invoke(this, changeInfo);
517             }
518         }
519
520         /// <summary>
521         /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
522         /// </summary>
523         /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
524         [EditorBrowsable(EditorBrowsableState.Never)]
525         public bool ExcludeLayouting
526         {
527             get
528             {
529                 return (bool)GetValue(ExcludeLayoutingProperty);
530             }
531             set
532             {
533                 SetValue(ExcludeLayoutingProperty, value);
534                 NotifyPropertyChanged();
535             }
536         }
537
538         private bool InternalExcludeLayouting
539         {
540             get
541             {
542                 return excludeLayouting;
543             }
544             set
545             {
546                 excludeLayouting = value;
547                 if (Layout != null && Layout.SetPositionByLayout == value)
548                 {
549                     Layout.SetPositionByLayout = !value;
550                     Layout.RequestLayout();
551                 }
552             }
553         }
554
555         /// <summary>
556         /// The StyleName, type string.
557         /// The value indicates DALi style name defined in json theme file.
558         /// </summary>
559         /// <since_tizen> 3 </since_tizen>
560         public string StyleName
561         {
562             get
563             {
564                 return (string)GetValue(StyleNameProperty);
565             }
566             set
567             {
568                 SetValue(StyleNameProperty, value);
569                 NotifyPropertyChanged();
570             }
571         }
572
573         /// <summary>
574         /// The KeyInputFocus, type bool.
575         /// </summary>
576         [EditorBrowsable(EditorBrowsableState.Never)]
577         public bool KeyInputFocus
578         {
579             get
580             {
581                 return (bool)GetValue(KeyInputFocusProperty);
582             }
583             set
584             {
585                 SetValue(KeyInputFocusProperty, value);
586                 NotifyPropertyChanged();
587             }
588         }
589
590         /// <summary>
591         /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
592         /// </summary>
593         /// <remarks>
594         /// <para>
595         /// The property cascade chaining set is not recommended.
596         /// </para>
597         /// <para>
598         /// Animatable - This property can be animated using <c>Animation</c> class.
599         /// <code>
600         /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
601         /// </code>
602         /// </para>
603         /// </remarks>
604         /// <example>
605         /// This way is recommended for setting the property
606         /// <code>
607         /// var view = new View();
608         /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
609         /// </code>
610         /// This way to set the property is prohibited
611         /// <code>
612         /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
613         /// </code>
614         /// </example>
615         /// <since_tizen> 3 </since_tizen>
616         public Color BackgroundColor
617         {
618             get
619             {
620                 if (NUIApplication.IsUsingXaml)
621                 {
622                     return (Color)GetValue(BackgroundColorProperty);
623                 }
624                 else
625                 {
626                     return (Color)GetInternalBackgroundColorProperty(this);
627                 }
628             }
629             set
630             {
631                 if (NUIApplication.IsUsingXaml)
632                 {
633                     SetValue(BackgroundColorProperty, value);
634                 }
635                 else
636                 {
637                     SetInternalBackgroundColorProperty(this, null, value);
638                 }
639                 NotifyPropertyChanged();
640             }
641         }
642
643         /// <summary>
644         /// The mutually exclusive with "backgroundColor" and "background" type Map.
645         /// </summary>
646         /// <since_tizen> 3 </since_tizen>
647         public string BackgroundImage
648         {
649             get
650             {
651                 return (string)GetValue(BackgroundImageProperty);
652             }
653             set
654             {
655                 SetValue(BackgroundImageProperty, value);
656                 NotifyPropertyChanged();
657             }
658         }
659
660         /// <summary>
661         /// Get or set the border of background image.
662         /// </summary>
663         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
664         [EditorBrowsable(EditorBrowsableState.Never)]
665         public Rectangle BackgroundImageBorder
666         {
667             get
668             {
669                 return (Rectangle)GetValue(BackgroundImageBorderProperty);
670             }
671             set
672             {
673                 SetValue(BackgroundImageBorderProperty, value);
674                 NotifyPropertyChanged();
675             }
676         }
677
678         /// <summary>
679         /// The background of view.
680         /// </summary>
681         /// <since_tizen> 3 </since_tizen>
682         public Tizen.NUI.PropertyMap Background
683         {
684             get
685             {
686                 return (PropertyMap)GetValue(BackgroundProperty);
687             }
688             set
689             {
690                 SetValue(BackgroundProperty, value);
691                 NotifyPropertyChanged();
692             }
693         }
694
695         /// <summary>
696         /// Describes a shadow as an image for a View.
697         /// It is null by default.
698         /// </summary>
699         /// <remarks>
700         /// Getter returns copied instance of current shadow.
701         /// </remarks>
702         /// <remarks>
703         /// The mutually exclusive with "BoxShadow".
704         /// </remarks>
705         /// <remarks>
706         /// <para>
707         /// Animatable - This property can be animated using <c>Animation</c> class.
708         /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
709         /// <code>
710         /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
711         /// </code>
712         /// Animatable sub-property : Offset.
713         /// </para>
714         /// </remarks>
715         [EditorBrowsable(EditorBrowsableState.Never)]
716         public ImageShadow ImageShadow
717         {
718             get
719             {
720                 return (ImageShadow)GetValue(ImageShadowProperty);
721             }
722             set
723             {
724                 SetValue(ImageShadowProperty, value);
725                 NotifyPropertyChanged();
726             }
727         }
728
729         /// <summary>
730         /// Describes a box shaped shadow drawing for a View.
731         /// It is null by default.
732         /// </summary>
733         /// <remarks>
734         /// The mutually exclusive with "ImageShadow".
735         /// </remarks>
736         /// <remarks>
737         /// <para>
738         /// Animatable - This property can be animated using <c>Animation</c> class.
739         /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
740         /// <code>
741         /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
742         /// </code>
743         /// Animatable sub-property : Offset, Color, BlurRadius.
744         /// </para>
745         /// </remarks>
746         /// <since_tizen> 9 </since_tizen>
747         public Shadow BoxShadow
748         {
749             get
750             {
751                 return (Shadow)GetValue(BoxShadowProperty);
752             }
753             set
754             {
755                 SetValue(BoxShadowProperty, value);
756                 NotifyPropertyChanged();
757             }
758         }
759
760         /// <summary>
761         /// The radius for the rounded corners of the View.
762         /// This will rounds background and shadow edges.
763         /// 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).
764         /// Each radius will clamp internally to the half of smaller of the view's width or height.
765         /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
766         /// </summary>
767         /// <remarks>
768         /// <para>
769         /// Animatable - This property can be animated using <c>Animation</c> class.
770         /// <code>
771         /// animation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
772         /// </code>
773         /// </para>
774         /// </remarks>
775         /// <since_tizen> 9 </since_tizen>
776         public Vector4 CornerRadius
777         {
778             get
779             {
780                 return (Vector4)GetValue(CornerRadiusProperty);
781             }
782             set
783             {
784                 SetValue(CornerRadiusProperty, value);
785                 NotifyPropertyChanged();
786             }
787         }
788
789         /// <summary>
790         /// Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units).
791         /// It is absolute by default.
792         /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
793         /// </summary>
794         /// <since_tizen> 9 </since_tizen>
795         public VisualTransformPolicyType CornerRadiusPolicy
796         {
797             get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
798             set => SetValue(CornerRadiusPolicyProperty, value);
799         }
800
801         /// <summary>
802         /// The width for the borderline of the View.
803         /// </summary>
804         /// <remarks>
805         /// <para>
806         /// Animatable - This property can be animated using <c>Animation</c> class.
807         /// <code>
808         /// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
809         /// </code>
810         /// </para>
811         /// Note that, an image background may not have borderline if it uses the Border property.
812         /// </remarks>
813         /// <since_tizen> 9 </since_tizen>
814         public float BorderlineWidth
815         {
816             get
817             {
818                 return (float)GetValue(BorderlineWidthProperty);
819             }
820             set
821             {
822                 SetValue(BorderlineWidthProperty, value);
823                 NotifyPropertyChanged();
824             }
825         }
826
827         /// <summary>
828         /// The color for the borderline of the View.
829         /// It is Color.Black by default.
830         /// </summary>
831         /// <remarks>
832         /// <para>
833         /// Animatable - This property can be animated using <c>Animation</c> class.
834         /// <code>
835         /// animation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
836         /// </code>
837         /// </para>
838         /// </remarks>
839         /// <since_tizen> 9 </since_tizen>
840         public Color BorderlineColor
841         {
842             get
843             {
844                 return (Color)GetValue(BorderlineColorProperty);
845             }
846             set
847             {
848                 SetValue(BorderlineColorProperty, value);
849                 NotifyPropertyChanged();
850             }
851         }
852
853         /// <summary>
854         /// The color selector for the borderline of the View.
855         /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
856         /// So this API is internally used only.
857         /// </summary>
858         internal Selector<Color> BorderlineColorSelector
859         {
860             get
861             {
862                 return (Selector<Color>)GetValue(BorderlineColorSelectorProperty);
863             }
864             set
865             {
866                 SetValue(BorderlineColorSelectorProperty, value);
867                 NotifyPropertyChanged();
868             }
869         }
870
871         /// <summary>
872         /// The Relative offset for the borderline of the View.
873         /// Recommended range : [-1.0f to 1.0f].
874         /// If -1.0f, draw borderline inside of the View.
875         /// If 1.0f, draw borderline outside of the View.
876         /// If 0.0f, draw borderline half inside and half outside.
877         /// It is 0.0f by default.
878         /// </summary>
879         /// <remarks>
880         /// <para>
881         /// Animatable - This property can be animated using <c>Animation</c> class.
882         /// <code>
883         /// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
884         /// </code>
885         /// </para>
886         /// </remarks>
887         /// <since_tizen> 9 </since_tizen>
888         public float BorderlineOffset
889         {
890             get
891             {
892                 return (float)GetValue(BorderlineOffsetProperty);
893             }
894             set
895             {
896                 SetValue(BorderlineOffsetProperty, value);
897                 NotifyPropertyChanged();
898             }
899         }
900
901         /// <summary>
902         /// The current state of the view.
903         /// </summary>
904         /// <since_tizen> 3 </since_tizen>
905         public States State
906         {
907             get
908             {
909                 return (States)GetValue(StateProperty);
910             }
911             set
912             {
913                 SetValue(StateProperty, value);
914                 NotifyPropertyChanged();
915             }
916         }
917
918         /// <summary>
919         /// The current sub state of the view.
920         /// </summary>
921         /// <since_tizen> 3 </since_tizen>
922         public States SubState
923         {
924             get
925             {
926                 return (States)GetValue(SubStateProperty);
927             }
928             set
929             {
930                 SetValue(SubStateProperty, value);
931                 NotifyPropertyChanged();
932             }
933         }
934
935         /// <summary>
936         /// Displays a tooltip
937         /// </summary>
938         /// <since_tizen> 3 </since_tizen>
939         public Tizen.NUI.PropertyMap Tooltip
940         {
941             get
942             {
943                 return (PropertyMap)GetValue(TooltipProperty);
944             }
945             set
946             {
947                 SetValue(TooltipProperty, value);
948                 NotifyPropertyChanged();
949             }
950         }
951
952         /// <summary>
953         /// Displays a tooltip as a text.
954         /// </summary>
955         /// <since_tizen> 3 </since_tizen>
956         public string TooltipText
957         {
958             get
959             {
960                 return GetValue(TooltipTextProperty) as string;
961             }
962             set
963             {
964                 SetValue(TooltipTextProperty, value);
965             }
966         }
967
968         private string InternalTooltipText
969         {
970             get
971             {
972                 using (var propertyValue = GetProperty(Property.TOOLTIP))
973                 {
974                     using var propertyMap = new PropertyMap();
975                     if (propertyValue != null && propertyValue.Get(propertyMap))
976                     {
977                         using var retrivedContentValue = propertyMap?.Find(NDalic.TooltipContent);
978                         if (retrivedContentValue != null)
979                         {
980                             using var contextPropertyMap = new PropertyMap();
981                             if (retrivedContentValue.Get(contextPropertyMap))
982                             {
983                                 using var retrivedTextValue = contextPropertyMap?.Find(NDalic.TextVisualText);
984                                 if (retrivedTextValue != null && retrivedTextValue.Get(out string retrivedValue))
985                                 {
986                                     return retrivedValue;
987                                 }
988                             }
989                         }
990                     }
991                     return "";
992                 }
993             }
994             set
995             {
996                 var temp = new Tizen.NUI.PropertyValue(value);
997                 SetProperty(View.Property.TOOLTIP, temp);
998                 temp.Dispose();
999                 NotifyPropertyChanged();
1000             }
1001         }
1002
1003         /// <summary>
1004         /// The Child property of FlexContainer.<br />
1005         /// The proportion of the free space in the container, the flex item will receive.<br />
1006         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1007         /// </summary>
1008         /// <since_tizen> 3 </since_tizen>
1009         [Obsolete("Deprecated in API8, will be removed in API10.")]
1010         public float Flex
1011         {
1012             get
1013             {
1014                 return (float)GetValue(FlexProperty);
1015             }
1016             set
1017             {
1018                 SetValue(FlexProperty, value);
1019                 NotifyPropertyChanged();
1020             }
1021         }
1022
1023         /// <summary>
1024         /// The Child property of FlexContainer.<br />
1025         /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
1026         /// </summary>
1027         /// <since_tizen> 3 </since_tizen>
1028         [Obsolete("Deprecated in API8, will be removed in API10.")]
1029         public int AlignSelf
1030         {
1031             get
1032             {
1033                 return (int)GetValue(AlignSelfProperty);
1034             }
1035             set
1036             {
1037                 SetValue(AlignSelfProperty, value);
1038                 NotifyPropertyChanged();
1039             }
1040         }
1041
1042         /// <summary>
1043         /// The Child property of FlexContainer.<br />
1044         /// The space around the flex item.<br />
1045         /// </summary>
1046         /// <remarks>
1047         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
1048         /// </remarks>
1049         /// <since_tizen> 3 </since_tizen>
1050         [Obsolete("Deprecated in API8, will be removed in API10.")]
1051         public Vector4 FlexMargin
1052         {
1053             get
1054             {
1055                 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
1056                 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
1057             }
1058             set
1059             {
1060                 SetValue(FlexMarginProperty, value);
1061                 NotifyPropertyChanged();
1062             }
1063         }
1064
1065         /// <summary>
1066         /// The top-left cell this child occupies, if not set, the first available cell is used.
1067         /// </summary>
1068         /// <remarks>
1069         /// The property cascade chaining set is not recommended.
1070         /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
1071         /// </remarks>
1072         /// <example>
1073         /// This way is recommended for setting the property
1074         /// <code>
1075         /// var view = new View();
1076         /// view.CellIndex = new Vector2(1, 3);
1077         /// </code>
1078         /// This way to set the property is prohibited
1079         /// <code>
1080         /// view.CellIndex.X = 1; //This does not guarantee a proper operation
1081         /// </code>
1082         /// </example>
1083         /// <since_tizen> 3 </since_tizen>
1084         public Vector2 CellIndex
1085         {
1086             get
1087             {
1088                 if (NUIApplication.IsUsingXaml)
1089                 {
1090                     return (Vector2)GetValue(CellIndexProperty);
1091                 }
1092                 else
1093                 {
1094                     return (Vector2)GetInternalCellIndexProperty(this);
1095                 }
1096
1097
1098             }
1099             set
1100             {
1101                 if (NUIApplication.IsUsingXaml)
1102                 {
1103                     SetValue(CellIndexProperty, value);
1104                 }
1105                 else
1106                 {
1107                     SetInternalCellIndexProperty(this, null, value);
1108                 }
1109
1110
1111                 NotifyPropertyChanged();
1112             }
1113         }
1114
1115         /// <summary>
1116         /// The number of rows this child occupies, if not set, the default value is 1.
1117         /// </summary>
1118         /// <remarks>
1119         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1120         /// </remarks>
1121         /// <since_tizen> 3 </since_tizen>
1122         public float RowSpan
1123         {
1124             get
1125             {
1126                 return (float)GetValue(RowSpanProperty);
1127             }
1128             set
1129             {
1130                 SetValue(RowSpanProperty, value);
1131                 NotifyPropertyChanged();
1132             }
1133         }
1134
1135         /// <summary>
1136         /// The number of columns this child occupies, if not set, the default value is 1.
1137         /// </summary>
1138         /// <remarks>
1139         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1140         /// </remarks>
1141         /// <since_tizen> 3 </since_tizen>
1142         public float ColumnSpan
1143         {
1144             get
1145             {
1146                 return (float)GetValue(ColumnSpanProperty);
1147             }
1148             set
1149             {
1150                 SetValue(ColumnSpanProperty, value);
1151                 NotifyPropertyChanged();
1152             }
1153         }
1154
1155         /// <summary>
1156         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1157         /// </summary>
1158         /// <remarks>
1159         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1160         /// </remarks>
1161         /// <since_tizen> 3 </since_tizen>
1162         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1163         {
1164             get
1165             {
1166                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
1167             }
1168             set
1169             {
1170                 SetValue(CellHorizontalAlignmentProperty, value);
1171                 NotifyPropertyChanged();
1172             }
1173         }
1174
1175         /// <summary>
1176         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1177         /// </summary>
1178         /// <remarks>
1179         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1180         /// </remarks>
1181         /// <since_tizen> 3 </since_tizen>
1182         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1183         {
1184             get
1185             {
1186                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
1187             }
1188             set
1189             {
1190                 SetValue(CellVerticalAlignmentProperty, value);
1191                 NotifyPropertyChanged();
1192             }
1193         }
1194
1195         /// <summary>
1196         /// The left focusable view.<br />
1197         /// This will return null if not set.<br />
1198         /// This will also return null if the specified left focusable view is not on a window.<br />
1199         /// </summary>
1200         /// <since_tizen> 3 </since_tizen>
1201         public View LeftFocusableView
1202         {
1203             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1204             get
1205             {
1206                 return (View)GetValue(LeftFocusableViewProperty);
1207             }
1208             set
1209             {
1210                 SetValue(LeftFocusableViewProperty, value);
1211                 NotifyPropertyChanged();
1212             }
1213         }
1214
1215         /// <summary>
1216         /// The right focusable view.<br />
1217         /// This will return null if not set.<br />
1218         /// This will also return null if the specified right focusable view is not on a window.<br />
1219         /// </summary>
1220         /// <since_tizen> 3 </since_tizen>
1221         public View RightFocusableView
1222         {
1223             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1224             get
1225             {
1226                 return (View)GetValue(RightFocusableViewProperty);
1227             }
1228             set
1229             {
1230                 SetValue(RightFocusableViewProperty, value);
1231                 NotifyPropertyChanged();
1232             }
1233         }
1234
1235         /// <summary>
1236         /// The up focusable view.<br />
1237         /// This will return null if not set.<br />
1238         /// This will also return null if the specified up focusable view is not on a window.<br />
1239         /// </summary>
1240         /// <since_tizen> 3 </since_tizen>
1241         public View UpFocusableView
1242         {
1243             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1244             get
1245             {
1246                 return (View)GetValue(UpFocusableViewProperty);
1247             }
1248             set
1249             {
1250                 SetValue(UpFocusableViewProperty, value);
1251                 NotifyPropertyChanged();
1252             }
1253         }
1254
1255         /// <summary>
1256         /// The down focusable view.<br />
1257         /// This will return null if not set.<br />
1258         /// This will also return null if the specified down focusable view is not on a window.<br />
1259         /// </summary>
1260         /// <since_tizen> 3 </since_tizen>
1261         public View DownFocusableView
1262         {
1263             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1264             get
1265             {
1266                 return (View)GetValue(DownFocusableViewProperty);
1267             }
1268             set
1269             {
1270                 SetValue(DownFocusableViewProperty, value);
1271                 NotifyPropertyChanged();
1272             }
1273         }
1274
1275         /// <summary>
1276         /// The clockwise focusable view by rotary wheel.<br />
1277         /// This will return null if not set.<br />
1278         /// This will also return null if the specified clockwise focusable view is not on a window.<br />
1279         /// </summary>
1280         [EditorBrowsable(EditorBrowsableState.Never)]
1281         public View ClockwiseFocusableView
1282         {
1283             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1284             get
1285             {
1286                 return (View)GetValue(ClockwiseFocusableViewProperty);
1287             }
1288             set
1289             {
1290                 SetValue(ClockwiseFocusableViewProperty, value);
1291                 NotifyPropertyChanged();
1292             }
1293         }
1294
1295         /// <summary>
1296         /// The counter clockwise focusable view by rotary wheel.<br />
1297         /// This will return null if not set.<br />
1298         /// This will also return null if the specified counter clockwise focusable view is not on a window.<br />
1299         /// </summary>
1300         [EditorBrowsable(EditorBrowsableState.Never)]
1301         public View CounterClockwiseFocusableView
1302         {
1303             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1304             get
1305             {
1306                 return (View)GetValue(CounterClockwiseFocusableViewProperty);
1307             }
1308             set
1309             {
1310                 SetValue(CounterClockwiseFocusableViewProperty, value);
1311                 NotifyPropertyChanged();
1312             }
1313         }
1314
1315         /// <summary>
1316         /// Whether the view should be focusable by keyboard navigation.
1317         /// </summary>
1318         /// <since_tizen> 3 </since_tizen>
1319         public bool Focusable
1320         {
1321             set
1322             {
1323                 SetValue(FocusableProperty, value);
1324                 NotifyPropertyChanged();
1325             }
1326             get
1327             {
1328                 return (bool)GetValue(FocusableProperty);
1329             }
1330         }
1331
1332         /// <summary>
1333         /// 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.
1334         /// Note : Default value is true.
1335         /// </summary>
1336         [EditorBrowsable(EditorBrowsableState.Never)]
1337         public bool FocusableChildren
1338         {
1339             set
1340             {
1341                 SetValue(FocusableChildrenProperty, value);
1342                 NotifyPropertyChanged();
1343             }
1344             get
1345             {
1346                 return (bool)GetValue(FocusableChildrenProperty);
1347             }
1348         }
1349
1350         /// <summary>
1351         /// Whether this view can focus by touch.
1352         /// If Focusable is false, FocusableInTouch is disabled.
1353         /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
1354         /// </summary>
1355         [EditorBrowsable(EditorBrowsableState.Never)]
1356         public bool FocusableInTouch
1357         {
1358             set
1359             {
1360                 SetValue(FocusableInTouchProperty, value);
1361                 NotifyPropertyChanged();
1362             }
1363             get
1364             {
1365                 return (bool)GetValue(FocusableInTouchProperty);
1366             }
1367         }
1368
1369         /// <summary>
1370         /// Retrieves the position of the view.
1371         /// The coordinates are relative to the view's parent.
1372         /// </summary>
1373         /// <remarks>
1374         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1375         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
1376         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1377         /// and users can get the current actual values through them.
1378         /// </remarks>
1379         /// <since_tizen> 3 </since_tizen>
1380         public Position CurrentPosition
1381         {
1382             get
1383             {
1384                 return GetCurrentPosition();
1385             }
1386         }
1387
1388         /// <summary>
1389         /// Sets the size of a view for the width and the height.<br />
1390         /// Geometry can be scaled to fit within this area.<br />
1391         /// This does not interfere with the view's scale factor.<br />
1392         /// The views default depth is the minimum of width and height.<br />
1393         /// </summary>
1394         /// <remarks>
1395         /// The property cascade chaining set is not recommended.
1396         /// </remarks>
1397         /// <example>
1398         /// This way is recommended for setting the property
1399         /// <code>
1400         /// var view = new View();
1401         /// view.Size2D = new Size2D(100, 200);
1402         /// </code>
1403         /// This way to set the property is prohibited
1404         /// <code>
1405         /// view.Size2D.Width = 100; //This does not guarantee a proper operation
1406         /// </code>
1407         /// </example>
1408         /// <since_tizen> 3 </since_tizen>
1409         public Size2D Size2D
1410         {
1411             get
1412             {
1413                 if (NUIApplication.IsUsingXaml)
1414                 {
1415                     var temp = (Size2D)GetValue(Size2DProperty);
1416                     if (this.Layout == null)
1417                     {
1418                         if (temp.Width < 0) { temp.Width = 0; }
1419                         if (temp.Height < 0) { temp.Height = 0; }
1420                     }
1421                     return temp;
1422                 }
1423                 else
1424                 {
1425                     var temp = (Size2D)GetInternalSize2DProperty(this);
1426                     if (this.Layout == null)
1427                     {
1428                         if (temp.Width < 0) { temp.Width = 0; }
1429                         if (temp.Height < 0) { temp.Height = 0; }
1430                     }
1431                     return temp;
1432                 }
1433             }
1434             set
1435             {
1436                 if (NUIApplication.IsUsingXaml)
1437                 {
1438                     SetValue(Size2DProperty, value);
1439                 }
1440                 else
1441                 {
1442                     SetInternalSize2DProperty(this, null, value);
1443                 }
1444                 NotifyPropertyChanged();
1445             }
1446         }
1447
1448         /// <summary>
1449         /// Retrieves the size of the view.
1450         /// The coordinates are relative to the view's parent.
1451         /// </summary>
1452         /// <remarks>
1453         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
1454         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
1455         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
1456         /// and users can get the current actual values through them.
1457         /// </remarks>
1458         /// <since_tizen> 3 </since_tizen>
1459         public Size2D CurrentSize
1460         {
1461             get
1462             {
1463                 return GetCurrentSize();
1464             }
1465         }
1466
1467         /// <summary>
1468         /// Retrieves and sets the view's opacity.<br />
1469         /// </summary>
1470         /// <remarks>
1471         /// <para>
1472         /// Animatable - This property can be animated using <c>Animation</c> class.
1473         /// <code>
1474         /// animation.AnimateTo(view, "Opacity", 0.5f);
1475         /// </code>
1476         /// </para>
1477         /// </remarks>
1478         /// <since_tizen> 3 </since_tizen>
1479         public float Opacity
1480         {
1481             get
1482             {
1483                 return (float)GetValue(OpacityProperty);
1484             }
1485             set
1486             {
1487                 SetValue(OpacityProperty, value);
1488                 NotifyPropertyChanged();
1489             }
1490         }
1491
1492         /// <summary>
1493         /// Sets the position of the view for X and Y.<br />
1494         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1495         /// If the position inheritance is disabled, sets the world position.<br />
1496         /// </summary>
1497         /// <remarks>
1498         /// The property cascade chaining set is not recommended.
1499         ///</remarks>
1500         /// <example>
1501         /// This way is recommended for setting the property
1502         /// <code>
1503         /// var view = new View();
1504         /// view.Position2D = new Position2D(100, 200);
1505         /// </code>
1506         /// This way to set the property is prohibited
1507         /// <code>
1508         /// view.Position2D.X = 100; //This does not guarantee a proper operation
1509         /// </code>
1510         /// </example>
1511         /// <since_tizen> 3 </since_tizen>
1512         public Position2D Position2D
1513         {
1514             get
1515             {
1516                 if (NUIApplication.IsUsingXaml)
1517                 {
1518                     return (Position2D)GetValue(Position2DProperty);
1519                 }
1520                 else
1521                 {
1522                     return (Position2D)GetInternalPosition2DProperty(this);
1523
1524                 }
1525             }
1526             set
1527             {
1528                 if (NUIApplication.IsUsingXaml)
1529                 {
1530                     SetValue(Position2DProperty, value);
1531                 }
1532                 else
1533                 {
1534                     SetInternalPosition2DProperty(this, null, value);
1535
1536                 }
1537                 NotifyPropertyChanged();
1538             }
1539         }
1540
1541         /// <summary>
1542         /// Retrieves the screen position of the view.<br />
1543         /// </summary>
1544         /// <since_tizen> 3 </since_tizen>
1545         public Vector2 ScreenPosition
1546         {
1547             get
1548             {
1549                 return GetCurrentScreenPosition();
1550             }
1551         }
1552
1553         /// <summary>
1554         /// Retrieves the screen position and size of the view.<br />
1555         /// </summary>
1556         /// <remarks>
1557         /// The float type Rectangle class is not ready yet.
1558         /// Therefore, it transmits data in Vector4 class.
1559         /// This type should later be changed to the appropriate data type.
1560         /// </remarks>
1561         [EditorBrowsable(EditorBrowsableState.Never)]
1562         public Vector4 ScreenPositionSize
1563         {
1564             get
1565             {
1566                 return GetCurrentScreenPositionSize();
1567             }
1568         }
1569
1570         /// <summary>
1571         /// Determines whether the pivot point should be used to determine the position of the view.
1572         /// This is false by default.
1573         /// </summary>
1574         /// <remarks>If false, then the top-left of the view is used for the position.
1575         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1576         /// </remarks>
1577         /// <since_tizen> 3 </since_tizen>
1578         public bool PositionUsesPivotPoint
1579         {
1580             get
1581             {
1582                 return (bool)GetValue(PositionUsesPivotPointProperty);
1583             }
1584             set
1585             {
1586                 SetValue(PositionUsesPivotPointProperty, value);
1587                 NotifyPropertyChanged();
1588             }
1589         }
1590
1591         /// <summary>
1592         /// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
1593         /// </summary>
1594         /// <since_tizen> 3 </since_tizen>
1595         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
1596             "Like: " +
1597             "View view = new View(); " +
1598             "view.PivotPoint = PivotPoint.Center; " +
1599             "view.PositionUsesPivotPoint = true;" +
1600             " This has been deprecated in API5 and will be removed in API8")]
1601         [EditorBrowsable(EditorBrowsableState.Never)]
1602         public bool PositionUsesAnchorPoint
1603         {
1604             get
1605             {
1606                 return (bool)GetValue(PositionUsesAnchorPointProperty);
1607             }
1608             set
1609             {
1610                 SetValue(PositionUsesAnchorPointProperty, value);
1611             }
1612         }
1613
1614         private bool InternalPositionUsesAnchorPoint
1615         {
1616             get
1617             {
1618                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
1619             }
1620             set
1621             {
1622                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
1623                 NotifyPropertyChanged();
1624             }
1625         }
1626
1627         /// <summary>
1628         /// Queries whether the view is connected to the stage.<br />
1629         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1630         /// </summary>
1631         /// <since_tizen> 3 </since_tizen>
1632         public bool IsOnWindow
1633         {
1634             get
1635             {
1636                 return OnWindow();
1637             }
1638         }
1639
1640         /// <summary>
1641         /// Gets the depth in the hierarchy for the view.
1642         /// </summary>
1643         /// <since_tizen> 3 </since_tizen>
1644         public int HierarchyDepth
1645         {
1646             get
1647             {
1648                 return GetHierarchyDepth();
1649             }
1650         }
1651
1652         /// <summary>
1653         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1654         /// </summary>
1655         /// <remarks>
1656         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1657         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1658         /// The values set by this property will likely change.
1659         /// </remarks>
1660         /// <since_tizen> 3 </since_tizen>
1661         public int SiblingOrder
1662         {
1663             get
1664             {
1665                 return (int)GetValue(SiblingOrderProperty);
1666             }
1667             set
1668             {
1669                 SetValue(SiblingOrderProperty, value);
1670
1671                 Layout?.ChangeLayoutSiblingOrder(value);
1672
1673                 NotifyPropertyChanged();
1674             }
1675         }
1676
1677         /// <summary>
1678         /// Returns the natural size of the view.
1679         /// </summary>
1680         /// <remarks>
1681         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1682         /// </remarks>
1683         /// <since_tizen> 5 </since_tizen>
1684         public Vector3 NaturalSize
1685         {
1686             get
1687             {
1688                 Vector3 ret = GetNaturalSize();
1689                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1690                 return ret;
1691             }
1692         }
1693
1694         /// <summary>
1695         /// Returns the natural size (Size2D) of the view.
1696         /// </summary>
1697         /// <remarks>
1698         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1699         /// </remarks>
1700         /// <since_tizen> 4 </since_tizen>
1701         public Size2D NaturalSize2D
1702         {
1703             get
1704             {
1705                 Vector3 temp = GetNaturalSize();
1706                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1707                 Size2D sz = null;
1708                 if (temp != null)
1709                 {
1710                     sz = new Size2D((int)temp.Width, (int)temp.Height);
1711                     temp.Dispose();
1712                 }
1713                 return sz;
1714             }
1715         }
1716
1717         /// <summary>
1718         /// Gets or sets the origin of a view within its parent's area.<br />
1719         /// 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 />
1720         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1721         /// A view's position is the distance between this origin and the view's anchor-point.<br />
1722         /// </summary>
1723         /// <pre>The view has been initialized.</pre>
1724         /// <since_tizen> 3 </since_tizen>
1725         public Position ParentOrigin
1726         {
1727             get
1728             {
1729                 if (NUIApplication.IsUsingXaml)
1730                 {
1731                     var tmp = (Position)GetValue(ParentOriginProperty);
1732                     return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1733                 }
1734                 else
1735                 {
1736                     var tmp = (Position)GetInternalParentOriginProperty(this);
1737                     return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1738                 }
1739             }
1740             set
1741             {
1742                 if (NUIApplication.IsUsingXaml)
1743                 {
1744                     SetValue(ParentOriginProperty, value);
1745                 }
1746                 else
1747                 {
1748                     SetInternalParentOriginProperty(this, null, value);
1749                 }
1750                 NotifyPropertyChanged();
1751             }
1752         }
1753
1754         /// <summary>
1755         /// Gets or sets the anchor-point of a view.<br />
1756         /// 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 />
1757         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1758         /// A view position is the distance between its parent-origin and this anchor-point.<br />
1759         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1760         /// <pre>The view has been initialized.</pre>
1761         /// </summary>
1762         /// <remarks>
1763         /// The property cascade chaining set is not recommended.
1764         ///</remarks>
1765         /// <example>
1766         /// This way is recommended for setting the property
1767         /// <code>
1768         /// var view = new View();
1769         /// view.PivotPoint = PivotPoint.Center;
1770         /// </code>
1771         /// This way to set the property is prohibited
1772         /// <code>
1773         /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1774         /// </code>
1775         /// </example>
1776         /// <since_tizen> 3 </since_tizen>
1777         public Position PivotPoint
1778         {
1779             get
1780             {
1781                 if (NUIApplication.IsUsingXaml)
1782                 {
1783                     return (Position)GetValue(PivotPointProperty);
1784                 }
1785                 else
1786                 {
1787                     return (Position)GetInternalPivotPointProperty(this);
1788                 }
1789
1790
1791             }
1792             set
1793             {
1794                 if (NUIApplication.IsUsingXaml)
1795                 {
1796                     SetValue(PivotPointProperty, value);
1797                 }
1798                 else
1799                 {
1800                     SetInternalPivotPointProperty(this, null, value);
1801                 }
1802
1803                 NotifyPropertyChanged();
1804             }
1805         }
1806
1807         /// <summary>
1808         /// Gets or sets the size width of the view.
1809         /// </summary>
1810         /// <remarks>
1811         /// <para>
1812         /// Animatable - This property can be animated using <c>Animation</c> class.
1813         /// <code>
1814         /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1815         /// </code>
1816         /// </para>
1817         /// </remarks>
1818         /// <since_tizen> 3 </since_tizen>
1819         public float SizeWidth
1820         {
1821             get
1822             {
1823                 if (NUIApplication.IsUsingXaml)
1824                 {
1825                     return (float)GetValue(SizeWidthProperty);
1826                 }
1827                 else
1828                 {
1829                     return (float)GetInternalSizeWidthProperty(this);
1830                 }
1831
1832
1833             }
1834             set
1835             {
1836                 if (NUIApplication.IsUsingXaml)
1837                 {
1838                     SetValue(SizeWidthProperty, value);
1839                 }
1840                 else
1841                 {
1842                     SetInternalSizeWidthProperty(this, null, value);
1843                 }
1844
1845                 NotifyPropertyChanged();
1846             }
1847         }
1848
1849         /// <summary>
1850         /// Gets or sets the size height of the view.
1851         /// </summary>
1852         /// <remarks>
1853         /// <para>
1854         /// Animatable - This property can be animated using <c>Animation</c> class.
1855         /// </para>
1856         /// <code>
1857         /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1858         /// </code>
1859         /// </remarks>
1860         /// <since_tizen> 3 </since_tizen>
1861         public float SizeHeight
1862         {
1863             get
1864             {
1865                 if (NUIApplication.IsUsingXaml)
1866                 {
1867                     return (float)GetValue(SizeHeightProperty);
1868                 }
1869                 else
1870                 {
1871                     return (float)GetInternalSizeHeightProperty(this);
1872                 }
1873
1874
1875             }
1876             set
1877             {
1878                 if (NUIApplication.IsUsingXaml)
1879                 {
1880                     SetValue(SizeHeightProperty, value);
1881                 }
1882                 else
1883                 {
1884                     SetInternalSizeHeightProperty(this, null, value);
1885                 }
1886
1887
1888                 NotifyPropertyChanged();
1889             }
1890         }
1891
1892         /// <summary>
1893         /// Gets or sets the position of the view.<br />
1894         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1895         /// If the position inheritance is disabled, sets the world position.<br />
1896         /// </summary>
1897         /// <remarks>
1898         /// <para>
1899         /// Animatable - This property can be animated using <c>Animation</c> class.
1900         /// <code>
1901         /// animation.AnimateTo(view, "Position", new Position(50, 0));
1902         /// </code>
1903         /// </para>
1904         /// The property cascade chaining set is not recommended.
1905         /// </remarks>
1906         /// <example>
1907         /// This way is recommended for setting the property
1908         /// <code>
1909         /// var view = new View();
1910         /// view.Position = new Position(100, 200.5f, 0);
1911         /// </code>
1912         /// This way to set the property is prohibited
1913         /// <code>
1914         /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1915         /// </code>
1916         /// </example>
1917         /// <since_tizen> 3 </since_tizen>
1918         public Position Position
1919         {
1920             get
1921             {
1922                 if (NUIApplication.IsUsingXaml)
1923                 {
1924                     return (Position)GetValue(PositionProperty);
1925                 }
1926                 else
1927                 {
1928                     return (Position2D)GetInternalPositionProperty(this);
1929                 }
1930             }
1931             set
1932             {
1933                 if (NUIApplication.IsUsingXaml)
1934                 {
1935                     SetValue(PositionProperty, value);
1936                 }
1937                 else
1938                 {
1939                     SetInternalPositionProperty(this, null, value);
1940                 }
1941                 NotifyPropertyChanged();
1942             }
1943         }
1944
1945         /// <summary>
1946         /// Gets or sets the position X of the view.
1947         /// </summary>
1948         /// <remarks>
1949         /// <para>
1950         /// Animatable - This property can be animated using <c>Animation</c> class.
1951         /// <code>
1952         /// animation.AnimateTo(view, "PositionX", 50.0f);
1953         /// </code>
1954         /// </para>
1955         /// </remarks>
1956         /// <since_tizen> 3 </since_tizen>
1957         public float PositionX
1958         {
1959             get
1960             {
1961                 if (NUIApplication.IsUsingXaml)
1962                 {
1963                     return (float)GetValue(PositionXProperty);
1964                 }
1965                 else
1966                 {
1967                     return (float)GetInternalPositionXProperty(this);
1968                 }
1969             }
1970             set
1971             {
1972                 if (NUIApplication.IsUsingXaml)
1973                 {
1974                     SetValue(PositionXProperty, value);
1975                 }
1976                 else
1977                 {
1978                     SetInternalPositionXProperty(this, null, value);
1979                 }
1980                 NotifyPropertyChanged();
1981             }
1982         }
1983
1984         /// <summary>
1985         /// Gets or sets the position Y of the view.
1986         /// </summary>
1987         /// <remarks>
1988         /// <para>
1989         /// Animatable - This property can be animated using <c>Animation</c> class.
1990         /// <code>
1991         /// animation.AnimateTo(view, "PositionY", 50.0f);
1992         /// </code>
1993         /// </para>
1994         /// </remarks>
1995         /// <since_tizen> 3 </since_tizen>
1996         public float PositionY
1997         {
1998             get
1999             {
2000                 if (NUIApplication.IsUsingXaml)
2001                 {
2002                     return (float)GetValue(PositionYProperty);
2003                 }
2004                 else
2005                 {
2006                     return (float)GetInternalPositionYProperty(this);
2007                 }
2008             }
2009             set
2010             {
2011                 if (NUIApplication.IsUsingXaml)
2012                 {
2013                     SetValue(PositionYProperty, value);
2014                 }
2015                 else
2016                 {
2017                     SetInternalPositionYProperty(this, null, value);
2018                 }
2019                 NotifyPropertyChanged();
2020             }
2021         }
2022
2023         /// <summary>
2024         /// Gets or sets the position Z of the view.
2025         /// </summary>
2026         /// <remarks>
2027         /// <para>
2028         /// Animatable - This property can be animated using <c>Animation</c> class.
2029         /// <code>
2030         /// animation.AnimateTo(view, "PositionZ", 50.0f);
2031         /// </code>
2032         /// </para>
2033         /// </remarks>
2034         /// <since_tizen> 3 </since_tizen>
2035         public float PositionZ
2036         {
2037             get
2038             {
2039                 if (NUIApplication.IsUsingXaml)
2040                 {
2041                     return (float)GetValue(PositionZProperty);
2042                 }
2043                 else
2044                 {
2045                     return (float)GetInternalPositionZProperty(this);
2046                 }
2047
2048
2049             }
2050             set
2051             {
2052                 if (NUIApplication.IsUsingXaml)
2053                 {
2054                     SetValue(PositionZProperty, value);
2055                 }
2056                 else
2057                 {
2058                     SetInternalPositionZProperty(this, null, value);
2059                 }
2060
2061                 NotifyPropertyChanged();
2062             }
2063         }
2064
2065         /// <summary>
2066         /// Gets or sets the world position of the view.
2067         /// </summary>
2068         /// <since_tizen> 3 </since_tizen>
2069         public Vector3 WorldPosition
2070         {
2071             get
2072             {
2073                 return GetCurrentWorldPosition();
2074             }
2075         }
2076
2077         /// <summary>
2078         /// Gets or sets the orientation of the view.<br />
2079         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2080         /// </summary>
2081         /// <remarks>
2082         /// <para>
2083         /// This is an asynchronous method.
2084         /// </para>
2085         /// <para>
2086         /// Animatable - This property can be animated using <c>Animation</c> class.
2087         /// <code>
2088         /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
2089         /// </code>
2090         /// </para>
2091         /// </remarks>
2092         /// <since_tizen> 3 </since_tizen>
2093         public Rotation Orientation
2094         {
2095             get
2096             {
2097                 return (Rotation)GetValue(OrientationProperty);
2098             }
2099             set
2100             {
2101                 SetValue(OrientationProperty, value);
2102                 NotifyPropertyChanged();
2103             }
2104         }
2105
2106         /// <summary>
2107         /// Gets or sets the world orientation of the view.<br />
2108         /// </summary>
2109         /// <since_tizen> 3 </since_tizen>
2110         public Rotation WorldOrientation
2111         {
2112             get
2113             {
2114                 Rotation temp = new Rotation();
2115                 var pValue = GetProperty(View.Property.WorldOrientation);
2116                 pValue.Get(temp);
2117                 pValue.Dispose();
2118                 return temp;
2119             }
2120         }
2121
2122         /// <summary>
2123         /// Gets or sets the scale factor applied to the view.<br />
2124         /// </summary>
2125         /// <remarks>
2126         /// <para>
2127         /// Animatable - This property can be animated using <c>Animation</c> class.
2128         /// <code>
2129         /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
2130         /// </code>
2131         /// </para>
2132         /// The property cascade chaining set is not recommended.
2133         /// </remarks>
2134         /// <example>
2135         /// This way is recommended for setting the property
2136         /// <code>
2137         /// var view = new View();
2138         /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
2139         /// </code>
2140         /// This way to set the property is prohibited
2141         /// <code>
2142         /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
2143         /// </code>
2144         /// </example>
2145         /// <since_tizen> 3 </since_tizen>
2146         public Vector3 Scale
2147         {
2148             get
2149             {
2150                 if (NUIApplication.IsUsingXaml)
2151                 {
2152                     return (Vector3)GetValue(ScaleProperty);
2153                 }
2154                 else
2155                 {
2156                     return (Vector3)GetInternalScaleProperty(this);
2157                 }
2158
2159
2160             }
2161             set
2162             {
2163                 if (NUIApplication.IsUsingXaml)
2164                 {
2165                     SetValue(ScaleProperty, value);
2166                 }
2167                 else
2168                 {
2169                     SetInternalScaleProperty(this, null, value);
2170                 }
2171
2172
2173                 NotifyPropertyChanged();
2174             }
2175         }
2176
2177         /// <summary>
2178         /// Gets or sets the scale X factor applied to the view.
2179         /// </summary>
2180         /// <remarks>
2181         /// <para>
2182         /// Animatable - This property can be animated using <c>Animation</c> class.
2183         /// <code>
2184         /// animation.AnimateTo(view, "ScaleX", 1.5f);
2185         /// </code>
2186         /// </para>
2187         /// </remarks>
2188         /// <since_tizen> 3 </since_tizen>
2189         public float ScaleX
2190         {
2191             get
2192             {
2193                 if (NUIApplication.IsUsingXaml)
2194                 {
2195                     return (float)GetValue(ScaleXProperty);
2196                 }
2197                 else
2198                 {
2199                     return (float)GetInternalScaleXProperty(this);
2200                 }
2201
2202
2203             }
2204             set
2205             {
2206                 if (NUIApplication.IsUsingXaml)
2207                 {
2208                     SetValue(ScaleXProperty, value);
2209                 }
2210                 else
2211                 {
2212                     SetInternalScaleXProperty(this, null, value);
2213                 }
2214
2215
2216                 NotifyPropertyChanged();
2217             }
2218         }
2219
2220         /// <summary>
2221         /// Gets or sets the scale Y factor applied to the view.
2222         /// </summary>
2223         /// <remarks>
2224         /// <para>
2225         /// Animatable - This property can be animated using <c>Animation</c> class.
2226         /// <code>
2227         /// animation.AnimateTo(view, "ScaleY", 1.5f);
2228         /// </code>
2229         /// </para>
2230         /// </remarks>
2231         /// <since_tizen> 3 </since_tizen>
2232         public float ScaleY
2233         {
2234             get
2235             {
2236                 if (NUIApplication.IsUsingXaml)
2237                 {
2238                     return (float)GetValue(ScaleYProperty);
2239                 }
2240                 else
2241                 {
2242                     return (float)GetInternalScaleYProperty(this);
2243                 }
2244
2245
2246             }
2247             set
2248             {
2249                 if (NUIApplication.IsUsingXaml)
2250                 {
2251                     SetValue(ScaleYProperty, value);
2252                 }
2253                 else
2254                 {
2255                     SetInternalScaleYProperty(this, null, value);
2256                 }
2257
2258
2259                 NotifyPropertyChanged();
2260             }
2261         }
2262
2263         /// <summary>
2264         /// Gets or sets the scale Z factor applied to the view.
2265         /// </summary>
2266         /// <remarks>
2267         /// <para>
2268         /// Animatable - This property can be animated using <c>Animation</c> class.
2269         /// <code>
2270         /// animation.AnimateTo(view, "ScaleZ", 1.5f);
2271         /// </code>
2272         /// </para>
2273         /// </remarks>
2274         /// <since_tizen> 3 </since_tizen>
2275         public float ScaleZ
2276         {
2277             get
2278             {
2279                 if (NUIApplication.IsUsingXaml)
2280                 {
2281                     return (float)GetValue(ScaleZProperty);
2282                 }
2283                 else
2284                 {
2285                     return (float)GetInternalScaleZProperty(this);
2286                 }
2287
2288
2289             }
2290             set
2291             {
2292                 if (NUIApplication.IsUsingXaml)
2293                 {
2294                     SetValue(ScaleZProperty, value);
2295                 }
2296                 else
2297                 {
2298                     SetInternalScaleZProperty(this, null, value);
2299                 }
2300
2301
2302                 NotifyPropertyChanged();
2303             }
2304         }
2305
2306         /// <summary>
2307         /// Gets the world scale of the view.
2308         /// </summary>
2309         /// <since_tizen> 3 </since_tizen>
2310         public Vector3 WorldScale
2311         {
2312             get
2313             {
2314                 return GetCurrentWorldScale();
2315             }
2316         }
2317
2318         /// <summary>
2319         /// Retrieves the visibility flag of the view.
2320         /// </summary>
2321         /// <remarks>
2322         /// <para>
2323         /// If the view is not visible, then the view and its children will not be rendered.
2324         /// 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.
2325         /// </para>
2326         /// <para>
2327         /// Animatable - This property can be animated using <c>Animation</c> class.
2328         /// <code>
2329         /// animation.AnimateTo(view, "Visibility", false);
2330         /// </code>
2331         /// </para>
2332         /// </remarks>
2333         /// <since_tizen> 3 </since_tizen>
2334         public bool Visibility
2335         {
2336             get
2337             {
2338                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
2339             }
2340         }
2341
2342         /// <summary>
2343         /// Gets the view's world color.
2344         /// </summary>
2345         /// <since_tizen> 3 </since_tizen>
2346         public Vector4 WorldColor
2347         {
2348             get
2349             {
2350                 return GetCurrentWorldColor();
2351             }
2352         }
2353
2354         /// <summary>
2355         /// Gets or sets the view's name.
2356         /// </summary>
2357         /// <since_tizen> 3 </since_tizen>
2358         public string Name
2359         {
2360             get
2361             {
2362                 if (NUIApplication.IsUsingXaml)
2363                 {
2364                     return (string)GetValue(NameProperty);
2365                 }
2366                 else
2367                 {
2368                     return (string)GetInternalNameProperty(this);
2369                 }
2370
2371
2372             }
2373             set
2374             {
2375                 if (NUIApplication.IsUsingXaml)
2376                 {
2377                     SetValue(NameProperty, value);
2378                 }
2379                 else
2380                 {
2381                     SetInternalNameProperty(this, null, value);
2382                 }
2383
2384
2385                 NotifyPropertyChanged();
2386             }
2387         }
2388
2389         /// <summary>
2390         /// Get the number of children held by the view.
2391         /// </summary>
2392         /// <since_tizen> 3 </since_tizen>
2393         public new uint ChildCount
2394         {
2395             get
2396             {
2397                 return Convert.ToUInt32(Children.Count);
2398             }
2399         }
2400
2401         /// <summary>
2402         /// Gets the view's ID.
2403         /// Read-only
2404         /// </summary>
2405         /// <since_tizen> 3 </since_tizen>
2406         public uint ID
2407         {
2408             get
2409             {
2410                 return GetId();
2411             }
2412         }
2413
2414         /// <summary>
2415         /// Gets or sets the status of whether the view should emit touch or hover signals.
2416         /// If a View is made insensitive, then the View and its children are not hittable.
2417         /// </summary>
2418         /// <since_tizen> 3 </since_tizen>
2419         public bool Sensitive
2420         {
2421             get
2422             {
2423                 return (bool)GetValue(SensitiveProperty);
2424             }
2425             set
2426             {
2427                 SetValue(SensitiveProperty, value);
2428                 NotifyPropertyChanged();
2429             }
2430         }
2431
2432         /// <summary>
2433         /// Gets or sets the status of whether the view should be enabled user interactions.
2434         /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
2435         /// </summary>
2436         /// <since_tizen> tizen_next </since_tizen>
2437         [EditorBrowsable(EditorBrowsableState.Never)]
2438         public bool IsEnabled
2439         {
2440             get
2441             {
2442                 return (bool)GetValue(IsEnabledProperty);
2443             }
2444             set
2445             {
2446                 SetValue(IsEnabledProperty, value);
2447                 NotifyPropertyChanged();
2448             }
2449         }
2450
2451         /// <summary>
2452         /// 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.
2453         /// </summary>
2454         /// <since_tizen> 3 </since_tizen>
2455         public bool LeaveRequired
2456         {
2457             get
2458             {
2459                 return (bool)GetValue(LeaveRequiredProperty);
2460             }
2461             set
2462             {
2463                 SetValue(LeaveRequiredProperty, value);
2464                 NotifyPropertyChanged();
2465             }
2466         }
2467
2468         /// <summary>
2469         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2470         /// </summary>
2471         /// <since_tizen> 3 </since_tizen>
2472         public bool InheritOrientation
2473         {
2474             get
2475             {
2476                 return (bool)GetValue(InheritOrientationProperty);
2477             }
2478             set
2479             {
2480                 SetValue(InheritOrientationProperty, value);
2481                 NotifyPropertyChanged();
2482             }
2483         }
2484
2485         /// <summary>
2486         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2487         /// </summary>
2488         /// <since_tizen> 3 </since_tizen>
2489         public bool InheritScale
2490         {
2491             get
2492             {
2493                 return (bool)GetValue(InheritScaleProperty);
2494             }
2495             set
2496             {
2497                 SetValue(InheritScaleProperty, value);
2498                 NotifyPropertyChanged();
2499             }
2500         }
2501
2502         /// <summary>
2503         /// Gets or sets the status of how the view and its children should be drawn.<br />
2504         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2505         /// 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 />
2506         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2507         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2508         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2509         /// </summary>
2510         /// <since_tizen> 3 </since_tizen>
2511         public DrawModeType DrawMode
2512         {
2513             get
2514             {
2515                 return (DrawModeType)GetValue(DrawModeProperty);
2516             }
2517             set
2518             {
2519                 SetValue(DrawModeProperty, value);
2520                 NotifyPropertyChanged();
2521             }
2522         }
2523
2524         /// <summary>
2525         /// Gets or sets the relative to parent size factor of the view.<br />
2526         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2527         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2528         /// </summary>
2529         /// <remarks>
2530         /// The property cascade chaining set is not recommended.
2531         /// </remarks>
2532         /// <example>
2533         /// This way is recommended for setting the property
2534         /// <code>
2535         /// var text = new TextField();
2536         /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
2537         /// </code>
2538         /// This way to set the property is prohibited
2539         /// <code>
2540         /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
2541         /// </code>
2542         /// </example>
2543         /// <since_tizen> 3 </since_tizen>
2544         public Vector3 SizeModeFactor
2545         {
2546             get
2547             {
2548                 if (NUIApplication.IsUsingXaml)
2549                 {
2550                     return (Vector3)GetValue(SizeModeFactorProperty);
2551                 }
2552                 else
2553                 {
2554                     return (Vector3)GetInternalSizeModeFactorProperty(this);
2555                 }
2556
2557
2558             }
2559             set
2560             {
2561                 if (NUIApplication.IsUsingXaml)
2562                 {
2563                     SetValue(SizeModeFactorProperty, value);
2564                 }
2565                 else
2566                 {
2567                     SetInternalSizeModeFactorProperty(this, null, value);
2568                 }
2569
2570
2571                 NotifyPropertyChanged();
2572             }
2573         }
2574
2575         /// <summary>
2576         /// Gets or sets the width resize policy to be used.
2577         /// </summary>
2578         /// <since_tizen> 3 </since_tizen>
2579         public ResizePolicyType WidthResizePolicy
2580         {
2581             get
2582             {
2583                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2584             }
2585             set
2586             {
2587                 SetValue(WidthResizePolicyProperty, value);
2588                 NotifyPropertyChanged();
2589             }
2590         }
2591
2592         /// <summary>
2593         /// Gets or sets the height resize policy to be used.
2594         /// </summary>
2595         /// <since_tizen> 3 </since_tizen>
2596         public ResizePolicyType HeightResizePolicy
2597         {
2598             get
2599             {
2600                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2601             }
2602             set
2603             {
2604                 SetValue(HeightResizePolicyProperty, value);
2605                 NotifyPropertyChanged();
2606             }
2607         }
2608
2609         /// <summary>
2610         /// Gets or sets the policy to use when setting size with size negotiation.<br />
2611         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2612         /// </summary>
2613         /// <since_tizen> 3 </since_tizen>
2614         public SizeScalePolicyType SizeScalePolicy
2615         {
2616             get
2617             {
2618                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2619             }
2620             set
2621             {
2622                 SetValue(SizeScalePolicyProperty, value);
2623                 NotifyPropertyChanged();
2624             }
2625         }
2626
2627         /// <summary>
2628         ///  Gets or sets the status of whether the width size is dependent on the height size.
2629         /// </summary>
2630         /// <since_tizen> 3 </since_tizen>
2631         public bool WidthForHeight
2632         {
2633             get
2634             {
2635                 return (bool)GetValue(WidthForHeightProperty);
2636             }
2637             set
2638             {
2639                 SetValue(WidthForHeightProperty, value);
2640                 NotifyPropertyChanged();
2641             }
2642         }
2643
2644         /// <summary>
2645         /// Gets or sets the status of whether the height size is dependent on the width size.
2646         /// </summary>
2647         /// <since_tizen> 3 </since_tizen>
2648         public bool HeightForWidth
2649         {
2650             get
2651             {
2652                 return (bool)GetValue(HeightForWidthProperty);
2653             }
2654             set
2655             {
2656                 SetValue(HeightForWidthProperty, value);
2657                 NotifyPropertyChanged();
2658             }
2659         }
2660
2661         /// <summary>
2662         /// Gets or sets the padding for use in layout.
2663         /// </summary>
2664         /// <remarks>
2665         /// The property cascade chaining set is not recommended.
2666         /// </remarks>
2667         /// <example>
2668         /// This way is recommended for setting the property
2669         /// <code>
2670         /// var view = new View();
2671         /// view.Padding = new Extents(5, 5, 5, 5);
2672         /// </code>
2673         /// This way to set the property is prohibited
2674         /// <code>
2675         /// view.Padding.Start = 5; //This does not guarantee a proper operation
2676         /// </code>
2677         /// </example>
2678         /// <since_tizen> 5 </since_tizen>
2679         public Extents Padding
2680         {
2681             get
2682             {
2683                 if (NUIApplication.IsUsingXaml)
2684                 {
2685                     return (Extents)GetValue(PaddingProperty);
2686                 }
2687                 else
2688                 {
2689                     return (Extents)GetInternalPaddingProperty(this);
2690                 }
2691
2692
2693             }
2694             set
2695             {
2696                 if (NUIApplication.IsUsingXaml)
2697                 {
2698                     SetValue(PaddingProperty, value);
2699                 }
2700                 else
2701                 {
2702                     SetInternalPaddingProperty(this, null, value);
2703                 }
2704
2705
2706                 NotifyPropertyChanged();
2707             }
2708         }
2709
2710         /// <summary>
2711         /// Gets or sets the minimum size the view can be assigned in size negotiation.
2712         /// </summary>
2713         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2714         /// <remarks>
2715         /// The property cascade chaining set is not recommended.
2716         /// </remarks>
2717         /// <example>
2718         /// This way is recommended for setting the property
2719         /// <code>
2720         /// var view = new View();
2721         /// view.MinimumSize = new Size2D(100, 200);
2722         /// </code>
2723         /// This way to set the property is prohibited
2724         /// <code>
2725         /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2726         /// </code>
2727         /// </example>
2728         /// <since_tizen> 3 </since_tizen>
2729         public Size2D MinimumSize
2730         {
2731             get
2732             {
2733                 if (NUIApplication.IsUsingXaml)
2734                 {
2735                     return (Size2D)GetValue(MinimumSizeProperty);
2736                 }
2737                 else
2738                 {
2739                     return (Size2D)GetInternalMinimumSizeProperty(this);
2740                 }
2741
2742             }
2743             set
2744             {
2745                 if (value == null)
2746                 {
2747                     throw new ArgumentNullException(nameof(value));
2748                 }
2749                 if (layout != null)
2750                 {
2751                     // Note: it only works if minimum size is >= than natural size.
2752                     // To force the size it should be done through the width&height spec or Size2D.
2753                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2754                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2755                     layout.RequestLayout();
2756                 }
2757                 if (NUIApplication.IsUsingXaml)
2758                 {
2759                     SetValue(MinimumSizeProperty, value);
2760                 }
2761                 else
2762                 {
2763                     SetInternalMinimumSizeProperty(this, null, value);
2764                 }
2765
2766                 NotifyPropertyChanged();
2767             }
2768         }
2769
2770         /// <summary>
2771         /// Gets or sets the maximum size the view can be assigned in size negotiation.
2772         /// </summary>
2773         /// <example>
2774         /// This way is recommended for setting the property
2775         /// <code>
2776         /// var view = new View();
2777         /// view.MaximumSize = new Size2D(100, 200);
2778         /// </code>
2779         /// This way to set the property is prohibited
2780         /// <code>
2781         /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2782         /// </code>
2783         /// </example>
2784         /// <since_tizen> 3 </since_tizen>
2785         public Size2D MaximumSize
2786         {
2787             get
2788             {
2789                 if (NUIApplication.IsUsingXaml)
2790                 {
2791                     return (Size2D)GetValue(MaximumSizeProperty);
2792                 }
2793                 else
2794                 {
2795                     return (Size2D)GetInternalMaximumSizeProperty(this);
2796                 }
2797             }
2798             set
2799             {
2800                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2801                 // MATCH_PARENT spec + parent container size can be used to limit
2802                 if (layout != null)
2803                 {
2804                     layout.RequestLayout();
2805                 }
2806
2807                 if (NUIApplication.IsUsingXaml)
2808                 {
2809                     SetValue(MaximumSizeProperty, value);
2810                 }
2811                 else
2812                 {
2813                     SetInternalMaximumSizeProperty(this, null, value);
2814                 }
2815
2816                 NotifyPropertyChanged();
2817             }
2818         }
2819
2820         /// <summary>
2821         /// Gets or sets whether a child view inherits it's parent's position.<br />
2822         /// Default is to inherit.<br />
2823         /// 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 />
2824         /// </summary>
2825         /// <since_tizen> 3 </since_tizen>
2826         public bool InheritPosition
2827         {
2828             get
2829             {
2830                 return (bool)GetValue(InheritPositionProperty);
2831             }
2832             set
2833             {
2834                 SetValue(InheritPositionProperty, value);
2835                 NotifyPropertyChanged();
2836             }
2837         }
2838
2839         /// <summary>
2840         /// Gets or sets the clipping behavior (mode) of it's children.
2841         /// </summary>
2842         /// <since_tizen> 3 </since_tizen>
2843         public ClippingModeType ClippingMode
2844         {
2845             get
2846             {
2847                 return (ClippingModeType)GetValue(ClippingModeProperty);
2848             }
2849             set
2850             {
2851                 SetValue(ClippingModeProperty, value);
2852                 NotifyPropertyChanged();
2853             }
2854         }
2855
2856         /// <summary>
2857         /// Gets the number of renderers held by the view.
2858         /// </summary>
2859         /// <since_tizen> 3 </since_tizen>
2860         public uint RendererCount
2861         {
2862             get
2863             {
2864                 return GetRendererCount();
2865             }
2866         }
2867
2868         /// <summary>
2869         /// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
2870         /// </summary>
2871         /// <remarks>
2872         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2873         /// </remarks>
2874         /// <since_tizen> 3 </since_tizen>
2875         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
2876             "Like: " +
2877             "View view = new View(); " +
2878             "view.PivotPoint = PivotPoint.Center; " +
2879             "view.PositionUsesPivotPoint = true;")]
2880         [EditorBrowsable(EditorBrowsableState.Never)]
2881         public Position AnchorPoint
2882         {
2883             get
2884             {
2885                 if (NUIApplication.IsUsingXaml)
2886                 {
2887                     return (Position)GetValue(AnchorPointProperty);
2888                 }
2889                 else
2890                 {
2891                     return (Position)GetInternalAnchorPointProperty(this);
2892                 }
2893
2894
2895             }
2896             set
2897             {
2898                 if (NUIApplication.IsUsingXaml)
2899                 {
2900                     SetValue(AnchorPointProperty, value);
2901                 }
2902                 else
2903                 {
2904                     SetInternalAnchorPointProperty(this, null, value);
2905                 }
2906
2907             }
2908         }
2909
2910         private Position InternalAnchorPoint
2911         {
2912             get
2913             {
2914                 return GetCurrentAnchorPoint();
2915             }
2916             set
2917             {
2918                 SetAnchorPoint(value);
2919                 NotifyPropertyChanged();
2920             }
2921         }
2922
2923         /// <summary>
2924         /// Sets the size of a view for the width, the height and the depth.<br />
2925         /// Geometry can be scaled to fit within this area.<br />
2926         /// This does not interfere with the view's scale factor.<br />
2927         /// The views default depth is the minimum of width and height.<br />
2928         /// </summary>
2929         /// <remarks>
2930         /// <para>
2931         /// Animatable - This property can be animated using <c>Animation</c> class.
2932         /// <code>
2933         /// animation.AnimateTo(view, "Size", new Size(100, 100));
2934         /// </code>
2935         /// </para>
2936         /// The property cascade chaining set is not recommended.
2937         /// </remarks>
2938         /// <example>
2939         /// This way is recommended for setting the property
2940         /// <code>
2941         /// var view = new View();
2942         /// view.Size = new Size(100.5f, 200, 0);
2943         /// </code>
2944         /// This way to set the property is prohibited
2945         /// <code>
2946         /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2947         /// </code>
2948         /// </example>
2949         /// <since_tizen> 5 </since_tizen>
2950         public Size Size
2951         {
2952             get
2953             {
2954                 if (NUIApplication.IsUsingXaml)
2955                 {
2956                     return (Size)GetValue(SizeProperty);
2957                 }
2958                 else
2959                 {
2960                     return (Size)GetInternalSizeProperty(this);
2961                 }
2962             }
2963             set
2964             {
2965                 if (NUIApplication.IsUsingXaml)
2966                 {
2967                     SetValue(SizeProperty, value);
2968                 }
2969                 else
2970                 {
2971                     SetInternalSizeProperty(this, null, value);
2972                 }
2973                 NotifyPropertyChanged();
2974             }
2975         }
2976
2977         /// <summary>
2978         /// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
2979         /// </summary>
2980         /// <since_tizen> 3 </since_tizen>
2981         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
2982             "Like: " +
2983             "Container parent =  view.GetParent(); " +
2984             "View view = parent as View;")]
2985         [EditorBrowsable(EditorBrowsableState.Never)]
2986         public new View Parent
2987         {
2988             get
2989             {
2990                 View ret;
2991                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2992                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2993                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2994
2995                 if (basehandle is Layer layer)
2996                 {
2997                     ret = new View(Layer.getCPtr(layer).Handle, false);
2998                     NUILog.Error("This Parent property is deprecated, should do not be used");
2999                 }
3000                 else
3001                 {
3002                     ret = basehandle as View;
3003                 }
3004
3005                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
3006                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3007
3008                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
3009                 return ret;
3010             }
3011         }
3012
3013         /// <summary>
3014         /// Gets/Sets whether inherit parent's the layout Direction.
3015         /// </summary>
3016         /// <since_tizen> 4 </since_tizen>
3017         public bool InheritLayoutDirection
3018         {
3019             get
3020             {
3021                 return (bool)GetValue(InheritLayoutDirectionProperty);
3022             }
3023             set
3024             {
3025                 SetValue(InheritLayoutDirectionProperty, value);
3026                 NotifyPropertyChanged();
3027             }
3028         }
3029
3030         /// <summary>
3031         /// Gets/Sets the layout Direction.
3032         /// </summary>
3033         /// <since_tizen> 4 </since_tizen>
3034         public ViewLayoutDirectionType LayoutDirection
3035         {
3036             get
3037             {
3038                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3039             }
3040             set
3041             {
3042                 SetValue(LayoutDirectionProperty, value);
3043                 NotifyPropertyChanged();
3044                 layout?.RequestLayout();
3045             }
3046         }
3047
3048         /// <summary>
3049         /// Gets or sets the Margin for use in layout.
3050         /// </summary>
3051         /// <remarks>
3052         /// Margin property is supported by Layout algorithms and containers.
3053         /// Please Set Layout if you want to use Margin property.
3054         /// The property cascade chaining set is not recommended.
3055         /// </remarks>
3056         /// <example>
3057         /// This way is recommended for setting the property
3058         /// <code>
3059         /// var view = new View();
3060         /// view.Margin = new Extents(10, 5, 15, 20);
3061         /// </code>
3062         /// This way to set the property is prohibited
3063         /// <code>
3064         /// view.Margin.Top = 15; //This does not guarantee a proper operation
3065         /// </code>
3066         /// </example>
3067         /// <since_tizen> 4 </since_tizen>
3068         public Extents Margin
3069         {
3070             get
3071             {
3072                 if (NUIApplication.IsUsingXaml)
3073                 {
3074                     return (Extents)GetValue(MarginProperty);
3075                 }
3076                 else
3077                 {
3078                     return (Extents)GetInternalMarginProperty(this);
3079                 }
3080
3081             }
3082             set
3083             {
3084                 if (NUIApplication.IsUsingXaml)
3085                 {
3086                     SetValue(MarginProperty, value);
3087                 }
3088                 else
3089                 {
3090                     SetInternalMarginProperty(this, null, value);
3091                 }
3092
3093                 NotifyPropertyChanged();
3094             }
3095         }
3096
3097         ///<summary>
3098         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
3099         ///</summary>
3100         /// <example>
3101         /// <code>
3102         /// // matchParentView matches its size to its parent size.
3103         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
3104         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
3105         ///
3106         /// // wrapContentView wraps its children with their desired size.
3107         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
3108         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
3109         ///
3110         /// // exactSizeView shows itself with an exact size.
3111         /// exactSizeView.WidthSpecification = 100;
3112         /// exactSizeView.HeightSpecification = 100;
3113         /// </code>
3114         /// </example>
3115         /// <since_tizen> 6 </since_tizen>
3116         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
3117         public int WidthSpecification
3118         {
3119             get
3120             {
3121                 return (int)GetValue(WidthSpecificationProperty);
3122             }
3123             set
3124             {
3125                 SetValue(WidthSpecificationProperty, value);
3126                 NotifyPropertyChanged();
3127             }
3128         }
3129
3130         private int InternalWidthSpecification
3131         {
3132             get
3133             {
3134                 return widthPolicy;
3135             }
3136             set
3137             {
3138                 if (value == widthPolicy)
3139                     return;
3140
3141                 widthPolicy = value;
3142                 if (widthPolicy >= 0)
3143                 {
3144                     SizeWidth = widthPolicy;
3145                 }
3146                 layout?.RequestLayout();
3147             }
3148         }
3149
3150         ///<summary>
3151         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
3152         ///</summary>
3153         /// <example>
3154         /// <code>
3155         /// // matchParentView matches its size to its parent size.
3156         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
3157         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
3158         ///
3159         /// // wrapContentView wraps its children with their desired size.
3160         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
3161         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
3162         ///
3163         /// // exactSizeView shows itself with an exact size.
3164         /// exactSizeView.WidthSpecification = 100;
3165         /// exactSizeView.HeightSpecification = 100;
3166         /// </code>
3167         /// </example>
3168         /// <since_tizen> 6 </since_tizen>
3169         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
3170         public int HeightSpecification
3171         {
3172             get
3173             {
3174                 return (int)GetValue(HeightSpecificationProperty);
3175             }
3176             set
3177             {
3178                 SetValue(HeightSpecificationProperty, value);
3179                 NotifyPropertyChanged();
3180             }
3181         }
3182
3183         private int InternalHeightSpecification
3184         {
3185             get
3186             {
3187                 return heightPolicy;
3188             }
3189             set
3190             {
3191                 if (value == heightPolicy)
3192                     return;
3193
3194                 heightPolicy = value;
3195                 if (heightPolicy >= 0)
3196                 {
3197                     SizeHeight = heightPolicy;
3198                 }
3199                 layout?.RequestLayout();
3200             }
3201         }
3202
3203         ///<summary>
3204         /// Gets the List of transitions for this View.
3205         ///</summary>
3206         /// <since_tizen> 6 </since_tizen>
3207         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
3208         {
3209             get
3210             {
3211                 if (layoutTransitions == null)
3212                 {
3213                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
3214                 }
3215                 return layoutTransitions;
3216             }
3217         }
3218
3219         ///<summary>
3220         /// Sets a layout transitions for this View.
3221         ///</summary>
3222         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
3223         /// <remarks>
3224         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
3225         /// </remarks>
3226         /// <since_tizen> 6 </since_tizen>
3227         public LayoutTransition LayoutTransition
3228         {
3229             get
3230             {
3231                 return GetValue(LayoutTransitionProperty) as LayoutTransition;
3232             }
3233             set
3234             {
3235                 SetValue(LayoutTransitionProperty, value);
3236                 NotifyPropertyChanged();
3237             }
3238         }
3239
3240         private LayoutTransition InternalLayoutTransition
3241         {
3242             get
3243             {
3244                 return layoutTransition;
3245             }
3246             set
3247             {
3248                 if (value == null)
3249                 {
3250                     throw new global::System.ArgumentNullException(nameof(value));
3251                 }
3252                 if (layoutTransitions == null)
3253                 {
3254                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
3255                 }
3256
3257                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
3258
3259                 AttachTransitionsToChildren(value);
3260
3261                 layoutTransition = value;
3262             }
3263         }
3264
3265         /// <summary>
3266         /// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
3267         /// </summary>
3268         /// <remarks>
3269         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
3270         /// </remarks>
3271         /// <since_tizen> 4 </since_tizen>
3272         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
3273         [EditorBrowsable(EditorBrowsableState.Never)]
3274         public Extents PaddingEX
3275         {
3276             get
3277             {
3278                 return GetValue(PaddingEXProperty) as Extents;
3279             }
3280             set
3281             {
3282                 SetValue(PaddingEXProperty, value);
3283             }
3284         }
3285
3286         private Extents InternalPaddingEX
3287         {
3288             get
3289             {
3290                 Extents temp = new Extents(0, 0, 0, 0);
3291                 var pValue = GetProperty(View.Property.PADDING);
3292                 pValue.Get(temp);
3293                 pValue.Dispose();
3294                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
3295                 temp.Dispose();
3296                 return ret;
3297             }
3298             set
3299             {
3300                 var temp = new Tizen.NUI.PropertyValue(value);
3301                 SetProperty(View.Property.PADDING, temp);
3302                 temp.Dispose();
3303                 NotifyPropertyChanged();
3304                 layout?.RequestLayout();
3305             }
3306         }
3307
3308         /// <summary>
3309         /// The Color of View. This is an RGBA value.
3310         /// Each RGBA components match as <see cref="ColorRed"/>, <see cref="ColorGreen"/>, <see cref="ColorBlue"/>, and <see cref="Opacity"/>.
3311         /// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
3312         /// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
3313         /// Inherient of color value depend on <see cref="ColorMode"/>.
3314         /// </summary>
3315         /// <remarks>
3316         /// <para>
3317         /// Animatable - This property can be animated using <c>Animation</c> class.
3318         /// </para>
3319         /// The property cascade chaining set is not recommended.
3320         /// </remarks>
3321         /// <example>
3322         /// This way is recommended for setting the property
3323         /// <code>
3324         /// var view = new View();
3325         /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
3326         /// </code>
3327         /// This way to set the property is prohibited
3328         /// <code>
3329         /// view.Color.A = 0.5f; //This does not guarantee a proper operation
3330         /// </code>
3331         /// </example>
3332         [EditorBrowsable(EditorBrowsableState.Never)]
3333         public Color Color
3334         {
3335             get
3336             {
3337                 if (NUIApplication.IsUsingXaml)
3338                 {
3339                     return (Color)GetValue(ColorProperty);
3340                 }
3341                 else
3342                 {
3343                     return (Color)GetInternalColorProperty(this);
3344                 }
3345
3346
3347             }
3348             set
3349             {
3350                 if (NUIApplication.IsUsingXaml)
3351                 {
3352                     SetValue(ColorProperty, value);
3353                 }
3354                 else
3355                 {
3356                     SetInternalColorProperty(this, null, value);
3357                 }
3358
3359
3360                 NotifyPropertyChanged();
3361             }
3362         }
3363
3364         /// <summary>
3365         /// The Red component of View.Color.
3366         /// </summary>
3367         /// <remarks>
3368         /// <para>
3369         /// Animatable - This property can be animated using <c>Animation</c> class.
3370         /// </para>
3371         /// </remarks>
3372         [EditorBrowsable(EditorBrowsableState.Never)]
3373         public float ColorRed
3374         {
3375             get
3376             {
3377                 if (NUIApplication.IsUsingXaml)
3378                 {
3379                     return (float)GetValue(ColorRedProperty);
3380                 }
3381                 else
3382                 {
3383                     return (float)GetInternalColorRedProperty(this);
3384                 }
3385
3386
3387             }
3388             set
3389             {
3390                 if (NUIApplication.IsUsingXaml)
3391                 {
3392                     SetValue(ColorRedProperty, value);
3393                 }
3394                 else
3395                 {
3396                     SetInternalColorRedProperty(this, null, value);
3397                 }
3398
3399
3400                 NotifyPropertyChanged();
3401             }
3402         }
3403
3404         /// <summary>
3405         /// The Green component of View.Color.
3406         /// </summary>
3407         /// <remarks>
3408         /// <para>
3409         /// Animatable - This property can be animated using <c>Animation</c> class.
3410         /// </para>
3411         /// </remarks>
3412         [EditorBrowsable(EditorBrowsableState.Never)]
3413         public float ColorGreen
3414         {
3415             get
3416             {
3417                 if (NUIApplication.IsUsingXaml)
3418                 {
3419                     return (float)GetValue(ColorGreenProperty);
3420                 }
3421                 else
3422                 {
3423                     return (float)GetInternalColorGreenProperty(this);
3424                 }
3425
3426
3427             }
3428             set
3429             {
3430                 if (NUIApplication.IsUsingXaml)
3431                 {
3432                     SetValue(ColorGreenProperty, value);
3433                 }
3434                 else
3435                 {
3436                     SetInternalColorGreenProperty(this, null, value);
3437                 }
3438
3439
3440                 NotifyPropertyChanged();
3441             }
3442         }
3443
3444         /// <summary>
3445         /// The Blue component of View.Color.
3446         /// </summary>
3447         /// <remarks>
3448         /// <para>
3449         /// Animatable - This property can be animated using <c>Animation</c> class.
3450         /// </para>
3451         /// </remarks>
3452         [EditorBrowsable(EditorBrowsableState.Never)]
3453         public float ColorBlue
3454         {
3455             get
3456             {
3457                 if (NUIApplication.IsUsingXaml)
3458                 {
3459                     return (float)GetValue(ColorBlueProperty);
3460                 }
3461                 else
3462                 {
3463                     return (float)GetInternalColorBlueProperty(this);
3464                 }
3465
3466
3467             }
3468             set
3469             {
3470                 if (NUIApplication.IsUsingXaml)
3471                 {
3472                     SetValue(ColorBlueProperty, value);
3473                 }
3474                 else
3475                 {
3476                     SetInternalColorBlueProperty(this, null, value);
3477                 }
3478
3479
3480                 NotifyPropertyChanged();
3481             }
3482         }
3483
3484         /// <summary>
3485         /// Set the layout on this View. Replaces any existing Layout.
3486         /// </summary>
3487         /// <remarks>
3488         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
3489         /// </remarks>
3490         /// <since_tizen> 6 </since_tizen>
3491         public LayoutItem Layout
3492         {
3493             get
3494             {
3495                 return GetValue(LayoutProperty) as LayoutItem;
3496             }
3497             set
3498             {
3499                 SetValue(LayoutProperty, value);
3500             }
3501         }
3502
3503         private LayoutItem InternalLayout
3504         {
3505             get
3506             {
3507                 return layout;
3508             }
3509             set
3510             {
3511                 // Do nothing if layout provided is already set on this View.
3512                 if (value == layout)
3513                 {
3514                     return;
3515                 }
3516
3517                 LayoutingDisabled = false;
3518                 layoutSet = true;
3519
3520                 // If new layout being set already has a owner then that owner receives a replacement default layout.
3521                 // First check if the layout to be set already has a owner.
3522                 if (value?.Owner != null)
3523                 {
3524                     // Previous owner of the layout gets a default layout as a replacement.
3525                     value.Owner.Layout = new AbsoluteLayout()
3526                     {
3527                         // Copy Margin and Padding to replacement LayoutGroup.
3528                         Margin = value.Margin,
3529                         Padding = value.Padding,
3530                     };
3531                 }
3532
3533                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3534                 // View if no replacement. Previously margin and padding values would have been moved from
3535                 // the View to the layout.
3536                 if (layout != null) // Existing layout
3537                 {
3538                     if (value != null)
3539                     {
3540                         // Existing layout being replaced so copy over margin and padding values.
3541                         value.Margin = layout.Margin;
3542                         value.Padding = layout.Padding;
3543                         value.SetPositionByLayout = !excludeLayouting;
3544                     }
3545                     else
3546                     {
3547                         // Layout not being replaced so restore margin and padding to View.
3548                         SetValue(MarginProperty, layout.Margin);
3549                         SetValue(PaddingProperty, layout.Padding);
3550                         NotifyPropertyChanged();
3551                     }
3552                 }
3553                 else
3554                 {
3555                     // First Layout to be added to the View hence copy
3556
3557                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3558                     if (value != null)
3559                     {
3560                         Extents margin = Margin;
3561                         Extents padding = Padding;
3562                         bool setMargin = false;
3563                         bool setPadding = false;
3564
3565                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
3566                         {
3567                             // If View already has a margin set then store it in Layout instead.
3568                             value.Margin = margin;
3569                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
3570                             setMargin = true;
3571                         }
3572
3573                         // The calculation of the native size of the text component requires padding.
3574                         // Don't overwrite the zero padding.
3575                         bool isTextLayout = (value is Tizen.NUI.BaseComponents.TextLabel.TextLabelLayout) ||
3576                                             (value is Tizen.NUI.BaseComponents.TextField.TextFieldLayout) ||
3577                                             (value is Tizen.NUI.BaseComponents.TextEditor.TextEditorLayout);
3578
3579                         if (!isTextLayout && (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0))
3580                         {
3581                             // If View already has a padding set then store it in Layout instead.
3582                             value.Padding = padding;
3583                             SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
3584                             setPadding = true;
3585                         }
3586
3587                         if (setMargin || setPadding)
3588                         {
3589                             NotifyPropertyChanged();
3590                         }
3591
3592                         value.SetPositionByLayout = !excludeLayouting;
3593                     }
3594                 }
3595
3596                 // Remove existing layout from it's parent layout group.
3597                 layout?.Unparent();
3598
3599                 // Set layout to this view
3600                 SetLayout(value);
3601             }
3602         }
3603
3604         /// <summary>
3605         /// The weight of the View, used to share available space in a layout with siblings.
3606         /// </summary>
3607         /// <since_tizen> 6 </since_tizen>
3608         public float Weight
3609         {
3610             get
3611             {
3612                 return weight;
3613             }
3614             set
3615             {
3616                 weight = value;
3617                 layout?.RequestLayout();
3618             }
3619         }
3620
3621         /// <summary>
3622         ///  Whether to load the BackgroundImage synchronously.
3623         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3624         ///  Note: For Normal Quad images only.
3625         /// </summary>
3626         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3627         [EditorBrowsable(EditorBrowsableState.Never)]
3628         public bool BackgroundImageSynchronosLoading
3629         {
3630             get
3631             {
3632                 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
3633             }
3634             set
3635             {
3636                 SetValue(BackgroundImageSynchronosLoadingProperty, value);
3637                 NotifyPropertyChanged();
3638             }
3639         }
3640
3641         private bool InternalBackgroundImageSynchronosLoading
3642         {
3643             get
3644             {
3645                 return BackgroundImageSynchronousLoading;
3646             }
3647             set
3648             {
3649                 BackgroundImageSynchronousLoading = value;
3650             }
3651         }
3652
3653         /// <summary>
3654         ///  Whether to load the BackgroundImage synchronously.
3655         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
3656         ///  Note: For Normal Quad images only.
3657         /// </summary>
3658         /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3659         [EditorBrowsable(EditorBrowsableState.Never)]
3660         public bool BackgroundImageSynchronousLoading
3661         {
3662             get
3663             {
3664                 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
3665             }
3666             set
3667             {
3668                 SetValue(BackgroundImageSynchronousLoadingProperty, value);
3669                 NotifyPropertyChanged();
3670             }
3671         }
3672
3673         private bool InternalBackgroundImageSynchronousLoading
3674         {
3675             get
3676             {
3677                 return backgroundImageSynchronousLoading;
3678             }
3679             set
3680             {
3681                 backgroundImageSynchronousLoading = value;
3682
3683                 if (!string.IsNullOrEmpty(BackgroundImage))
3684                 {
3685                     PropertyMap bgMap = this.Background;
3686                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
3687                     bgMap[ImageVisualProperty.SynchronousLoading] = temp;
3688                     temp.Dispose();
3689                     Background = bgMap;
3690                 }
3691             }
3692         }
3693
3694         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3695         [EditorBrowsable(EditorBrowsableState.Never)]
3696         public Vector4 UpdateAreaHint
3697         {
3698             get
3699             {
3700                 return (Vector4)GetValue(UpdateAreaHintProperty);
3701             }
3702             set
3703             {
3704                 SetValue(UpdateAreaHintProperty, value);
3705                 NotifyPropertyChanged();
3706             }
3707         }
3708
3709         /// <summary>
3710         /// Enable/Disable ControlState propagation for children.
3711         /// It is false by default.
3712         /// If the View needs to share ControlState with descendants, please set it true.
3713         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
3714         /// </summary>
3715         [EditorBrowsable(EditorBrowsableState.Never)]
3716         public bool EnableControlStatePropagation
3717         {
3718             get
3719             {
3720                 return (bool)GetValue(EnableControlStatePropagationProperty);
3721             }
3722             set
3723             {
3724                 SetValue(EnableControlStatePropagationProperty, value);
3725                 NotifyPropertyChanged();
3726             }
3727         }
3728
3729         private bool InternalEnableControlStatePropagation
3730         {
3731             get => themeData?.ControlStatePropagation ?? false;
3732             set
3733             {
3734                 if (InternalEnableControlStatePropagation == value) return;
3735
3736                 if (themeData == null) themeData = new ThemeData();
3737
3738                 themeData.ControlStatePropagation = value;
3739
3740                 foreach (View child in Children)
3741                 {
3742                     child.EnableControlStatePropagation = value;
3743                 }
3744             }
3745         }
3746
3747         /// <summary>
3748         /// The ControlStates can propagate from the parent.
3749         /// Listed ControlStates will be accepted propagation of the parent ControlState changes
3750         /// if parent view EnableControlState is true.
3751         /// <see cref="EnableControlState"/>.
3752         /// Default is ControlState.All, so every ControlStates will be propagated from the parent.
3753         /// </summary>
3754         [EditorBrowsable(EditorBrowsableState.Never)]
3755         public ControlState PropagatableControlStates
3756         {
3757             get
3758             {
3759                 return (ControlState)GetValue(PropagatableControlStatesProperty);
3760             }
3761             set
3762             {
3763                 SetValue(PropagatableControlStatesProperty, value);
3764                 NotifyPropertyChanged();
3765             }
3766         }
3767
3768         private ControlState InternalPropagatableControlStates
3769         {
3770             get => propagatableControlStates;
3771             set => propagatableControlStates = value;
3772         }
3773
3774         /// <summary>
3775         /// By default, it is false in View, true in Control.
3776         /// Note that if the value is true, the View will be a touch receptor.
3777         /// </summary>
3778         [EditorBrowsable(EditorBrowsableState.Never)]
3779         public bool EnableControlState
3780         {
3781             get
3782             {
3783                 return (bool)GetValue(EnableControlStateProperty);
3784             }
3785             set
3786             {
3787                 SetValue(EnableControlStateProperty, value);
3788             }
3789         }
3790
3791         /// <summary>
3792         /// Whether the actor grab all touches even if touch leaves its boundary.
3793         /// </summary>
3794         /// <returns>true, if it grab all touch after start</returns>
3795         [EditorBrowsable(EditorBrowsableState.Never)]
3796         public bool GrabTouchAfterLeave
3797         {
3798             get
3799             {
3800                 return (bool)GetValue(GrabTouchAfterLeaveProperty);
3801             }
3802             set
3803             {
3804                 SetValue(GrabTouchAfterLeaveProperty, value);
3805             }
3806         }
3807
3808         private bool InternalGrabTouchAfterLeave
3809         {
3810             get
3811             {
3812                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
3813             }
3814             set
3815             {
3816                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
3817
3818                 // Use custom HitTest callback only if GrabTouchAfterLeave is true.
3819                 if (value)
3820                 {
3821                     RegisterHitTestCallback();
3822                 }
3823                 else
3824                 {
3825                     UnregisterHitTestCallback();
3826                 }
3827
3828                 NotifyPropertyChanged();
3829             }
3830         }
3831
3832         /// <summary>
3833         /// Whether the view will only receive own touch.
3834         /// </summary>
3835         /// <returns>true, if it only receives touches that started from itself.</returns>
3836         [EditorBrowsable(EditorBrowsableState.Never)]
3837         public bool AllowOnlyOwnTouch
3838         {
3839             get
3840             {
3841                 return (bool)GetValue(AllowOnlyOwnTouchProperty);
3842             }
3843             set
3844             {
3845                 SetValue(AllowOnlyOwnTouchProperty, value);
3846             }
3847         }
3848
3849         private bool InternalAllowOnlyOwnTouch
3850         {
3851             get
3852             {
3853                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
3854             }
3855             set
3856             {
3857                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
3858                 NotifyPropertyChanged();
3859             }
3860         }
3861
3862         /// <summary>
3863         /// Determines which blend equation will be used to render renderers of this actor.
3864         /// </summary>
3865         /// <returns>blend equation enum currently assigned</returns>
3866         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
3867         [EditorBrowsable(EditorBrowsableState.Never)]
3868         public BlendEquationType BlendEquation
3869         {
3870             get
3871             {
3872                 return (BlendEquationType)GetValue(BlendEquationProperty);
3873             }
3874             set
3875             {
3876                 SetValue(BlendEquationProperty, value);
3877             }
3878         }
3879
3880         private BlendEquationType InternalBlendEquation
3881         {
3882             get
3883             {
3884                 return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
3885             }
3886             set
3887             {
3888                 Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
3889                 NotifyPropertyChanged();
3890             }
3891         }
3892
3893         /// <summary>
3894         /// If the value is true, the View will change its style as the theme changes.
3895         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3896         /// </summary>
3897         /// <since_tizen> 9 </since_tizen>
3898         public bool ThemeChangeSensitive
3899         {
3900             get => (bool)GetValue(ThemeChangeSensitiveProperty);
3901             set => SetValue(ThemeChangeSensitiveProperty, value);
3902         }
3903
3904         /// <summary>
3905         /// Create Style, it is abstract function and must be override.
3906         /// </summary>
3907         [EditorBrowsable(EditorBrowsableState.Never)]
3908         protected virtual ViewStyle CreateViewStyle()
3909         {
3910             return new ViewStyle();
3911         }
3912
3913         /// <summary>
3914         /// Called after the View's ControlStates changed.
3915         /// </summary>
3916         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3917         [EditorBrowsable(EditorBrowsableState.Never)]
3918         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3919         {
3920         }
3921
3922         /// <summary>
3923         /// </summary>
3924         [EditorBrowsable(EditorBrowsableState.Never)]
3925         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3926         {
3927             isThemeChanged = true;
3928             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3929             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3930             isThemeChanged = false;
3931         }
3932
3933         /// <summary>
3934         /// Apply style instance to the view.
3935         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3936         /// </summary>
3937         /// <since_tizen> 9 </since_tizen>
3938         public virtual void ApplyStyle(ViewStyle viewStyle)
3939         {
3940             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3941
3942             if (themeData == null) themeData = new ThemeData();
3943
3944             themeData.viewStyle = viewStyle;
3945
3946             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3947             {
3948                 // Nothing to apply
3949                 return;
3950             }
3951
3952             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3953
3954             if (bindablePropertyOfView == null)
3955             {
3956                 return;
3957             }
3958
3959             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3960             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3961
3962             foreach (var sourceProperty in dirtyStyleProperties)
3963             {
3964                 var sourceValue = viewStyle.GetValue(sourceProperty);
3965
3966                 if (sourceValue == null)
3967                 {
3968                     continue;
3969                 }
3970
3971                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3972
3973                 // Do not set value again when theme is changed and the value has been set already.
3974                 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3975                 {
3976                     continue;
3977                 }
3978
3979                 if (destinationProperty != null)
3980                 {
3981                     InternalSetValue(destinationProperty, sourceValue);
3982                 }
3983             }
3984         }
3985
3986         /// <summary>
3987         /// Get whether the View is culled or not.
3988         /// True means that the View is out of the view frustum.
3989         /// </summary>
3990         /// <remarks>
3991         /// Hidden-API (Inhouse-API).
3992         /// </remarks>
3993         [EditorBrowsable(EditorBrowsableState.Never)]
3994         public bool Culled
3995         {
3996             get
3997             {
3998                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
3999             }
4000         }
4001
4002         /// <summary>
4003         /// Set or Get TransitionOptions for the page transition.
4004         /// This property is used to define how this view will be transitioned during Page switching.
4005         /// </summary>
4006         /// <since_tizen> 9 </since_tizen>
4007         public TransitionOptions TransitionOptions
4008         {
4009             get
4010             {
4011                 return GetValue(TransitionOptionsProperty) as TransitionOptions;
4012             }
4013             set
4014             {
4015                 SetValue(TransitionOptionsProperty, value);
4016                 NotifyPropertyChanged();
4017             }
4018         }
4019
4020         private TransitionOptions InternalTransitionOptions
4021         {
4022             set
4023             {
4024                 transitionOptions = value;
4025             }
4026             get
4027             {
4028                 return transitionOptions;
4029             }
4030         }
4031
4032         /// <summary>
4033         /// Called when the view is hit through TouchEvent or GestureEvent.
4034         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
4035         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
4036         /// User can override whether hit or not in HitTest.
4037         /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
4038         /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
4039         /// </summary>
4040         // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
4041         [EditorBrowsable(EditorBrowsableState.Never)]
4042         protected virtual bool HitTest(Touch touch)
4043         {
4044             return true;
4045         }
4046
4047         /// <summary>
4048         /// Retrieve the View's current Color.
4049         /// </summary>
4050         /// <remarks>
4051         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
4052         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
4053         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
4054         /// and users can get the current actual values through them.
4055         /// </remarks>
4056         [EditorBrowsable(EditorBrowsableState.Never)]
4057         public Color CurrentColor => GetCurrentColor();
4058
4059         /// <summary>
4060         /// Retrieve the current scale factor applied to the View.
4061         /// </summary>
4062         /// <remarks>
4063         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
4064         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
4065         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
4066         /// and users can get the current actual values through them.
4067         /// </remarks>
4068         [EditorBrowsable(EditorBrowsableState.Never)]
4069         public Vector3 CurrentScale => GetCurrentScale();
4070
4071         /// <summary>
4072         /// Gets the number of currently alived View object.
4073         /// </summary>
4074         [EditorBrowsable(EditorBrowsableState.Never)]
4075         public static int AliveCount => aliveCount;
4076
4077         /// <summary>
4078         /// Voice interaction name for voice touch.
4079         /// </summary>
4080         [EditorBrowsable(EditorBrowsableState.Never)]
4081         public string VoiceInteractionName
4082         {
4083             set
4084             {
4085                 AutomationId = value;
4086             }
4087             get
4088             {
4089                 return AutomationId;
4090             }
4091         }
4092     }
4093 }