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