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