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