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