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