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