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