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