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