[NUI]Refactor Components (#1152)
[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         /// <since_tizen> 3 </since_tizen>
647         public float Opacity
648         {
649             get
650             {
651                 return (float)GetValue(OpacityProperty);
652             }
653             set
654             {
655                 SetValue(OpacityProperty, value);
656                 NotifyPropertyChanged();
657             }
658         }
659
660         /// <summary>
661         /// Sets the position of the view for X and Y.<br />
662         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
663         /// If the position inheritance is disabled, sets the world position.<br />
664         /// </summary>
665         /// <remarks>
666         /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
667         /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
668         /// </remarks>
669         /// <since_tizen> 3 </since_tizen>
670         public Position2D Position2D
671         {
672             get
673             {
674                 Position2D temp = (Position2D)GetValue(Position2DProperty);
675                 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
676             }
677             set
678             {
679                 SetValue(Position2DProperty, value);
680                 NotifyPropertyChanged();
681             }
682         }
683
684         /// <summary>
685         /// Retrieves the screen postion of the view.<br />
686         /// </summary>
687         /// <since_tizen> 3 </since_tizen>
688         public Vector2 ScreenPosition
689         {
690             get
691             {
692                 Vector2 temp = new Vector2(0.0f, 0.0f);
693                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
694                 return temp;
695             }
696         }
697
698         /// <summary>
699         /// Determines whether the pivot point should be used to determine the position of the view.
700         /// This is true by default.
701         /// </summary>
702         /// <remarks>If false, then the top-left of the view is used for the position.
703         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
704         /// </remarks>
705         /// <since_tizen> 3 </since_tizen>
706         public bool PositionUsesPivotPoint
707         {
708             get
709             {
710                 return (bool)GetValue(PositionUsesPivotPointProperty);
711             }
712             set
713             {
714                 SetValue(PositionUsesPivotPointProperty, value);
715                 NotifyPropertyChanged();
716             }
717         }
718
719         /// <summary>
720         /// Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead!
721         /// </summary>
722         /// <since_tizen> 3 </since_tizen>
723         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead! " +
724             "Like: " +
725             "View view = new View(); " +
726             "view.PivotPoint = PivotPoint.Center; " +
727             "view.PositionUsesPivotPoint = true;" +
728             " Deprecated in API5: Will be removed in API8")]
729         [EditorBrowsable(EditorBrowsableState.Never)]
730         public bool PositionUsesAnchorPoint
731         {
732             get
733             {
734                 bool temp = false;
735                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
736                 return temp;
737             }
738             set
739             {
740                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
741                 NotifyPropertyChanged();
742             }
743         }
744
745         /// <summary>
746         /// Queries whether the view is connected to the stage.<br />
747         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
748         /// </summary>
749         /// <since_tizen> 3 </since_tizen>
750         public bool IsOnWindow
751         {
752             get
753             {
754                 return OnWindow();
755             }
756         }
757
758         /// <summary>
759         /// Gets the depth in the hierarchy for the view.
760         /// </summary>
761         /// <since_tizen> 3 </since_tizen>
762         public int HierarchyDepth
763         {
764             get
765             {
766                 return GetHierarchyDepth();
767             }
768         }
769
770         /// <summary>
771         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
772         /// </summary>
773         /// <remarks>
774         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
775         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
776         /// The values set by this property will likely change.
777         /// </remarks>
778         /// <since_tizen> 3 </since_tizen>
779         public int SiblingOrder
780         {
781             get
782             {
783                 return (int)GetValue(SiblingOrderProperty);
784             }
785             set
786             {
787                 SetValue(SiblingOrderProperty, value);
788                 NotifyPropertyChanged();
789             }
790         }
791
792         /// <summary>
793         /// Returns the natural size of the view.
794         /// </summary>
795         /// <remarks>
796         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
797         /// </remarks>
798         /// <since_tizen> 5 </since_tizen>
799         public Vector3 NaturalSize
800         {
801             get
802             {
803                 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
804                 if (NDalicPINVOKE.SWIGPendingException.Pending)
805                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
806                 return ret;
807             }
808         }
809
810         /// <summary>
811         /// Returns the natural size (Size2D) of the view.
812         /// </summary>
813         /// <remarks>
814         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
815         /// </remarks>
816         /// <since_tizen> 4 </since_tizen>
817         public Size2D NaturalSize2D
818         {
819             get
820             {
821                 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
822                 if (NDalicPINVOKE.SWIGPendingException.Pending)
823                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
824
825                 return new Size2D((int)temp.Width, (int)temp.Height);
826             }
827         }
828
829         /// <summary>
830         /// Gets or sets the origin of a view within its parent's area.<br />
831         /// 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 />
832         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
833         /// A view's position is the distance between this origin and the view's anchor-point.<br />
834         /// </summary>
835         /// <pre>The view has been initialized.</pre>
836         /// <since_tizen> 3 </since_tizen>
837         public Position ParentOrigin
838         {
839             get
840             {
841                 Position tmp = (Position)GetValue(ParentOriginProperty);
842                 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
843             }
844             set
845             {
846                 SetValue(ParentOriginProperty, value);
847                 NotifyPropertyChanged();
848             }
849         }
850
851         /// <summary>
852         /// Gets or sets the anchor-point of a view.<br />
853         /// 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 />
854         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
855         /// A view position is the distance between its parent-origin and this anchor-point.<br />
856         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
857         /// <pre>The view has been initialized.</pre>
858         /// </summary>
859         /// <remarks>
860         /// The property cascade chaining set is possible. For example, this (view.PivotPoint.X = 0.1f;) is possible.
861         /// </remarks>
862         /// <since_tizen> 3 </since_tizen>
863         public Position PivotPoint
864         {
865             get
866             {
867                 Position tmp = (Position)GetValue(PivotPointProperty);
868                 return new Position(OnPivotPointChanged, tmp.X, tmp.Y, tmp.Z);
869             }
870             set
871             {
872                 SetValue(PivotPointProperty, value);
873                 NotifyPropertyChanged();
874             }
875         }
876
877         /// <summary>
878         /// Gets or sets the size width of the view.
879         /// </summary>
880         /// <remarks>
881         /// <para>
882         /// Animatable - This property can be animated using <c>Animation</c> class.
883         /// </para>
884         /// </remarks>
885         /// <since_tizen> 3 </since_tizen>
886         public float SizeWidth
887         {
888             get
889             {
890                 return (float)GetValue(SizeWidthProperty);
891             }
892             set
893             {
894                 SetValue(SizeWidthProperty, value);
895                 WidthSpecification = (int)Math.Ceiling(value);
896                 NotifyPropertyChanged();
897             }
898         }
899
900         /// <summary>
901         /// Gets or sets the size height of the view.
902         /// </summary>
903         /// <remarks>
904         /// <para>
905         /// Animatable - This property can be animated using <c>Animation</c> class.
906         /// </para>
907         /// </remarks>
908         /// <since_tizen> 3 </since_tizen>
909         public float SizeHeight
910         {
911             get
912             {
913                 return (float)GetValue(SizeHeightProperty);
914             }
915             set
916             {
917                 SetValue(SizeHeightProperty, value);
918                 HeightSpecification = (int)Math.Ceiling(value);
919                 NotifyPropertyChanged();
920             }
921         }
922
923         /// <summary>
924         /// Gets or sets the position of the view.<br />
925         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
926         /// If the position inheritance is disabled, sets the world position.<br />
927         /// </summary>
928         /// <remarks>
929         /// <para>
930         /// Animatable - This property can be animated using <c>Animation</c> class.
931         /// </para>
932         /// The property cascade chaining set is possible. For example, this (view.Position.X = 1.0f;) is possible.
933         /// </remarks>
934         /// <since_tizen> 3 </since_tizen>
935         public Position Position
936         {
937             get
938             {
939                 Position tmp = (Position)GetValue(PositionProperty);
940                 return new Position(OnPositionChanged, tmp.X, tmp.Y, tmp.Z);
941             }
942             set
943             {
944                 SetValue(PositionProperty, value);
945                 NotifyPropertyChanged();
946             }
947         }
948
949         /// <summary>
950         /// Gets or sets the position X of the view.
951         /// </summary>
952         /// <remarks>
953         /// <para>
954         /// Animatable - This property can be animated using <c>Animation</c> class.
955         /// </para>
956         /// </remarks>
957         /// <since_tizen> 3 </since_tizen>
958         public float PositionX
959         {
960             get
961             {
962                 return (float)GetValue(PositionXProperty);
963             }
964             set
965             {
966                 SetValue(PositionXProperty, value);
967                 NotifyPropertyChanged();
968             }
969         }
970
971         /// <summary>
972         /// Gets or sets the position Y of the view.
973         /// </summary>
974         /// <remarks>
975         /// <para>
976         /// Animatable - This property can be animated using <c>Animation</c> class.
977         /// </para>
978         /// </remarks>
979         /// <since_tizen> 3 </since_tizen>
980         public float PositionY
981         {
982             get
983             {
984                 return (float)GetValue(PositionYProperty);
985             }
986             set
987             {
988                 SetValue(PositionYProperty, value);
989                 NotifyPropertyChanged();
990             }
991         }
992
993         /// <summary>
994         /// Gets or sets the position Z of the view.
995         /// </summary>
996         /// <remarks>
997         /// <para>
998         /// Animatable - This property can be animated using <c>Animation</c> class.
999         /// </para>
1000         /// </remarks>
1001         /// <since_tizen> 3 </since_tizen>
1002         public float PositionZ
1003         {
1004             get
1005             {
1006                 return (float)GetValue(PositionZProperty);
1007             }
1008             set
1009             {
1010                 SetValue(PositionZProperty, value);
1011                 NotifyPropertyChanged();
1012             }
1013         }
1014
1015         /// <summary>
1016         /// Gets or sets the world position of the view.
1017         /// </summary>
1018         /// <since_tizen> 3 </since_tizen>
1019         public Vector3 WorldPosition
1020         {
1021             get
1022             {
1023                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1024                 GetProperty(View.Property.WORLD_POSITION).Get(temp);
1025                 return temp;
1026             }
1027         }
1028
1029         /// <summary>
1030         /// Gets or sets the orientation of the view.<br />
1031         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1032         /// </summary>
1033         /// <remarks>
1034         /// <para>
1035         /// This is an asynchronous method.
1036         /// </para>
1037         /// <para>
1038         /// Animatable - This property can be animated using <c>Animation</c> class.
1039         /// </para>
1040         /// </remarks>
1041         /// <since_tizen> 3 </since_tizen>
1042         public Rotation Orientation
1043         {
1044             get
1045             {
1046                 return (Rotation)GetValue(OrientationProperty);
1047             }
1048             set
1049             {
1050                 SetValue(OrientationProperty, value);
1051                 NotifyPropertyChanged();
1052             }
1053         }
1054
1055         /// <summary>
1056         /// Gets or sets the world orientation of the view.<br />
1057         /// </summary>
1058         /// <since_tizen> 3 </since_tizen>
1059         public Rotation WorldOrientation
1060         {
1061             get
1062             {
1063                 Rotation temp = new Rotation();
1064                 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
1065                 return temp;
1066             }
1067         }
1068
1069         /// <summary>
1070         /// Gets or sets the scale factor applied to the view.<br />
1071         /// </summary>
1072         /// <remarks>
1073         /// <para>
1074         /// Animatable - This property can be animated using <c>Animation</c> class.
1075         /// </para>
1076         /// The property cascade chaining set is possible. For example, this (view.Scale.X = 0.1f;) is possible.
1077         /// </remarks>
1078         /// <since_tizen> 3 </since_tizen>
1079         public Vector3 Scale
1080         {
1081             get
1082             {
1083                 Vector3 temp = (Vector3)GetValue(ScaleProperty);
1084                 return new Vector3(OnScaleChanged, temp.X, temp.Y, temp.Z);
1085             }
1086             set
1087             {
1088                 SetValue(ScaleProperty, value);
1089                 NotifyPropertyChanged();
1090             }
1091         }
1092
1093         /// <summary>
1094         /// Gets or sets the scale X factor applied to the view.
1095         /// </summary>
1096         /// <remarks>
1097         /// <para>
1098         /// Animatable - This property can be animated using <c>Animation</c> class.
1099         /// </para>
1100         /// </remarks>
1101         /// <since_tizen> 3 </since_tizen>
1102         public float ScaleX
1103         {
1104             get
1105             {
1106                 return (float)GetValue(ScaleXProperty);
1107             }
1108             set
1109             {
1110                 SetValue(ScaleXProperty, value);
1111                 NotifyPropertyChanged();
1112             }
1113         }
1114
1115         /// <summary>
1116         /// Gets or sets the scale Y factor applied to the view.
1117         /// </summary>
1118         /// <remarks>
1119         /// <para>
1120         /// Animatable - This property can be animated using <c>Animation</c> class.
1121         /// </para>
1122         /// </remarks>
1123         /// <since_tizen> 3 </since_tizen>
1124         public float ScaleY
1125         {
1126             get
1127             {
1128                 return (float)GetValue(ScaleYProperty);
1129             }
1130             set
1131             {
1132                 SetValue(ScaleYProperty, value);
1133                 NotifyPropertyChanged();
1134             }
1135         }
1136
1137         /// <summary>
1138         /// Gets or sets the scale Z factor applied to the view.
1139         /// </summary>
1140         /// <remarks>
1141         /// <para>
1142         /// Animatable - This property can be animated using <c>Animation</c> class.
1143         /// </para>
1144         /// </remarks>
1145         /// <since_tizen> 3 </since_tizen>
1146         public float ScaleZ
1147         {
1148             get
1149             {
1150                 return (float)GetValue(ScaleZProperty);
1151             }
1152             set
1153             {
1154                 SetValue(ScaleZProperty, value);
1155                 NotifyPropertyChanged();
1156             }
1157         }
1158
1159         /// <summary>
1160         /// Gets the world scale of the view.
1161         /// </summary>
1162         /// <since_tizen> 3 </since_tizen>
1163         public Vector3 WorldScale
1164         {
1165             get
1166             {
1167                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1168                 GetProperty(View.Property.WORLD_SCALE).Get(temp);
1169                 return temp;
1170             }
1171         }
1172
1173         /// <summary>
1174         /// Retrieves the visibility flag of the view.
1175         /// </summary>
1176         /// <remarks>
1177         /// <para>
1178         /// If the view is not visible, then the view and its children will not be rendered.
1179         /// 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.
1180         /// </para>
1181         /// <para>
1182         /// Animatable - This property can be animated using <c>Animation</c> class.
1183         /// </para>
1184         /// </remarks>
1185         /// <since_tizen> 3 </since_tizen>
1186         public bool Visibility
1187         {
1188             get
1189             {
1190                 bool temp = false;
1191                 GetProperty(View.Property.VISIBLE).Get(out temp);
1192                 return temp;
1193             }
1194         }
1195
1196         /// <summary>
1197         /// Gets the view's world color.
1198         /// </summary>
1199         /// <since_tizen> 3 </since_tizen>
1200         public Vector4 WorldColor
1201         {
1202             get
1203             {
1204                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1205                 GetProperty(View.Property.WORLD_COLOR).Get(temp);
1206                 return temp;
1207             }
1208         }
1209
1210         /// <summary>
1211         /// Gets or sets the view's name.
1212         /// </summary>
1213         /// <since_tizen> 3 </since_tizen>
1214         public string Name
1215         {
1216             get
1217             {
1218                 return (string)GetValue(NameProperty);
1219             }
1220             set
1221             {
1222                 SetValue(NameProperty, value);
1223                 NotifyPropertyChanged();
1224             }
1225         }
1226
1227         /// <summary>
1228         /// Get the number of children held by the view.
1229         /// </summary>
1230         /// <since_tizen> 3 </since_tizen>
1231         public new uint ChildCount
1232         {
1233             get
1234             {
1235                 return GetChildCount();
1236             }
1237         }
1238
1239         /// <summary>
1240         /// Gets the view's ID.
1241         /// Readonly
1242         /// </summary>
1243         /// <since_tizen> 3 </since_tizen>
1244         public uint ID
1245         {
1246             get
1247             {
1248                 return GetId();
1249             }
1250         }
1251
1252         /// <summary>
1253         /// Gets or sets the status of whether the view should emit touch or hover signals.
1254         /// </summary>
1255         /// <since_tizen> 3 </since_tizen>
1256         public bool Sensitive
1257         {
1258             get
1259             {
1260                 return (bool)GetValue(SensitiveProperty);
1261             }
1262             set
1263             {
1264                 SetValue(SensitiveProperty, value);
1265                 NotifyPropertyChanged();
1266             }
1267         }
1268
1269         /// <summary>
1270         /// 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.
1271         /// </summary>
1272         /// <since_tizen> 3 </since_tizen>
1273         public bool LeaveRequired
1274         {
1275             get
1276             {
1277                 return (bool)GetValue(LeaveRequiredProperty);
1278             }
1279             set
1280             {
1281                 SetValue(LeaveRequiredProperty, value);
1282                 NotifyPropertyChanged();
1283             }
1284         }
1285
1286         /// <summary>
1287         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
1288         /// </summary>
1289         /// <since_tizen> 3 </since_tizen>
1290         public bool InheritOrientation
1291         {
1292             get
1293             {
1294                 return (bool)GetValue(InheritOrientationProperty);
1295             }
1296             set
1297             {
1298                 SetValue(InheritOrientationProperty, value);
1299                 NotifyPropertyChanged();
1300             }
1301         }
1302
1303         /// <summary>
1304         /// Gets or sets the status of whether a child view inherits it's parent's scale.
1305         /// </summary>
1306         /// <since_tizen> 3 </since_tizen>
1307         public bool InheritScale
1308         {
1309             get
1310             {
1311                 return (bool)GetValue(InheritScaleProperty);
1312             }
1313             set
1314             {
1315                 SetValue(InheritScaleProperty, value);
1316                 NotifyPropertyChanged();
1317             }
1318         }
1319
1320         /// <summary>
1321         /// Gets or sets the status of how the view and its children should be drawn.<br />
1322         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
1323         /// 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 />
1324         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
1325         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
1326         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
1327         /// </summary>
1328         /// <since_tizen> 3 </since_tizen>
1329         public DrawModeType DrawMode
1330         {
1331             get
1332             {
1333                 return (DrawModeType)GetValue(DrawModeProperty);
1334             }
1335             set
1336             {
1337                 SetValue(DrawModeProperty, value);
1338                 NotifyPropertyChanged();
1339             }
1340         }
1341
1342         /// <summary>
1343         /// Gets or sets the relative to parent size factor of the view.<br />
1344         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
1345         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
1346         /// </summary>
1347         /// <remarks>
1348         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
1349         /// </remarks>
1350         /// <since_tizen> 3 </since_tizen>
1351         public Vector3 SizeModeFactor
1352         {
1353             get
1354             {
1355                 Vector3 temp = (Vector3)GetValue(SizeModeFactorProperty);
1356                 return new Vector3(OnSizeModeFactorChanged, temp.X, temp.Y, temp.Z);
1357             }
1358             set
1359             {
1360                 SetValue(SizeModeFactorProperty, value);
1361                 NotifyPropertyChanged();
1362             }
1363         }
1364
1365         /// <summary>
1366         /// Gets or sets the width resize policy to be used.
1367         /// </summary>
1368         /// <since_tizen> 3 </since_tizen>
1369         public ResizePolicyType WidthResizePolicy
1370         {
1371             get
1372             {
1373                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
1374             }
1375             set
1376             {
1377                 SetValue(WidthResizePolicyProperty, value);
1378                 // Match ResizePolicy to new Layouting.
1379                 // Parent relative policies can not be mapped at this point as parent size unknown.
1380                 switch (value)
1381                 {
1382                     case ResizePolicyType.UseNaturalSize:
1383                     {
1384                         WidthSpecification = LayoutParamPolicies.WrapContent;
1385                         break;
1386                     }
1387                     case ResizePolicyType.FillToParent:
1388                     {
1389                         WidthSpecification = LayoutParamPolicies.MatchParent;
1390                         break;
1391                     }
1392                     case ResizePolicyType.FitToChildren:
1393                     {
1394                         WidthSpecification = LayoutParamPolicies.WrapContent;
1395                         break;
1396                     }
1397                     default:
1398                         break;
1399                 }
1400                 NotifyPropertyChanged();
1401             }
1402         }
1403
1404         /// <summary>
1405         /// Gets or sets the height resize policy to be used.
1406         /// </summary>
1407         /// <since_tizen> 3 </since_tizen>
1408         public ResizePolicyType HeightResizePolicy
1409         {
1410             get
1411             {
1412                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
1413             }
1414             set
1415             {
1416                 SetValue(HeightResizePolicyProperty, value);
1417                 // Match ResizePolicy to new Layouting.
1418                 // Parent relative policies can not be mapped at this point as parent size unknown.
1419                 switch (value)
1420                 {
1421                     case ResizePolicyType.UseNaturalSize:
1422                     {
1423                         HeightSpecification = LayoutParamPolicies.WrapContent;
1424                         break;
1425                     }
1426                     case ResizePolicyType.FillToParent:
1427                     {
1428                         HeightSpecification = LayoutParamPolicies.MatchParent;
1429                         break;
1430                     }
1431                     case ResizePolicyType.FitToChildren:
1432                     {
1433                         HeightSpecification = LayoutParamPolicies.WrapContent;
1434                         break;
1435                     }
1436                     default:
1437                         break;
1438                 }
1439                 NotifyPropertyChanged();
1440             }
1441         }
1442
1443         /// <summary>
1444         /// Gets or sets the policy to use when setting size with size negotiation.<br />
1445         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
1446         /// </summary>
1447         /// <since_tizen> 3 </since_tizen>
1448         public SizeScalePolicyType SizeScalePolicy
1449         {
1450             get
1451             {
1452                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
1453             }
1454             set
1455             {
1456                 SetValue(SizeScalePolicyProperty, value);
1457                 NotifyPropertyChanged();
1458             }
1459         }
1460
1461         /// <summary>
1462         ///  Gets or sets the status of whether the width size is dependent on the height size.
1463         /// </summary>
1464         /// <since_tizen> 3 </since_tizen>
1465         public bool WidthForHeight
1466         {
1467             get
1468             {
1469                 return (bool)GetValue(WidthForHeightProperty);
1470             }
1471             set
1472             {
1473                 SetValue(WidthForHeightProperty, value);
1474                 NotifyPropertyChanged();
1475             }
1476         }
1477
1478         /// <summary>
1479         /// Gets or sets the status of whether the height size is dependent on the width size.
1480         /// </summary>
1481         /// <since_tizen> 3 </since_tizen>
1482         public bool HeightForWidth
1483         {
1484             get
1485             {
1486                 return (bool)GetValue(HeightForWidthProperty);
1487             }
1488             set
1489             {
1490                 SetValue(HeightForWidthProperty, value);
1491                 NotifyPropertyChanged();
1492             }
1493         }
1494
1495         /// <summary>
1496         /// Gets or sets the padding for use in layout.
1497         /// </summary>
1498         /// <remarks>
1499         /// The property cascade chaining set is possible. For example, this (view.Padding.X = 0.1f;) is possible.
1500         /// </remarks>
1501         /// <since_tizen> 5 </since_tizen>
1502         public Extents Padding
1503         {
1504             get
1505             {
1506                 // If View has a Layout then padding in stored in the base Layout class
1507                 if (Layout !=null)
1508                 {
1509                     return Layout.Padding;
1510                 }
1511                 else
1512                 {
1513                     Extents temp = (Extents)GetValue(PaddingProperty);
1514                     return new Extents(OnPaddingChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1515                 }
1516                 // Two return points to prevent creating a zeroed Extent native object before assignment
1517             }
1518             set
1519             {
1520                 Extents padding = value;
1521                 if (Layout !=null)
1522                 {
1523                     // Layout set so store Padding in LayoutItem instead of in View.
1524                     // If View stores the Padding value then Legacy Size Negotiation will overwrite
1525                     // the position and sizes measure in the Layouting.
1526                     Layout.Padding = value;
1527                     // If Layout is a LayoutItem then it could be a View that handles it's own padding.
1528                     // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
1529                     if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
1530                     {
1531                         padding =  new Extents(0,0,0,0); // Reset value stored in View.
1532                     }
1533                     _layout?.RequestLayout();
1534                 }
1535                 SetValue(PaddingProperty, padding);
1536                 NotifyPropertyChanged();
1537                 _layout?.RequestLayout();
1538             }
1539         }
1540
1541         /// <summary>
1542         /// Gets or sets the minimum size the view can be assigned in size negotiation.
1543         /// </summary>
1544         /// <remarks>
1545         /// The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.
1546         /// </remarks>
1547         /// <since_tizen> 3 </since_tizen>
1548         public Size2D MinimumSize
1549         {
1550             get
1551             {
1552                 Size2D tmp = (Size2D)GetValue(MinimumSizeProperty);
1553                 return new Size2D(OnMinimumSizeChanged, tmp.Width, tmp.Height);
1554             }
1555             set
1556             {
1557                 if (_layout != null)
1558                 {
1559                     // Note: it only works if minimum size is >= than natural size.
1560                     // To force the size it should be done through the width&height spec or Size2D.
1561                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
1562                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
1563                     _layout.RequestLayout();
1564                 }
1565                 SetValue(MinimumSizeProperty, value);
1566                 NotifyPropertyChanged();
1567             }
1568         }
1569
1570         /// <summary>
1571         /// Gets or sets the maximum size the view can be assigned in size negotiation.
1572         /// </summary>
1573         /// <remarks>
1574         /// The property cascade chaining set is possible. For example, this (view.MaximumSize.Width = 1;) is possible.
1575         /// </remarks>
1576         /// <since_tizen> 3 </since_tizen>
1577         public Size2D MaximumSize
1578         {
1579             get
1580             {
1581                 Size2D tmp = (Size2D)GetValue(MaximumSizeProperty);
1582                 return new Size2D(OnMaximumSizeChanged, tmp.Width, tmp.Height);
1583             }
1584             set
1585             {
1586                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
1587                 // MATCH_PARENT spec + parent container size can be used to limit
1588                 if (_layout != null)
1589                 {
1590                     // Note: it only works if minimum size is >= than natural size.
1591                     // To force the size it should be done through the width&height spec or Size2D.
1592                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
1593                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
1594                     _layout.RequestLayout();
1595                 }
1596                 SetValue(MaximumSizeProperty, value);
1597                 NotifyPropertyChanged();
1598             }
1599         }
1600
1601         /// <summary>
1602         /// Gets or sets whether a child view inherits it's parent's position.<br />
1603         /// Default is to inherit.<br />
1604         /// 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 />
1605         /// </summary>
1606         /// <since_tizen> 3 </since_tizen>
1607         public bool InheritPosition
1608         {
1609             get
1610             {
1611                 return (bool)GetValue(InheritPositionProperty);
1612             }
1613             set
1614             {
1615                 SetValue(InheritPositionProperty, value);
1616                 NotifyPropertyChanged();
1617             }
1618         }
1619
1620         /// <summary>
1621         /// Gets or sets the clipping behavior (mode) of it's children.
1622         /// </summary>
1623         /// <since_tizen> 3 </since_tizen>
1624         public ClippingModeType ClippingMode
1625         {
1626             get
1627             {
1628                 return (ClippingModeType)GetValue(ClippingModeProperty);
1629             }
1630             set
1631             {
1632                 SetValue(ClippingModeProperty, value);
1633                 NotifyPropertyChanged();
1634             }
1635         }
1636
1637         /// <summary>
1638         /// Gets the number of renderers held by the view.
1639         /// </summary>
1640         /// <since_tizen> 3 </since_tizen>
1641         public uint RendererCount
1642         {
1643             get
1644             {
1645                 return GetRendererCount();
1646             }
1647         }
1648
1649         /// <summary>
1650         /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
1651         /// </summary>
1652         /// <remarks>
1653         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
1654         /// </remarks>
1655         /// <since_tizen> 3 </since_tizen>
1656         [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
1657             "Like: " +
1658             "View view = new View(); " +
1659             "view.PivotPoint = PivotPoint.Center; " +
1660             "view.PositionUsesPivotPoint = true;")]
1661         [EditorBrowsable(EditorBrowsableState.Never)]
1662         public Position AnchorPoint
1663         {
1664             get
1665             {
1666                 Position temp = new Position(0.0f, 0.0f, 0.0f);
1667                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
1668                 return new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
1669             }
1670             set
1671             {
1672                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
1673                 NotifyPropertyChanged();
1674             }
1675         }
1676
1677         /// <summary>
1678         /// Sets the size of a view for the width, the height and the depth.<br />
1679         /// Geometry can be scaled to fit within this area.<br />
1680         /// This does not interfere with the view's scale factor.<br />
1681         /// The views default depth is the minimum of width and height.<br />
1682         /// </summary>
1683         /// <remarks>
1684         /// <para>
1685         /// Animatable - This property can be animated using <c>Animation</c> class.
1686         /// </para>
1687         /// The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.
1688         /// </remarks>
1689         /// <since_tizen> 5 </since_tizen>
1690         public Size Size
1691         {
1692             get
1693             {
1694                 Size tmp = (Size)GetValue(SizeProperty);
1695                 return new Size(OnSizeChanged, tmp.Width, tmp.Height, tmp.Depth);
1696             }
1697             set
1698             {
1699                 SetValue(SizeProperty, value);
1700                 // Set Specification so when layouts measure this View it matches the value set here.
1701                 // All Views are currently Layouts.
1702                 WidthSpecification = (int)Math.Ceiling(value.Width);
1703                 HeightSpecification = (int)Math.Ceiling(value.Height);
1704                 NotifyPropertyChanged();
1705             }
1706         }
1707
1708         /// <summary>
1709         /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
1710         /// </summary>
1711         /// <since_tizen> 3 </since_tizen>
1712         [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
1713             "Like: " +
1714             "Container parent =  view.GetParent(); " +
1715             "View view = parent as View;")]
1716         [EditorBrowsable(EditorBrowsableState.Never)]
1717         public new View Parent
1718         {
1719             get
1720             {
1721                 View ret;
1722                 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
1723                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1724                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
1725
1726                 if (basehandle is Layer layer)
1727                 {
1728                     ret = new View(Layer.getCPtr(layer).Handle, false);
1729                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
1730                 }
1731                 else
1732                 {
1733                     ret = basehandle as View;
1734                 }
1735
1736                 Interop.BaseHandle.delete_BaseHandle(CPtr);
1737                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1738
1739                 if (NDalicPINVOKE.SWIGPendingException.Pending)
1740                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1741                 return ret;
1742             }
1743         }
1744
1745         /// <summary>
1746         /// Gets/Sets whether inherit parent's the layout Direction.
1747         /// </summary>
1748         /// <since_tizen> 4 </since_tizen>
1749         public bool InheritLayoutDirection
1750         {
1751             get
1752             {
1753                 return (bool)GetValue(InheritLayoutDirectionProperty);
1754             }
1755             set
1756             {
1757                 SetValue(InheritLayoutDirectionProperty, value);
1758                 NotifyPropertyChanged();
1759             }
1760         }
1761
1762         /// <summary>
1763         /// Gets/Sets the layout Direction.
1764         /// </summary>
1765         /// <since_tizen> 4 </since_tizen>
1766         public ViewLayoutDirectionType LayoutDirection
1767         {
1768             get
1769             {
1770                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
1771             }
1772             set
1773             {
1774                 SetValue(LayoutDirectionProperty, value);
1775                 NotifyPropertyChanged();
1776                 _layout?.RequestLayout();
1777             }
1778         }
1779
1780         /// <summary>
1781         /// Gets or sets the Margin for use in layout.
1782         /// </summary>
1783         /// <remarks>
1784         /// Margin property is supported by Layout algorithms and containers.
1785         /// Please Set Layout if you want to use Margin property.
1786         /// The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.
1787         /// </remarks>
1788         /// <since_tizen> 4 </since_tizen>
1789         public Extents Margin
1790         {
1791             get
1792             {
1793                 // If View has a Layout then margin is stored in Layout.
1794                 if (Layout != null)
1795                 {
1796                     return Layout.Margin;
1797                 }
1798                 else
1799                 {
1800                     // If Layout not set then return margin stored in View.
1801                     Extents temp = (Extents)GetValue(MarginProperty);
1802                     return new Extents(OnMarginChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1803                 }
1804                 // Two return points to prevent creating a zeroed Extent native object before assignment
1805             }
1806             set
1807             {
1808                 if (Layout != null)
1809                 {
1810                     // Layout set so store Margin in LayoutItem instead of View.
1811                     // If View stores the Margin too then the Legacy Size Negotiation will
1812                     // overwrite the position and size values measured in the Layouting.
1813                     Layout.Margin = value;
1814                     SetValue(MarginProperty, new Extents(0,0,0,0));
1815                     _layout?.RequestLayout();
1816                 }
1817                 else
1818                 {
1819                     SetValue(MarginProperty, value);
1820                 }
1821                 NotifyPropertyChanged();
1822                 _layout?.RequestLayout();
1823             }
1824         }
1825
1826         ///<summary>
1827         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
1828         ///</summary>
1829         /// <since_tizen> 6 </since_tizen>
1830         public int WidthSpecification
1831         {
1832             get
1833             {
1834                 return _widthPolicy;
1835             }
1836             set
1837             {
1838                 _widthPolicy = value;
1839                 if (_widthPolicy >= 0)
1840                 {
1841                     _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
1842
1843                     if(_heightPolicy>=0) // Policy an exact value
1844                     {
1845                         Size2D.Width = _widthPolicy;
1846                     }
1847                     else
1848                     {
1849                         // Store _heightPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
1850                         // Size2D height will store the specification value (negative number) this will then be applied to the
1851                         // HeightSpecification when the Size2D callback is invoked.
1852                         Size2D = new Size2D(_widthPolicy,_heightPolicy);
1853                     }
1854                 }
1855                 _layout?.RequestLayout();
1856             }
1857         }
1858
1859         ///<summary>
1860         /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
1861         ///</summary>
1862         /// <since_tizen> 6 </since_tizen>
1863         public int HeightSpecification
1864         {
1865             get
1866             {
1867                 return _heightPolicy;
1868             }
1869             set
1870             {
1871                 _heightPolicy = value;
1872                 if (_heightPolicy >= 0)
1873                 {
1874                     _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
1875
1876                     if(_widthPolicy>=0) // Policy an exact value
1877                     {
1878                         Size2D.Height = _heightPolicy;
1879                     }
1880                     else
1881                     {
1882                         // Store widthPolicy in the Size2D memember as will be reset to 0 by a Size2D callback.
1883                         // Size2D height will store the specification value (negative number) this will then be applied to the
1884                         // HeightSpecification when the Size2D callback is invoked.
1885                         Size2D = new Size2D(_widthPolicy,_heightPolicy);
1886                     }
1887
1888                 }
1889                _layout?.RequestLayout();
1890             }
1891         }
1892
1893         ///<summary>
1894         /// Gets the List of transitions for this View.
1895         ///</summary>
1896         /// <since_tizen> 6 </since_tizen>
1897         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
1898         {
1899             get
1900             {
1901                 if (_layoutTransitions == null)
1902                 {
1903                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
1904                 }
1905                 return _layoutTransitions;
1906             }
1907         }
1908
1909         ///<summary>
1910         /// Set a layout transitions for this View.
1911         ///</summary>
1912         /// <remarks>
1913         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
1914         /// </remarks>
1915         /// <since_tizen> 6 </since_tizen>
1916         public LayoutTransition LayoutTransition
1917         {
1918             set
1919             {
1920                 if (_layoutTransitions == null)
1921                 {
1922                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
1923                 }
1924                 LayoutTransitionsHelper.AddTransitionForCondition(_layoutTransitions,value.Condition,value, true);
1925
1926                 AttachTransitionsToChildren(value);
1927             }
1928         }
1929
1930         /// <summary>
1931         /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
1932         /// </summary>
1933         /// <remarks>
1934         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
1935         /// </remarks>
1936         /// <since_tizen> 4 </since_tizen>
1937         [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
1938         [EditorBrowsable(EditorBrowsableState.Never)]
1939         public Extents PaddingEX
1940         {
1941             get
1942             {
1943                 Extents temp = new Extents(0, 0, 0, 0);
1944                 GetProperty(View.Property.PADDING).Get(temp);
1945                 return new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
1946             }
1947             set
1948             {
1949                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
1950                 NotifyPropertyChanged();
1951                 _layout?.RequestLayout();
1952             }
1953         }
1954
1955         /// <since_tizen> 6 </since_tizen>
1956         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1957         [EditorBrowsable(EditorBrowsableState.Never)]
1958         public Style XamlStyle
1959         {
1960             get
1961             {
1962                 return (Style)GetValue(XamlStyleProperty);
1963             }
1964             set
1965             {
1966                 SetValue(XamlStyleProperty, value);
1967             }
1968         }
1969
1970         /// <summary>
1971         /// The Color of View. This is an RGBA value.
1972         /// </summary>
1973         /// <remarks>
1974         /// <para>
1975         /// Animatable - This property can be animated using <c>Animation</c> class.
1976         /// </para>
1977         /// The property cascade chaining set is possible. For example, this (view.Color.X = 0.1f;) is possible.
1978         /// </remarks>
1979         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1980         [EditorBrowsable(EditorBrowsableState.Never)]
1981         public Color Color
1982         {
1983             get
1984             {
1985                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1986                 GetProperty(Interop.ActorProperty.Actor_Property_COLOR_get()).Get(temp);
1987                 return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
1988             }
1989             set
1990             {
1991                 SetColor(value);
1992             }
1993         }
1994
1995         /// <summary>
1996         /// Set the layout on this View. Replaces any existing Layout.
1997         /// </summary>
1998         /// <since_tizen> 6 </since_tizen>
1999         public LayoutItem Layout
2000         {
2001             get
2002             {
2003                 return _layout;
2004             }
2005             set
2006             {
2007                 // Do nothing if layout provided is already set on this View.
2008                 if (value == _layout)
2009                 {
2010                     return;
2011                 }
2012
2013                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
2014                 layoutingDisabled = false;
2015                 layoutSet = true;
2016
2017                 // If new layout being set already has a owner then that owner receives a replacement default layout.
2018                 // First check if the layout to be set already has a owner.
2019                 if (value?.Owner != null)
2020                 {
2021                     // Previous owner of the layout gets a default layout as a replacement.
2022                     value.Owner.Layout = new LayoutGroup();
2023
2024                     // Copy Margin and Padding to replacement LayoutGroup.
2025                     value.Owner.Layout.Margin = value.Margin;
2026                     value.Owner.Layout.Padding = value.Padding;
2027                 }
2028
2029                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2030                 // View if no replacement. Previously margin and padding values would have been moved from
2031                 // the View to the layout.
2032                 if (_layout != null ) // Existing layout
2033                 {
2034                     if (value != null)
2035                     {
2036                         // Existing layout being replaced so copy over margin and padding values.
2037                         value.Margin = _layout.Margin;
2038                         value.Padding = _layout.Padding;
2039                     }
2040                     else
2041                     {
2042                       // Layout not being replaced so restore margin and padding to View.
2043                       SetValue(MarginProperty, _layout.Margin);
2044                       SetValue(PaddingProperty, _layout.Padding);
2045                       NotifyPropertyChanged();
2046                     }
2047                 }
2048                 else
2049                 {
2050                     // First Layout to be added to the View hence copy
2051
2052                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2053                     if (value !=null)
2054                     {
2055                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
2056                         {
2057                             // If View already has a margin set then store it in Layout instead.
2058                             value.Margin = Margin;
2059                             SetValue(MarginProperty, new Extents(0,0,0,0));
2060                             NotifyPropertyChanged();
2061                         }
2062
2063                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
2064                         {
2065                             // If View already has a padding set then store it in Layout instead.
2066                             value.Padding = Padding;
2067                             SetValue(PaddingProperty, new Extents(0,0,0,0));
2068                             NotifyPropertyChanged();
2069                         }
2070                     }
2071                 }
2072
2073                 // Remove existing layout from it's parent layout group.
2074                 _layout?.Unparent();
2075
2076                 // Set layout to this view
2077                 SetLayout(value);
2078             }
2079         }
2080
2081         /// <summary>
2082         /// The weight of the View, used to share available space in a layout with siblings.
2083         /// </summary>
2084         /// <since_tizen> 6 </since_tizen>
2085         public float Weight
2086         {
2087             get
2088             {
2089                 return _weight;
2090             }
2091             set
2092             {
2093                 _weight = value;
2094                 _layout?.RequestLayout();
2095             }
2096         }
2097
2098         /// <summary>
2099         ///  Whether to load the BackgroundImage synchronously.
2100         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2101         ///  Note: For Normal Quad images only.
2102         /// </summary>
2103         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2104         [EditorBrowsable(EditorBrowsableState.Never)]
2105         public bool BackgroundImageSynchronosLoading
2106         {
2107             get
2108             {
2109                 return _backgroundImageSynchronosLoading;
2110             }
2111             set
2112             {
2113                 _backgroundImageSynchronosLoading = value;
2114                 string bgUrl = "";
2115                 int visualType = 0;
2116                 Background.Find(Visual.Property.Type)?.Get(out visualType);
2117                 if (visualType == (int)Visual.Type.Image)
2118                 {
2119                     Background.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
2120                 }
2121
2122                 if (bgUrl.Length != 0)
2123                 {
2124                     PropertyMap bgMap = this.Background;
2125                     bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
2126                     Background = bgMap;
2127                 }
2128             }
2129         }
2130
2131         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2132         [EditorBrowsable(EditorBrowsableState.Never)]
2133         public Vector2 UpdateSizeHint
2134         {
2135             get
2136             {
2137                 return (Vector2)GetValue(UpdateSizeHintProperty);
2138             }
2139             set
2140             {
2141                 SetValue(UpdateSizeHintProperty, value);
2142                 NotifyPropertyChanged();
2143             }
2144         }
2145
2146         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
2147         [EditorBrowsable(EditorBrowsableState.Never)]
2148         public string[] TransitionNames
2149         {
2150             get
2151             {
2152                 return transitionNames;
2153             }
2154             set
2155             {
2156                 transitionNames = value;
2157                 LoadTransitions();
2158             }
2159         }
2160
2161         /// <summary>
2162         /// Get attribues, it is abstract function and must be override.
2163         /// </summary>
2164         /// <since_tizen> 6 </since_tizen>
2165         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2166         [EditorBrowsable(EditorBrowsableState.Never)]
2167         protected virtual ViewStyle GetViewStyle()
2168         {
2169             viewStyle = new ViewStyle();
2170             return viewStyle;
2171         }
2172
2173         internal static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2174         {
2175             var view = (View)bindable;
2176             view.backgroundColorSelector.Clone((Selector<Color>)newValue);
2177         },
2178         defaultValueCreator: (bindable) =>
2179         {
2180             var view = (View)bindable;
2181             return view.backgroundColorSelector;
2182         });
2183         private TriggerableSelector<Color> _backgroundColorSelector;
2184         private TriggerableSelector<Color> backgroundColorSelector
2185         {
2186             get
2187             {
2188                 if (null == _backgroundColorSelector)
2189                 {
2190                     _backgroundColorSelector = new TriggerableSelector<Color>(this, BackgroundColorProperty);
2191                 }
2192                 return _backgroundColorSelector;
2193             }
2194         }
2195
2196         internal static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2197         {
2198             var view = (View)bindable;
2199             view.opacitySelector.Clone((Selector<float?>)newValue);
2200         },
2201         defaultValueCreator: (bindable) =>
2202         {
2203             var view = (View)bindable;
2204             return view.opacitySelector;
2205         });
2206         private TriggerableSelector<float?> _opacitySelector;
2207         private TriggerableSelector<float?> opacitySelector
2208         {
2209             get
2210             {
2211                 if (null == _opacitySelector)
2212                 {
2213                     _opacitySelector = new TriggerableSelector<float?>(this, OpacityProperty);
2214                 }
2215                 return _opacitySelector;
2216             }
2217         }
2218
2219         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2220         [EditorBrowsable(EditorBrowsableState.Never)]
2221         public virtual void ApplyStyle(ViewStyle viewStyle)
2222         {
2223             if (null == viewStyle)
2224             {
2225                 return;
2226             }
2227
2228             if (this.viewStyle == viewStyle)
2229             {
2230                 return;
2231             }
2232
2233             if (null != this.viewStyle)
2234             {
2235                 simpleBinding.Clear();
2236             }
2237
2238             this.viewStyle = viewStyle;
2239
2240             Dictionary<string, BindableProperty> bindablePropertyOfView;
2241             Type viewType = GetType();
2242
2243             Dictionary<string, BindableProperty> bindablePropertyOfStyle;
2244             Type styleType = viewStyle.GetType();
2245
2246             BindableProperty.GetBindablePropertysOfType(viewType, out bindablePropertyOfView);
2247             BindableProperty.GetBindablePropertysOfType(styleType, out bindablePropertyOfStyle);
2248
2249             if (null != bindablePropertyOfView && null != bindablePropertyOfStyle)
2250             {
2251                 foreach (KeyValuePair<string, BindableProperty> keyValuePair in bindablePropertyOfStyle)
2252                 {
2253                     BindableProperty viewProperty;
2254                     bindablePropertyOfView.TryGetValue(keyValuePair.Key, out viewProperty);
2255
2256                     if (null != viewProperty)
2257                     {
2258                         object value = viewStyle.GetValue(keyValuePair.Value);
2259
2260                         if (null != value)
2261                         {
2262                             SetValue(viewProperty, value);
2263                         }
2264
2265                         simpleBinding.Bind(viewStyle, keyValuePair.Value, this, viewProperty, BindingDirection.TwoWay);
2266                     }
2267                 }
2268             }
2269         }
2270
2271         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2272         [EditorBrowsable(EditorBrowsableState.Never)]
2273         private BundledPipe simpleBinding = new BundledPipe();
2274     }
2275 }