[NUI] remove input method dependency from View.ControlState (#1585)
[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                     // Note: it only works if minimum size is >= than natural size.
1718                     // To force the size it should be done through the width&height spec or Size2D.
1719                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
1720                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
1721                     _layout.RequestLayout();
1722                 }
1723                 SetValue(MaximumSizeProperty, value);
1724                 NotifyPropertyChanged();
1725             }
1726         }
1727
1728         /// <summary>
1729         /// Gets or sets whether a child view inherits it's parent's position.<br />
1730         /// Default is to inherit.<br />
1731         /// 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 />
1732         /// </summary>
1733         /// <since_tizen> 3 </since_tizen>
1734         public bool InheritPosition
1735         {
1736             get
1737             {
1738                 return (bool)GetValue(InheritPositionProperty);
1739             }
1740             set
1741             {
1742                 SetValue(InheritPositionProperty, value);
1743                 NotifyPropertyChanged();
1744             }
1745         }
1746
1747         /// <summary>
1748         /// Gets or sets the clipping behavior (mode) of it's children.
1749         /// </summary>
1750         /// <since_tizen> 3 </since_tizen>
1751         public ClippingModeType ClippingMode
1752         {
1753             get
1754             {
1755                 return (ClippingModeType)GetValue(ClippingModeProperty);
1756             }
1757             set
1758             {
1759                 SetValue(ClippingModeProperty, value);
1760                 NotifyPropertyChanged();
1761             }
1762         }
1763
1764         /// <summary>
1765         /// Gets the number of renderers held by the view.
1766         /// </summary>
1767         /// <since_tizen> 3 </since_tizen>
1768         public uint RendererCount
1769         {
1770             get
1771             {
1772                 return GetRendererCount();
1773             }
1774         }
1775
1776         /// <summary>
1777         /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
1778         /// </summary>
1779         /// <remarks>
1780         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
1781         /// </remarks>
1782         /// <since_tizen> 3 </since_tizen>
1783         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
1784             "Like: " +
1785             "View view = new View(); " +
1786             "view.PivotPoint = PivotPoint.Center; " +
1787             "view.PositionUsesPivotPoint = true;")]
1788         [EditorBrowsable(EditorBrowsableState.Never)]
1789         public Position AnchorPoint
1790         {
1791             get
1792             {
1793                 Position temp = new Position(0.0f, 0.0f, 0.0f);
1794                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
1795                 return new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
1796             }
1797             set
1798             {
1799                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1800                 NotifyPropertyChanged();
1801             }
1802         }
1803
1804         /// <summary>
1805         /// Sets the size of a view for the width, the height and the depth.<br />
1806         /// Geometry can be scaled to fit within this area.<br />
1807         /// This does not interfere with the view's scale factor.<br />
1808         /// The views default depth is the minimum of width and height.<br />
1809         /// </summary>
1810         /// <remarks>
1811         /// <para>
1812         /// Animatable - This property can be animated using <c>Animation</c> class.
1813         /// </para>
1814         /// The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.
1815         /// </remarks>
1816         /// <since_tizen> 5 </since_tizen>
1817         public Size Size
1818         {
1819             get
1820             {
1821                 Size tmp = (Size)GetValue(SizeProperty);
1822                 return new Size(OnSizeChanged, tmp.Width, tmp.Height, tmp.Depth);
1823             }
1824             set
1825             {
1826                 SetValue(SizeProperty, value);
1827                 // Set Specification so when layouts measure this View it matches the value set here.
1828                 // All Views are currently Layouts.
1829                 WidthSpecification = (int)Math.Ceiling(value.Width);
1830                 HeightSpecification = (int)Math.Ceiling(value.Height);
1831                 NotifyPropertyChanged();
1832             }
1833         }
1834
1835         /// <summary>
1836         /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
1837         /// </summary>
1838         /// <since_tizen> 3 </since_tizen>
1839         [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
1840             "Like: " +
1841             "Container parent =  view.GetParent(); " +
1842             "View view = parent as View;")]
1843         [EditorBrowsable(EditorBrowsableState.Never)]
1844         public new View Parent
1845         {
1846             get
1847             {
1848                 View ret;
1849                 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
1850                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1851                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
1852
1853                 if (basehandle is Layer layer)
1854                 {
1855                     ret = new View(Layer.getCPtr(layer).Handle, false);
1856                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
1857                 }
1858                 else
1859                 {
1860                     ret = basehandle as View;
1861                 }
1862
1863                 Interop.BaseHandle.delete_BaseHandle(CPtr);
1864                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1865
1866                 if (NDalicPINVOKE.SWIGPendingException.Pending)
1867                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1868                 return ret;
1869             }
1870         }
1871
1872         /// <summary>
1873         /// Gets/Sets whether inherit parent's the layout Direction.
1874         /// </summary>
1875         /// <since_tizen> 4 </since_tizen>
1876         public bool InheritLayoutDirection
1877         {
1878             get
1879             {
1880                 return (bool)GetValue(InheritLayoutDirectionProperty);
1881             }
1882             set
1883             {
1884                 SetValue(InheritLayoutDirectionProperty, value);
1885                 NotifyPropertyChanged();
1886             }
1887         }
1888
1889         /// <summary>
1890         /// Gets/Sets the layout Direction.
1891         /// </summary>
1892         /// <since_tizen> 4 </since_tizen>
1893         public ViewLayoutDirectionType LayoutDirection
1894         {
1895             get
1896             {
1897                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
1898             }
1899             set
1900             {
1901                 SetValue(LayoutDirectionProperty, value);
1902                 NotifyPropertyChanged();
1903                 _layout?.RequestLayout();
1904             }
1905         }
1906
1907         /// <summary>
1908         /// Gets or sets the Margin for use in layout.
1909         /// </summary>
1910         /// <remarks>
1911         /// Margin property is supported by Layout algorithms and containers.
1912         /// Please Set Layout if you want to use Margin property.
1913         /// The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.
1914         /// </remarks>
1915         /// <since_tizen> 4 </since_tizen>
1916         public Extents Margin
1917         {
1918             get
1919             {
1920                 // If View has a Layout then margin is stored in Layout.
1921                 if (Layout != null)
1922                 {
1923                     return Layout.Margin;
1924                 }
1925                 else
1926                 {
1927                     // If Layout not set then return margin stored in View.
1928                     Extents temp = (Extents)GetValue(MarginProperty);
1929                     return new Extents(OnMarginChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1930                 }
1931                 // Two return points to prevent creating a zeroed Extent native object before assignment
1932             }
1933             set
1934             {
1935                 if (Layout != null)
1936                 {
1937                     // Layout set so store Margin in LayoutItem instead of View.
1938                     // If View stores the Margin too then the Legacy Size Negotiation will
1939                     // overwrite the position and size values measured in the Layouting.
1940                     Layout.Margin = value;
1941                     SetValue(MarginProperty, new Extents(0,0,0,0));
1942                     _layout?.RequestLayout();
1943                 }
1944                 else
1945                 {
1946                     SetValue(MarginProperty, value);
1947                 }
1948                 NotifyPropertyChanged();
1949                 _layout?.RequestLayout();
1950             }
1951         }
1952
1953         ///<summary>
1954         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
1955         ///</summary>
1956         /// <since_tizen> 6 </since_tizen>
1957         public int WidthSpecification
1958         {
1959             get
1960             {
1961                 return _widthPolicy;
1962             }
1963             set
1964             {
1965                 _widthPolicy = value;
1966                 if( _oldWidthPolicy != _widthPolicy )
1967                 {
1968                     if (_widthPolicy >= 0)
1969                     {
1970                         _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
1971
1972                         if(_heightPolicy>=0) // Policy an exact value
1973                         {
1974                             Size2D.Width = _widthPolicy;
1975                         }
1976                         else
1977                         {
1978                             // Store _heightPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
1979                             // Size2D height will store the specification value (negative number) this will then be applied to the
1980                             // HeightSpecification when the Size2D callback is invoked.
1981                             Size2D = new Size2D(_widthPolicy,_heightPolicy);
1982                         }
1983                     }
1984                     _layout?.RequestLayout();
1985                     _oldWidthPolicy = _widthPolicy;
1986                 }
1987             }
1988         }
1989
1990         ///<summary>
1991         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
1992         ///</summary>
1993         /// <since_tizen> 6 </since_tizen>
1994         public int HeightSpecification
1995         {
1996             get
1997             {
1998                 return _heightPolicy;
1999             }
2000             set
2001             {
2002                 _heightPolicy = value;
2003                 if( _oldHeightPolicy != _heightPolicy )
2004                 {
2005                     if (_heightPolicy >= 0)
2006                     {
2007                         _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
2008
2009                         if(_widthPolicy>=0) // Policy an exact value
2010                         {
2011                             Size2D.Height = _heightPolicy;
2012                         }
2013                         else
2014                         {
2015                             // Store widthPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
2016                             // Size2D height will store the specification value (negative number) this will then be applied to the
2017                             // HeightSpecification when the Size2D callback is invoked.
2018                             Size2D = new Size2D(_widthPolicy,_heightPolicy);
2019                         }
2020
2021                     }
2022                     _layout?.RequestLayout();
2023                     _oldHeightPolicy = _heightPolicy;
2024                 }
2025             }
2026         }
2027
2028         ///<summary>
2029         /// Gets the List of transitions for this View.
2030         ///</summary>
2031         /// <since_tizen> 6 </since_tizen>
2032         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2033         {
2034             get
2035             {
2036                 if (_layoutTransitions == null)
2037                 {
2038                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2039                 }
2040                 return _layoutTransitions;
2041             }
2042         }
2043
2044         ///<summary>
2045         /// Set a layout transitions for this View.
2046         ///</summary>
2047         /// <remarks>
2048         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2049         /// </remarks>
2050         /// <since_tizen> 6 </since_tizen>
2051         public LayoutTransition LayoutTransition
2052         {
2053             set
2054             {
2055                 if (_layoutTransitions == null)
2056                 {
2057                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2058                 }
2059                 LayoutTransitionsHelper.AddTransitionForCondition(_layoutTransitions,value.Condition,value, true);
2060
2061                 AttachTransitionsToChildren(value);
2062             }
2063         }
2064
2065         /// <summary>
2066         /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
2067         /// </summary>
2068         /// <remarks>
2069         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2070         /// </remarks>
2071         /// <since_tizen> 4 </since_tizen>
2072         [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
2073         [EditorBrowsable(EditorBrowsableState.Never)]
2074         public Extents PaddingEX
2075         {
2076             get
2077             {
2078                 Extents temp = new Extents(0, 0, 0, 0);
2079                 GetProperty(View.Property.PADDING).Get(temp);
2080                 return new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2081             }
2082             set
2083             {
2084                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
2085                 NotifyPropertyChanged();
2086                 _layout?.RequestLayout();
2087             }
2088         }
2089
2090         /// <since_tizen> 6 </since_tizen>
2091         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2092         [EditorBrowsable(EditorBrowsableState.Never)]
2093         public Style XamlStyle
2094         {
2095             get
2096             {
2097                 return (Style)GetValue(XamlStyleProperty);
2098             }
2099             set
2100             {
2101                 SetValue(XamlStyleProperty, value);
2102             }
2103         }
2104
2105         /// <summary>
2106         /// The Color of View. This is an RGBA value.
2107         /// </summary>
2108         /// <remarks>
2109         /// <para>
2110         /// Animatable - This property can be animated using <c>Animation</c> class.
2111         /// </para>
2112         /// The property cascade chaining set is possible. For example, this (view.Color.X = 0.1f;) is possible.
2113         /// </remarks>
2114         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2115         [EditorBrowsable(EditorBrowsableState.Never)]
2116         public Color Color
2117         {
2118             get
2119             {
2120                 Color temp = (Color)GetValue(ColorProperty);
2121                 return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
2122             }
2123             set
2124             {
2125                 SetValue(ColorProperty, value);
2126                 NotifyPropertyChanged();
2127             }
2128         }
2129
2130         /// <summary>
2131         /// Set the layout on this View. Replaces any existing Layout.
2132         /// </summary>
2133         /// <since_tizen> 6 </since_tizen>
2134         public LayoutItem Layout
2135         {
2136             get
2137             {
2138                 return _layout;
2139             }
2140             set
2141             {
2142                 // Do nothing if layout provided is already set on this View.
2143                 if (value == _layout)
2144                 {
2145                     return;
2146                 }
2147
2148                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
2149                 layoutingDisabled = false;
2150                 layoutSet = true;
2151
2152                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2153                 // First check if the layout to be set already has a owner.
2154                 if (value?.Owner != null)
2155                 {
2156                     // Previous owner of the layout gets a default layout as a replacement.
2157                     value.Owner.Layout = new AbsoluteLayout();
2158
2159                     // Copy Margin and Padding to replacement LayoutGroup.
2160                     value.Owner.Layout.Margin = value.Margin;
2161                     value.Owner.Layout.Padding = value.Padding;
2162                 }
2163
2164                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2165                 // View if no replacement. Previously margin and padding values would have been moved from
2166                 // the View to the layout.
2167                 if (_layout != null ) // Existing layout
2168                 {
2169                     if (value != null)
2170                     {
2171                         // Existing layout being replaced so copy over margin and padding values.
2172                         value.Margin = _layout.Margin;
2173                         value.Padding = _layout.Padding;
2174                     }
2175                     else
2176                     {
2177                       // Layout not being replaced so restore margin and padding to View.
2178                       SetValue(MarginProperty, _layout.Margin);
2179                       SetValue(PaddingProperty, _layout.Padding);
2180                       NotifyPropertyChanged();
2181                     }
2182                 }
2183                 else
2184                 {
2185                     // First Layout to be added to the View hence copy
2186
2187                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2188                     if (value !=null)
2189                     {
2190                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
2191                         {
2192                             // If View already has a margin set then store it in Layout instead.
2193                             value.Margin = Margin;
2194                             SetValue(MarginProperty, new Extents(0,0,0,0));
2195                             NotifyPropertyChanged();
2196                         }
2197
2198                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
2199                         {
2200                             // If View already has a padding set then store it in Layout instead.
2201                             value.Padding = Padding;
2202                             SetValue(PaddingProperty, new Extents(0,0,0,0));
2203                             NotifyPropertyChanged();
2204                         }
2205                     }
2206                 }
2207
2208                 // Remove existing layout from it's parent layout group.
2209                 _layout?.Unparent();
2210
2211                 // Set layout to this view
2212                 SetLayout(value);
2213             }
2214         }
2215
2216         /// <summary>
2217         /// The weight of the View, used to share available space in a layout with siblings.
2218         /// </summary>
2219         /// <since_tizen> 6 </since_tizen>
2220         public float Weight
2221         {
2222             get
2223             {
2224                 return _weight;
2225             }
2226             set
2227             {
2228                 _weight = value;
2229                 _layout?.RequestLayout();
2230             }
2231         }
2232
2233         /// <summary>
2234         ///  Whether to load the BackgroundImage synchronously.
2235         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2236         ///  Note: For Normal Quad images only.
2237         /// </summary>
2238         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2239         [EditorBrowsable(EditorBrowsableState.Never)]
2240         public bool BackgroundImageSynchronosLoading
2241         {
2242             get
2243             {
2244                 return _backgroundImageSynchronosLoading;
2245             }
2246             set
2247             {
2248                 _backgroundImageSynchronosLoading = value;
2249                 string bgUrl = "";
2250                 int visualType = 0;
2251                 Background.Find(Visual.Property.Type)?.Get(out visualType);
2252                 if (visualType == (int)Visual.Type.Image)
2253                 {
2254                     Background.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
2255                 }
2256
2257                 if (bgUrl.Length != 0)
2258                 {
2259                     PropertyMap bgMap = this.Background;
2260                     bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
2261                     Background = bgMap;
2262                 }
2263             }
2264         }
2265
2266         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2267         [EditorBrowsable(EditorBrowsableState.Never)]
2268         public Vector2 UpdateSizeHint
2269         {
2270             get
2271             {
2272                 return (Vector2)GetValue(UpdateSizeHintProperty);
2273             }
2274             set
2275             {
2276                 SetValue(UpdateSizeHintProperty, value);
2277                 NotifyPropertyChanged();
2278             }
2279         }
2280
2281         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
2282         [EditorBrowsable(EditorBrowsableState.Never)]
2283         public string[] TransitionNames
2284         {
2285             get
2286             {
2287                 return transitionNames;
2288             }
2289             set
2290             {
2291                 transitionNames = value;
2292                 LoadTransitions();
2293             }
2294         }
2295
2296         /// <summary>
2297         /// Enable/Disable ControlState propagation for children.
2298         /// It is false by default.
2299         /// If the View needs to share ControlState with descendants, please set it true.
2300         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
2301         /// </summary>
2302         [EditorBrowsable(EditorBrowsableState.Never)]
2303         public bool EnableControlStatePropagation
2304         {
2305             get => controlStatePropagation;
2306             set
2307             {
2308                 controlStatePropagation = value;
2309
2310                 foreach (View child in Children)
2311                 {
2312                     child.EnableControlStatePropagation = value;
2313                 }
2314             }
2315         }
2316
2317         /// <summary>
2318         /// Get Style, it is abstract function and must be override.
2319         /// </summary>
2320         /// <since_tizen> 6 </since_tizen>
2321         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2322         [EditorBrowsable(EditorBrowsableState.Never)]
2323         protected virtual ViewStyle GetViewStyle()
2324         {
2325             return new ViewStyle();
2326         }
2327
2328         /// <summary>
2329         /// Called after the View's ControlStates changed.
2330         /// </summary>
2331         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
2332         [EditorBrowsable(EditorBrowsableState.Never)]
2333         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
2334         {
2335         }
2336
2337         internal static readonly BindableProperty BackgroundImageSelectorProperty = BindableProperty.Create("BackgroundImageSelector", typeof(Selector<string>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2338         {
2339             var view = (View)bindable;
2340             view.backgroundImageSelector.Clone((Selector<string>)newValue);
2341         },
2342         defaultValueCreator: (bindable) =>
2343         {
2344             var view = (View)bindable;
2345             return view.backgroundImageSelector;
2346         });
2347         private TriggerableSelector<string> _backgroundImageSelector;
2348         private TriggerableSelector<string> backgroundImageSelector
2349         {
2350             get
2351             {
2352                 if (null == _backgroundImageSelector)
2353                 {
2354                     _backgroundImageSelector = new TriggerableSelector<string>(this, BackgroundImageProperty);
2355                 }
2356                 return _backgroundImageSelector;
2357             }
2358         }
2359         internal static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2360         {
2361             var view = (View)bindable;
2362             view.backgroundColorSelector.Clone((Selector<Color>)newValue);
2363         },
2364         defaultValueCreator: (bindable) =>
2365         {
2366             var view = (View)bindable;
2367             return view.backgroundColorSelector;
2368         });
2369         private TriggerableSelector<Color> _backgroundColorSelector;
2370         private TriggerableSelector<Color> backgroundColorSelector
2371         {
2372             get
2373             {
2374                 if (null == _backgroundColorSelector)
2375                 {
2376                     _backgroundColorSelector = new TriggerableSelector<Color>(this, BackgroundColorProperty);
2377                 }
2378                 return _backgroundColorSelector;
2379             }
2380         }
2381
2382         internal static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2383         {
2384             var view = (View)bindable;
2385             view.colorSelector.Clone((Selector<Color>)newValue);
2386         },
2387         defaultValueCreator: (bindable) =>
2388         {
2389             var view = (View)bindable;
2390             return view.colorSelector;
2391         });
2392
2393         private TriggerableSelector<Color> _colorSelector;
2394         private TriggerableSelector<Color> colorSelector
2395         {
2396             get
2397             {
2398                 if (null == _colorSelector)
2399                 {
2400                     _colorSelector = new TriggerableSelector<Color>(this, ColorProperty);
2401                 }
2402                 return _colorSelector;
2403             }
2404         }
2405
2406         internal static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2407         {
2408             var view = (View)bindable;
2409             view.backgroundImageBorderSelector.Clone((Selector<Rectangle>)newValue);
2410         },
2411         defaultValueCreator: (bindable) =>
2412         {
2413             var view = (View)bindable;
2414             return view.backgroundImageBorderSelector;
2415         });
2416         private TriggerableSelector<Rectangle> _backgroundImageBorderSelector;
2417         private TriggerableSelector<Rectangle> backgroundImageBorderSelector
2418         {
2419             get
2420             {
2421                 if (null == _backgroundImageBorderSelector)
2422                 {
2423                     _backgroundImageBorderSelector = new TriggerableSelector<Rectangle>(this, BackgroundImageBorderProperty);
2424                 }
2425                 return _backgroundImageBorderSelector;
2426             }
2427         }
2428         internal static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2429         {
2430             var view = (View)bindable;
2431             view.opacitySelector.Clone((Selector<float?>)newValue);
2432         },
2433         defaultValueCreator: (bindable) =>
2434         {
2435             var view = (View)bindable;
2436             return view.opacitySelector;
2437         });
2438         private TriggerableSelector<float?> _opacitySelector;
2439         private TriggerableSelector<float?> opacitySelector
2440         {
2441             get
2442             {
2443                 if (null == _opacitySelector)
2444                 {
2445                     _opacitySelector = new TriggerableSelector<float?>(this, OpacityProperty);
2446                 }
2447                 return _opacitySelector;
2448             }
2449         }
2450
2451         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2452         [EditorBrowsable(EditorBrowsableState.Never)]
2453         public virtual void ApplyStyle(ViewStyle viewStyle)
2454         {
2455             if (null == viewStyle)
2456             {
2457                 return;
2458             }
2459
2460             if (this.viewStyle == viewStyle)
2461             {
2462                 return;
2463             }
2464
2465             if (null != this.viewStyle)
2466             {
2467                 simpleBinding.Clear();
2468             }
2469
2470             this.viewStyle = viewStyle;
2471
2472             Dictionary<string, BindableProperty> bindablePropertyOfView;
2473             Type viewType = GetType();
2474
2475             Dictionary<string, BindableProperty> bindablePropertyOfStyle;
2476             Type styleType = viewStyle.GetType();
2477
2478             BindableProperty.GetBindablePropertysOfType(viewType, out bindablePropertyOfView);
2479             BindableProperty.GetBindablePropertysOfType(styleType, out bindablePropertyOfStyle);
2480
2481             if (null != bindablePropertyOfView && null != bindablePropertyOfStyle)
2482             {
2483                 foreach (KeyValuePair<string, BindableProperty> keyValuePair in bindablePropertyOfStyle)
2484                 {
2485                     BindableProperty viewProperty;
2486                     bindablePropertyOfView.TryGetValue(keyValuePair.Key, out viewProperty);
2487
2488                     if (null != viewProperty)
2489                     {
2490                         object value = viewStyle.GetValue(keyValuePair.Value);
2491
2492                         if (null != value)
2493                         {
2494                             SetValue(viewProperty, value);
2495                         }
2496
2497                         simpleBinding.Bind(viewStyle, keyValuePair.Value, this, viewProperty, BindingDirection.TwoWay);
2498                     }
2499                 }
2500             }
2501         }
2502
2503         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2504         [EditorBrowsable(EditorBrowsableState.Never)]
2505         private BundledPipe simpleBinding = new BundledPipe();
2506     }
2507 }