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