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