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