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