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