[NUI] Fix ConvertIdToView (#877)
[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.IO;
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.Binding;
23
24 namespace Tizen.NUI.BaseComponents
25 {
26     /// <summary>
27     /// The View layout Direction type.
28     /// </summary>
29     /// <since_tizen> 4 </since_tizen>
30     public enum ViewLayoutDirectionType
31     {
32         /// <summary>
33         /// Left to right.
34         /// </summary>
35         /// <since_tizen> 4 </since_tizen>
36         LTR,
37         /// <summary>
38         /// Right to left.
39         /// </summary>
40         /// <since_tizen> 4 </since_tizen>
41         RTL
42     }
43
44     /// <summary>
45     /// [Draft] Available policies for layout parameters
46     /// </summary>
47     /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
48     [EditorBrowsable(EditorBrowsableState.Never)]
49     public static class LayoutParamPolicies
50     {
51         /// <summary>
52         /// Constant which indicates child size should match parent size
53         /// </summary>
54        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
55        [EditorBrowsable(EditorBrowsableState.Never)]
56         public const int MatchParent = -1;
57         /// <summary>
58         /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
59         /// </summary>
60         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public const int WrapContent = -2;
63     }
64
65     /// <summary>
66     /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced.
67     /// </summary>
68     internal enum ChildLayoutData
69     {
70         /// <summary>
71         /// Constant which indicates child size should match parent size
72         /// </summary>
73         MatchParent = LayoutParamPolicies.MatchParent,
74         /// <summary>
75         /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
76         /// </summary>
77         WrapContent = LayoutParamPolicies.WrapContent,
78     }
79
80     internal enum ResourceLoadingStatusType
81     {
82         Invalid = -1,
83         Preparing = 0,
84         Ready,
85         Failed,
86     }
87
88     /// <summary>
89     /// View is the base class for all views.
90     /// </summary>
91     /// <since_tizen> 3 </since_tizen>
92     public class View : Container
93     {
94         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
95         [EditorBrowsable(EditorBrowsableState.Never)]
96         public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
97         {
98             var view = (View)bindable;
99             if (newValue != null)
100             {
101                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
102             }
103         },
104         defaultValueCreator: (bindable) =>
105         {
106             var view = (View)bindable;
107             string temp;
108             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
109             return temp;
110         });
111         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
112         [EditorBrowsable(EditorBrowsableState.Never)]
113         public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
114         {
115             var view = (View)bindable;
116             if (newValue != null)
117             {
118                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
119             }
120         },
121         defaultValueCreator: (bindable) =>
122         {
123             var view = (View)bindable;
124             Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
125
126             Tizen.NUI.PropertyMap background = view.Background;
127             int visualType = 0;
128             background.Find(Visual.Property.Type)?.Get(out visualType);
129             if (visualType == (int)Visual.Type.Color)
130             {
131                 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
132             }
133
134             return backgroundColor;
135         });
136         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
137         [EditorBrowsable(EditorBrowsableState.Never)]
138         public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
139         {
140             var view = (View)bindable;
141             if (newValue != null)
142             {
143                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
144             }
145         },
146         defaultValueCreator: (bindable) =>
147         {
148             var view = (View)bindable;
149             string backgroundImage = "";
150
151             Tizen.NUI.PropertyMap background = view.Background;
152             int visualType = 0;
153             background.Find(Visual.Property.Type)?.Get(out visualType);
154             if (visualType == (int)Visual.Type.Image)
155             {
156                 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
157             }
158
159             return backgroundImage;
160         });
161         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
162         [EditorBrowsable(EditorBrowsableState.Never)]
163         public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
164         {
165             var view = (View)bindable;
166             if (newValue != null)
167             {
168                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
169             }
170         },
171         defaultValueCreator: (bindable) =>
172         {
173             var view = (View)bindable;
174             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
175             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
176             return temp;
177         });
178         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
179         [EditorBrowsable(EditorBrowsableState.Never)]
180         public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
181         {
182             var view = (View)bindable;
183             if (newValue != null)
184             {
185                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
186             }
187         },
188         defaultValueCreator: (bindable) =>
189         {
190             var view = (View)bindable;
191             int temp = 0;
192             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
193             {
194                 NUILog.Error("State get error!");
195             }
196             switch (temp)
197             {
198                 case 0: return States.Normal;
199                 case 1: return States.Focused;
200                 case 2: return States.Disabled;
201                 default: return States.Normal;
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 static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
207         {
208             var view = (View)bindable;
209             string valueToString = "";
210             if (newValue != null)
211             {
212                 switch ((States)newValue)
213                 {
214                     case States.Normal: { valueToString = "NORMAL"; break; }
215                     case States.Focused: { valueToString = "FOCUSED"; break; }
216                     case States.Disabled: { valueToString = "DISABLED"; break; }
217                     default: { valueToString = "NORMAL"; break; }
218                 }
219                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
220             }
221         },
222         defaultValueCreator: (bindable) =>
223         {
224             var view = (View)bindable;
225             string temp;
226             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
227             {
228                 NUILog.Error("subState get error!");
229             }
230             switch (temp)
231             {
232                 case "NORMAL": return States.Normal;
233                 case "FOCUSED": return States.Focused;
234                 case "DISABLED": return States.Disabled;
235                 default: return States.Normal;
236             }
237         });
238         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
239         [EditorBrowsable(EditorBrowsableState.Never)]
240         public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
241         {
242             var view = (View)bindable;
243             if (newValue != null)
244             {
245                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
246             }
247         },
248         defaultValueCreator: (bindable) =>
249         {
250             var view = (View)bindable;
251             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
252             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
253             return temp;
254         });
255
256         /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
257         public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
258         {
259             var view = (View)bindable;
260             if (newValue != null)
261             {
262                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
263             }
264         },
265         defaultValueCreator: (bindable) =>
266         {
267             var view = (View)bindable;
268             float temp = 0.0f;
269             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
270             return temp;
271         });
272
273         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
274         [EditorBrowsable(EditorBrowsableState.Never)]
275         public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
276         {
277             var view = (View)bindable;
278             if (newValue != null)
279             {
280                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
281             }
282         },
283         defaultValueCreator: (bindable) =>
284         {
285             var view = (View)bindable;
286             int temp = 0;
287             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
288             return temp;
289         });
290         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
291         [EditorBrowsable(EditorBrowsableState.Never)]
292         public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
293         {
294             var view = (View)bindable;
295             if (newValue != null)
296             {
297                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
298             }
299         },
300         defaultValueCreator: (bindable) =>
301         {
302             var view = (View)bindable;
303             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
304             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
305             return temp;
306         });
307         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
308         [EditorBrowsable(EditorBrowsableState.Never)]
309         public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
310         {
311             var view = (View)bindable;
312             if (newValue != null)
313             {
314                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
315             }
316         },
317         defaultValueCreator: (bindable) =>
318         {
319             var view = (View)bindable;
320             Vector2 temp = new Vector2(0.0f, 0.0f);
321             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
322             return temp;
323         });
324         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
325         [EditorBrowsable(EditorBrowsableState.Never)]
326         public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
327         {
328             var view = (View)bindable;
329             if (newValue != null)
330             {
331                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
332             }
333         },
334         defaultValueCreator: (bindable) =>
335         {
336             var view = (View)bindable;
337             float temp = 0.0f;
338             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
339             return temp;
340         });
341         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
342         [EditorBrowsable(EditorBrowsableState.Never)]
343         public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
344         {
345             var view = (View)bindable;
346             if (newValue != null)
347             {
348                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
349             }
350         },
351         defaultValueCreator: (bindable) =>
352         {
353             var view = (View)bindable;
354             float temp = 0.0f;
355             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
356             return temp;
357         });
358         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
359         [EditorBrowsable(EditorBrowsableState.Never)]
360         public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
361         {
362             var view = (View)bindable;
363             string valueToString = "";
364
365             if (newValue != null)
366             {
367                 switch ((HorizontalAlignmentType)newValue)
368                 {
369                     case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
370                     case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
371                     case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
372                     default: { valueToString = "left"; break; }
373                 }
374                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
375             }
376         },
377         defaultValueCreator: (bindable) =>
378         {
379             var view = (View)bindable;
380             string temp;
381             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
382             {
383                 NUILog.Error("CellHorizontalAlignment get error!");
384             }
385
386             switch (temp)
387             {
388                 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
389                 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
390                 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
391                 default: return Tizen.NUI.HorizontalAlignmentType.Left;
392             }
393         });
394         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
395         [EditorBrowsable(EditorBrowsableState.Never)]
396         public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
397         {
398             var view = (View)bindable;
399             string valueToString = "";
400
401             if (newValue != null)
402             {
403                 switch ((VerticalAlignmentType)newValue)
404                 {
405                     case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
406                     case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
407                     case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
408                     default: { valueToString = "top"; break; }
409                 }
410                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
411             }
412         },
413         defaultValueCreator: (bindable) =>
414         {
415             var view = (View)bindable;
416             string temp;
417             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
418             {
419                 NUILog.Error("CellVerticalAlignment get error!");
420             }
421
422             switch (temp)
423             {
424                 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
425                 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
426                 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
427                 default: return Tizen.NUI.VerticalAlignmentType.Top;
428             }
429         });
430
431         /// <summary>
432         /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
433         /// This needs to be hidden as inhouse API until all applications using it have been updated.  Do not make public.
434         /// </summary>
435         [EditorBrowsable(EditorBrowsableState.Never)]
436         public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
437         {
438             var view = (View)bindable;
439             if (newValue != null)
440             {
441                 view.Weight = (float)newValue;
442             }
443         },
444
445         defaultValueCreator: (bindable) =>
446         {
447             var view = (View)bindable;
448             return view.Weight;
449         });
450
451         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452         [EditorBrowsable(EditorBrowsableState.Never)]
453         public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
454         {
455             var view = (View)bindable;
456             if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
457             else { view.LeftFocusableViewId = -1; }
458         },
459         defaultValueCreator: (bindable) =>
460         {
461             var view = (View)bindable;
462             if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
463             return null;
464         });
465         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
466         [EditorBrowsable(EditorBrowsableState.Never)]
467         public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
468         {
469             var view = (View)bindable;
470             if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
471             else { view.RightFocusableViewId = -1; }
472         },
473         defaultValueCreator: (bindable) =>
474         {
475             var view = (View)bindable;
476             if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
477             return null;
478         });
479         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
480         [EditorBrowsable(EditorBrowsableState.Never)]
481         public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
482         {
483             var view = (View)bindable;
484             if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
485             else { view.UpFocusableViewId = -1; }
486         },
487         defaultValueCreator: (bindable) =>
488         {
489             var view = (View)bindable;
490             if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
491             return null;
492         });
493         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
494         [EditorBrowsable(EditorBrowsableState.Never)]
495         public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
496         {
497             var view = (View)bindable;
498             if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
499             else { view.DownFocusableViewId = -1; }
500         },
501         defaultValueCreator: (bindable) =>
502         {
503             var view = (View)bindable;
504             if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
505             return null;
506         });
507         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
508         [EditorBrowsable(EditorBrowsableState.Never)]
509         public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
510         {
511             var view = (View)bindable;
512             if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
513         },
514         defaultValueCreator: (bindable) =>
515         {
516             var view = (View)bindable;
517             return view.IsKeyboardFocusable();
518         });
519         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520         [EditorBrowsable(EditorBrowsableState.Never)]
521         public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
522         {
523             var view = (View)bindable;
524             if (newValue != null)
525             {
526                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
527             }
528         },
529         defaultValueCreator: (bindable) =>
530         {
531             var view = (View)bindable;
532             Size temp = new Size(0.0f, 0.0f, 0.0f);
533             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
534             Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
535             return size;
536         });
537         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538         [EditorBrowsable(EditorBrowsableState.Never)]
539         public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
540         {
541             var view = (View)bindable;
542             if (newValue != null)
543             {
544                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
545             }
546         },
547         defaultValueCreator: (bindable) =>
548         {
549             var view = (View)bindable;
550             float temp = 0.0f;
551             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
552             return temp;
553         });
554         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
555         [EditorBrowsable(EditorBrowsableState.Never)]
556         public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
557         {
558             var view = (View)bindable;
559             if (newValue != null)
560             {
561                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
562             }
563         },
564         defaultValueCreator: (bindable) =>
565         {
566             var view = (View)bindable;
567             Position temp = new Position(0.0f, 0.0f, 0.0f);
568             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
569             return new Position2D(temp);
570         });
571         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
572         [EditorBrowsable(EditorBrowsableState.Never)]
573         public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
574         {
575             var view = (View)bindable;
576             if (newValue != null)
577             {
578                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
579             }
580         },
581         defaultValueCreator: (bindable) =>
582         {
583             var view = (View)bindable;
584             bool temp = false;
585             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
586             return temp;
587         });
588         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
589         [EditorBrowsable(EditorBrowsableState.Never)]
590         public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
591         {
592             var view = (View)bindable;
593             int value;
594             if (newValue != null)
595             {
596                 value = (int)newValue;
597                 if (value < 0)
598                 {
599                     NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
600                     return;
601                 }
602                 var siblings = view.GetParent()?.Children;
603                 if (siblings != null)
604                 {
605                     int currentOrder = siblings.IndexOf(view);
606                     if (value != currentOrder)
607                     {
608                         if (value == 0) { view.LowerToBottom(); }
609                         else if (value < siblings.Count - 1)
610                         {
611                             if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
612                             else { view.LowerBelow(siblings[value]); }
613                         }
614                         else { view.RaiseToTop(); }
615                     }
616                 }
617             }
618         },
619         defaultValueCreator: (bindable) =>
620         {
621             var view = (View)bindable;
622             var parentChildren = view.GetParent()?.Children;
623             int currentOrder = 0;
624             if (parentChildren != null)
625             {
626                 currentOrder = parentChildren.IndexOf(view);
627
628                 if (currentOrder < 0) { return 0; }
629                 else if (currentOrder < parentChildren.Count) { return currentOrder; }
630             }
631
632             return 0;
633         });
634         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
635         [EditorBrowsable(EditorBrowsableState.Never)]
636         public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
637         {
638             var view = (View)bindable;
639             if (newValue != null)
640             {
641                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
642             }
643         },
644         defaultValueCreator: (bindable) =>
645         {
646             var view = (View)bindable;
647             Position temp = new Position(0.0f, 0.0f, 0.0f);
648             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
649             return temp;
650         }
651         );
652         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
653         [EditorBrowsable(EditorBrowsableState.Never)]
654         public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
655         {
656             var view = (View)bindable;
657             if (newValue != null)
658             {
659                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
660             }
661         },
662         defaultValueCreator: (bindable) =>
663         {
664             var view = (View)bindable;
665             Position temp = new Position(0.0f, 0.0f, 0.0f);
666             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
667             return temp;
668         });
669         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670         [EditorBrowsable(EditorBrowsableState.Never)]
671         public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
672         {
673             var view = (View)bindable;
674             if (newValue != null)
675             {
676                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
677             }
678         },
679         defaultValueCreator: (bindable) =>
680         {
681             var view = (View)bindable;
682             float temp = 0.0f;
683             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
684             return temp;
685         });
686         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
687         [EditorBrowsable(EditorBrowsableState.Never)]
688         public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
689         {
690             var view = (View)bindable;
691             if (newValue != null)
692             {
693                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
694             }
695         },
696         defaultValueCreator: (bindable) =>
697         {
698             var view = (View)bindable;
699             float temp = 0.0f;
700             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
701             return temp;
702         });
703         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
704         [EditorBrowsable(EditorBrowsableState.Never)]
705         public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
706         {
707             var view = (View)bindable;
708             if (newValue != null)
709             {
710                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
711             }
712         },
713         defaultValueCreator: (bindable) =>
714         {
715             var view = (View)bindable;
716             Position temp = new Position(0.0f, 0.0f, 0.0f);
717             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
718             return temp;
719         });
720         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
721         [EditorBrowsable(EditorBrowsableState.Never)]
722         public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
723         {
724             var view = (View)bindable;
725             if (newValue != null)
726             {
727                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
728             }
729         },
730         defaultValueCreator: (bindable) =>
731         {
732             var view = (View)bindable;
733             float temp = 0.0f;
734             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
735             return temp;
736         });
737         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
738         [EditorBrowsable(EditorBrowsableState.Never)]
739         public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
740         {
741             var view = (View)bindable;
742             if (newValue != null)
743             {
744                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
745             }
746         },
747         defaultValueCreator: (bindable) =>
748         {
749             var view = (View)bindable;
750             float temp = 0.0f;
751             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
752             return temp;
753         });
754         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
755         [EditorBrowsable(EditorBrowsableState.Never)]
756         public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
757         {
758             var view = (View)bindable;
759             if (newValue != null)
760             {
761                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
762             }
763         },
764         defaultValueCreator: (bindable) =>
765         {
766             var view = (View)bindable;
767             float temp = 0.0f;
768             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
769             return temp;
770         });
771         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
772         [EditorBrowsable(EditorBrowsableState.Never)]
773         public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
774         {
775             var view = (View)bindable;
776             if (newValue != null)
777             {
778                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
779             }
780         },
781         defaultValueCreator: (bindable) =>
782         {
783             var view = (View)bindable;
784             Rotation temp = new Rotation();
785             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
786             return temp;
787         });
788         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
789         [EditorBrowsable(EditorBrowsableState.Never)]
790         public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
791         {
792             var view = (View)bindable;
793             if (newValue != null)
794             {
795                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
796             }
797         },
798         defaultValueCreator: (bindable) =>
799         {
800             var view = (View)bindable;
801             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
802             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
803             return temp;
804         });
805         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
806         [EditorBrowsable(EditorBrowsableState.Never)]
807         public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
808         {
809             var view = (View)bindable;
810             if (newValue != null)
811             {
812                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
813             }
814         },
815         defaultValueCreator: (bindable) =>
816         {
817             var view = (View)bindable;
818             float temp = 0.0f;
819             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
820             return temp;
821         });
822         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
823         [EditorBrowsable(EditorBrowsableState.Never)]
824         public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
825         {
826             var view = (View)bindable;
827             if (newValue != null)
828             {
829                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
830             }
831         },
832         defaultValueCreator: (bindable) =>
833         {
834             var view = (View)bindable;
835             float temp = 0.0f;
836             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
837             return temp;
838         });
839         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
840         [EditorBrowsable(EditorBrowsableState.Never)]
841         public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
842         {
843             var view = (View)bindable;
844             if (newValue != null)
845             {
846                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
847             }
848         },
849         defaultValueCreator: (bindable) =>
850         {
851             var view = (View)bindable;
852             float temp = 0.0f;
853             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
854             return temp;
855         });
856         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
857         [EditorBrowsable(EditorBrowsableState.Never)]
858         public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
859         {
860             var view = (View)bindable;
861             if (newValue != null)
862             {
863                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
864             }
865         },
866         defaultValueCreator: (bindable) =>
867         {
868             var view = (View)bindable;
869             string temp;
870             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
871             return temp;
872         });
873         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
874         [EditorBrowsable(EditorBrowsableState.Never)]
875         public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
876         {
877             var view = (View)bindable;
878             if (newValue != null)
879             {
880                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
881             }
882         },
883         defaultValueCreator: (bindable) =>
884         {
885             var view = (View)bindable;
886             bool temp = false;
887             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
888             return temp;
889         });
890         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
891         [EditorBrowsable(EditorBrowsableState.Never)]
892         public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
893         {
894             var view = (View)bindable;
895             if (newValue != null)
896             {
897                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
898             }
899         },
900         defaultValueCreator: (bindable) =>
901         {
902             var view = (View)bindable;
903             bool temp = false;
904             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
905             return temp;
906         });
907         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
908         [EditorBrowsable(EditorBrowsableState.Never)]
909         public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
910         {
911             var view = (View)bindable;
912             if (newValue != null)
913             {
914                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
915             }
916         },
917         defaultValueCreator: (bindable) =>
918         {
919             var view = (View)bindable;
920             bool temp = false;
921             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
922             return temp;
923         });
924         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
925         [EditorBrowsable(EditorBrowsableState.Never)]
926         public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
927         {
928             var view = (View)bindable;
929             if (newValue != null)
930             {
931                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
932             }
933         },
934         defaultValueCreator: (bindable) =>
935         {
936             var view = (View)bindable;
937             bool temp = false;
938             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
939             return temp;
940         });
941         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
942         [EditorBrowsable(EditorBrowsableState.Never)]
943         public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
944         {
945             var view = (View)bindable;
946             if (newValue != null)
947             {
948                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
949             }
950         },
951         defaultValueCreator: (bindable) =>
952         {
953             var view = (View)bindable;
954             string temp;
955             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
956             {
957                 NUILog.Error("DrawMode get error!");
958             }
959             switch (temp)
960             {
961                 case "NORMAL": return DrawModeType.Normal;
962                 case "OVERLAY_2D": return DrawModeType.Overlay2D;
963 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
964                 case "STENCIL": return DrawModeType.Stencil;
965 #pragma warning restore CS0618
966                 default: return DrawModeType.Normal;
967             }
968         });
969         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
970         [EditorBrowsable(EditorBrowsableState.Never)]
971         public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
972         {
973             var view = (View)bindable;
974             if (newValue != null)
975             {
976                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
977             }
978         },
979         defaultValueCreator: (bindable) =>
980         {
981             var view = (View)bindable;
982             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
983             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
984             return temp;
985         });
986         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
987         [EditorBrowsable(EditorBrowsableState.Never)]
988         public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
989         {
990             var view = (View)bindable;
991             if (newValue != null)
992             {
993                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
994             }
995         },
996         defaultValueCreator: (bindable) =>
997         {
998             var view = (View)bindable;
999             string temp;
1000             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1001             {
1002                 NUILog.Error("WidthResizePolicy get error!");
1003             }
1004             switch (temp)
1005             {
1006                 case "FIXED": return ResizePolicyType.Fixed;
1007                 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1008                 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1009                 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1010                 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1011                 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1012                 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1013                 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1014                 default: return ResizePolicyType.Fixed;
1015             }
1016         });
1017         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1018         [EditorBrowsable(EditorBrowsableState.Never)]
1019         public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1020         {
1021             var view = (View)bindable;
1022             if (newValue != null)
1023             {
1024                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1025             }
1026         },
1027         defaultValueCreator: (bindable) =>
1028         {
1029             var view = (View)bindable;
1030             string temp;
1031             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1032             {
1033                 NUILog.Error("HeightResizePolicy get error!");
1034             }
1035             switch (temp)
1036             {
1037                 case "FIXED": return ResizePolicyType.Fixed;
1038                 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1039                 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1040                 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1041                 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1042                 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1043                 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1044                 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1045                 default: return ResizePolicyType.Fixed;
1046             }
1047         });
1048         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1049         [EditorBrowsable(EditorBrowsableState.Never)]
1050         public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1051         {
1052             var view = (View)bindable;
1053             string valueToString = "";
1054             if (newValue != null)
1055             {
1056                 switch ((SizeScalePolicyType)newValue)
1057                 {
1058                     case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1059                     case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1060                     case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1061                     default: { valueToString = "USE_SIZE_SET"; break; }
1062                 }
1063                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1064             }
1065         },
1066         defaultValueCreator: (bindable) =>
1067         {
1068             var view = (View)bindable;
1069             string temp;
1070             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1071             {
1072                 NUILog.Error("SizeScalePolicy get error!");
1073             }
1074             switch (temp)
1075             {
1076                 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1077                 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1078                 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1079                 default: return SizeScalePolicyType.UseSizeSet;
1080             }
1081         });
1082         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1083         [EditorBrowsable(EditorBrowsableState.Never)]
1084         public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1085         {
1086             var view = (View)bindable;
1087             if (newValue != null)
1088             {
1089                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1090             }
1091         },
1092         defaultValueCreator: (bindable) =>
1093         {
1094             var view = (View)bindable;
1095             bool temp = false;
1096             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1097             return temp;
1098         });
1099         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1100         [EditorBrowsable(EditorBrowsableState.Never)]
1101         public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1102         {
1103             var view = (View)bindable;
1104             if (newValue != null)
1105             {
1106                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1107             }
1108         },
1109         defaultValueCreator: (bindable) =>
1110         {
1111             var view = (View)bindable;
1112             bool temp = false;
1113             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1114             return temp;
1115         });
1116         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1117         [EditorBrowsable(EditorBrowsableState.Never)]
1118         public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1119         {
1120             var view = (View)bindable;
1121             if (newValue != null)
1122             {
1123                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1124             }
1125         },
1126         defaultValueCreator: (bindable) =>
1127         {
1128             var view = (View)bindable;
1129             Extents temp = new Extents(0, 0, 0, 0);
1130             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1131             return temp;
1132         });
1133         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1134         [EditorBrowsable(EditorBrowsableState.Never)]
1135         public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1136         {
1137             var view = (View)bindable;
1138             if (newValue != null)
1139             {
1140                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1141             }
1142         },
1143         defaultValueCreator: (bindable) =>
1144         {
1145             var view = (View)bindable;
1146             Size temp = new Size(0, 0, 0);
1147             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1148             return temp;
1149         });
1150         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1151         [EditorBrowsable(EditorBrowsableState.Never)]
1152         public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1153         {
1154             var view = (View)bindable;
1155             if (newValue != null)
1156             {
1157                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1158             }
1159         },
1160         defaultValueCreator: (bindable) =>
1161         {
1162             var view = (View)bindable;
1163             Size2D temp = new Size2D(0, 0);
1164             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1165             return temp;
1166         });
1167         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1168         [EditorBrowsable(EditorBrowsableState.Never)]
1169         public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1170         {
1171             var view = (View)bindable;
1172             if (newValue != null)
1173             {
1174                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1175             }
1176         },
1177         defaultValueCreator: (bindable) =>
1178         {
1179             var view = (View)bindable;
1180             Size2D temp = new Size2D(0, 0);
1181             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1182             return temp;
1183         });
1184         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1185         [EditorBrowsable(EditorBrowsableState.Never)]
1186         public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1187         {
1188             var view = (View)bindable;
1189             if (newValue != null)
1190             {
1191                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1192             }
1193         },
1194         defaultValueCreator: (bindable) =>
1195         {
1196             var view = (View)bindable;
1197             bool temp = false;
1198             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1199             return temp;
1200         });
1201         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1202         [EditorBrowsable(EditorBrowsableState.Never)]
1203         public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1204         {
1205             var view = (View)bindable;
1206             if (newValue != null)
1207             {
1208                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1209             }
1210         },
1211         defaultValueCreator: (bindable) =>
1212         {
1213             var view = (View)bindable;
1214             int temp = 0;
1215             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1216             {
1217                 NUILog.Error("ClippingMode get error!");
1218             }
1219             return (ClippingModeType)temp;
1220         });
1221         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1222         [EditorBrowsable(EditorBrowsableState.Never)]
1223         public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1224         {
1225             var view = (View)bindable;
1226             if (newValue != null)
1227             {
1228                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1229             }
1230         },
1231         defaultValueCreator: (bindable) =>
1232         {
1233             var view = (View)bindable;
1234             bool temp = false;
1235             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1236             return temp;
1237         });
1238         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1239         [EditorBrowsable(EditorBrowsableState.Never)]
1240         public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1241         {
1242             var view = (View)bindable;
1243             if (newValue != null)
1244             {
1245                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1246             }
1247         },
1248         defaultValueCreator: (bindable) =>
1249         {
1250             var view = (View)bindable;
1251             int temp;
1252             if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1253             {
1254                 NUILog.Error("LAYOUT_DIRECTION get error!");
1255             }
1256             return (ViewLayoutDirectionType)temp;
1257         });
1258         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1259         [EditorBrowsable(EditorBrowsableState.Never)]
1260         public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1261         {
1262             var view = (View)bindable;
1263             if (newValue != null)
1264             {
1265                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1266             }
1267         },
1268         defaultValueCreator: (bindable) =>
1269         {
1270             var view = (View)bindable;
1271             Extents temp = new Extents(0, 0, 0, 0);
1272             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1273             return temp;
1274         });
1275
1276         /// <summary>
1277         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
1278         /// </summary>
1279         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1280         [EditorBrowsable(EditorBrowsableState.Never)]
1281         public bool layoutSet = false;
1282
1283         /// <summary>
1284         /// Flag to allow Layouting to be disabled for Views.
1285         /// Once a View has a Layout set then any children added to Views from then on will receive
1286         /// automatic Layouts.
1287         /// </summary>
1288         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1289         [EditorBrowsable(EditorBrowsableState.Never)]
1290         public static bool layoutingDisabled{get; set;} = true;
1291
1292         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1293         private LayoutItem _layout; // Exclusive layout assigned to this View.
1294         private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
1295         private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
1296         private float _weight = 0.0f; // Weighting of child View in a Layout
1297         private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
1298         private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
1299         private bool _backgroundImageSynchronosLoading = false;
1300         private EventHandler _offWindowEventHandler;
1301         private OffWindowEventCallbackType _offWindowEventCallback;
1302         private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1303         private WheelEventCallbackType _wheelEventCallback;
1304         private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1305         private KeyCallbackType _keyCallback;
1306         private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1307         private TouchDataCallbackType _touchDataCallback;
1308         private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1309         private HoverEventCallbackType _hoverEventCallback;
1310         private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1311         private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1312         private EventHandler _keyInputFocusGainedEventHandler;
1313         private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1314         private EventHandler _keyInputFocusLostEventHandler;
1315         private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1316         private EventHandler _onRelayoutEventHandler;
1317         private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1318         private EventHandler _onWindowEventHandler;
1319         private OnWindowEventCallbackType _onWindowEventCallback;
1320         private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1321         private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1322         // Resource Ready Signal
1323         private EventHandler _resourcesLoadedEventHandler;
1324         private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1325         private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1326         private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1327
1328         private OnWindowEventCallbackType _onWindowSendEventCallback;
1329
1330         private void SendViewAddedEventToWindow(IntPtr data)
1331         {
1332             Window.Instance?.SendViewAdded(this);
1333         }
1334
1335         /// <summary>
1336         /// Creates a new instance of a view.
1337         /// </summary>
1338         /// <since_tizen> 3 </since_tizen>
1339         public View() : this(Interop.View.View_New(), true)
1340         {
1341             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1342         }
1343         internal View(View uiControl) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1344         {
1345             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1346         }
1347
1348         internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
1349         {
1350             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1351             if (HasBody())
1352             {
1353                 PositionUsesPivotPoint = false;
1354             }
1355
1356             _onWindowSendEventCallback = SendViewAddedEventToWindow;
1357             this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1358         }
1359
1360         internal View(ViewImpl implementation) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1361         {
1362             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1363         }
1364
1365         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1366         private delegate void OffWindowEventCallbackType(IntPtr control);
1367         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1368         private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1369         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1370         private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1371         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1372         private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1373         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1374         private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1375         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1376         private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1377         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1378         private delegate void ResourcesLoadedCallbackType(IntPtr control);
1379         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1380         private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1381         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1382         private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1383         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1384         private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1385         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1386         private delegate void OnRelayoutEventCallbackType(IntPtr control);
1387         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1388         private delegate void OnWindowEventCallbackType(IntPtr control);
1389         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1390         private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1391
1392         /// <summary>
1393         /// Event when a child is removed.
1394         /// </summary>
1395         /// <since_tizen> 5 </since_tizen>
1396         public event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1397         /// <summary>
1398         /// Event when a child is added.
1399         /// </summary>
1400         /// <since_tizen> 5 </since_tizen>
1401         public event EventHandler<ChildAddedEventArgs> ChildAdded;
1402
1403         /// <summary>
1404         /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1405         /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1406         /// </summary>
1407         /// <since_tizen> 3 </since_tizen>
1408         public event EventHandler FocusGained
1409         {
1410             add
1411             {
1412                 if (_keyInputFocusGainedEventHandler == null)
1413                 {
1414                     _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1415                     this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1416                 }
1417
1418                 _keyInputFocusGainedEventHandler += value;
1419             }
1420
1421             remove
1422             {
1423                 _keyInputFocusGainedEventHandler -= value;
1424
1425                 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1426                 {
1427                     this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1428                 }
1429             }
1430         }
1431
1432         /// <summary>
1433         /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1434         /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1435         /// </summary>
1436         /// <since_tizen> 3 </since_tizen>
1437         public event EventHandler FocusLost
1438         {
1439             add
1440             {
1441                 if (_keyInputFocusLostEventHandler == null)
1442                 {
1443                     _keyInputFocusLostCallback = OnKeyInputFocusLost;
1444                     this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1445                 }
1446
1447                 _keyInputFocusLostEventHandler += value;
1448             }
1449
1450             remove
1451             {
1452                 _keyInputFocusLostEventHandler -= value;
1453
1454                 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1455                 {
1456                     this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1457                 }
1458             }
1459         }
1460
1461         /// <summary>
1462         /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1463         /// The KeyPressed signal is emitted when the key event is received.<br />
1464         /// </summary>
1465         /// <since_tizen> 3 </since_tizen>
1466         public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1467         {
1468             add
1469             {
1470                 if (_keyEventHandler == null)
1471                 {
1472                     _keyCallback = OnKeyEvent;
1473                     this.KeyEventSignal().Connect(_keyCallback);
1474                 }
1475
1476                 _keyEventHandler += value;
1477             }
1478
1479             remove
1480             {
1481                 _keyEventHandler -= value;
1482
1483                 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1484                 {
1485                     this.KeyEventSignal().Disconnect(_keyCallback);
1486                 }
1487             }
1488         }
1489
1490         /// <summary>
1491         /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1492         /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1493         /// </summary>
1494         /// <since_tizen> 3 </since_tizen>
1495         public event EventHandler Relayout
1496         {
1497             add
1498             {
1499                 if (_onRelayoutEventHandler == null)
1500                 {
1501                     _onRelayoutEventCallback = OnRelayout;
1502                     this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1503                 }
1504
1505                 _onRelayoutEventHandler += value;
1506             }
1507
1508             remove
1509             {
1510                 _onRelayoutEventHandler -= value;
1511
1512                 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1513                 {
1514                     this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1515                 }
1516
1517             }
1518         }
1519
1520         /// <summary>
1521         /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1522         /// The touched signal is emitted when the touch input is received.<br />
1523         /// </summary>
1524         /// <since_tizen> 3 </since_tizen>
1525         public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1526         {
1527             add
1528             {
1529                 if (_touchDataEventHandler == null)
1530                 {
1531                     _touchDataCallback = OnTouch;
1532                     this.TouchSignal().Connect(_touchDataCallback);
1533                 }
1534
1535                 _touchDataEventHandler += value;
1536             }
1537
1538             remove
1539             {
1540                 _touchDataEventHandler -= value;
1541
1542                 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1543                 {
1544                     this.TouchSignal().Disconnect(_touchDataCallback);
1545                 }
1546
1547             }
1548         }
1549
1550         /// <summary>
1551         /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1552         /// The hovered signal is emitted when the hover input is received.<br />
1553         /// </summary>
1554         /// <since_tizen> 3 </since_tizen>
1555         public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1556         {
1557             add
1558             {
1559                 if (_hoverEventHandler == null)
1560                 {
1561                     _hoverEventCallback = OnHoverEvent;
1562                     this.HoveredSignal().Connect(_hoverEventCallback);
1563                 }
1564
1565                 _hoverEventHandler += value;
1566             }
1567
1568             remove
1569             {
1570                 _hoverEventHandler -= value;
1571
1572                 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1573                 {
1574                     this.HoveredSignal().Disconnect(_hoverEventCallback);
1575                 }
1576
1577             }
1578         }
1579
1580         /// <summary>
1581         /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1582         /// The WheelMoved signal is emitted when the wheel event is received.<br />
1583         /// </summary>
1584         /// <since_tizen> 3 </since_tizen>
1585         public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1586         {
1587             add
1588             {
1589                 if (_wheelEventHandler == null)
1590                 {
1591                     _wheelEventCallback = OnWheelEvent;
1592                     this.WheelEventSignal().Connect(_wheelEventCallback);
1593                 }
1594
1595                 _wheelEventHandler += value;
1596             }
1597
1598             remove
1599             {
1600                 _wheelEventHandler -= value;
1601
1602                 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1603                 {
1604                     this.WheelEventSignal().Disconnect(_wheelEventCallback);
1605                 }
1606
1607             }
1608         }
1609
1610         /// <summary>
1611         /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1612         /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1613         /// </summary>
1614         /// <since_tizen> 3 </since_tizen>
1615         public event EventHandler AddedToWindow
1616         {
1617             add
1618             {
1619                 if (_onWindowEventHandler == null)
1620                 {
1621                     _onWindowEventCallback = OnWindow;
1622                     this.OnWindowSignal().Connect(_onWindowEventCallback);
1623                 }
1624
1625                 _onWindowEventHandler += value;
1626             }
1627
1628             remove
1629             {
1630                 _onWindowEventHandler -= value;
1631
1632                 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1633                 {
1634                     this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1635                 }
1636             }
1637         }
1638
1639         /// <summary>
1640         /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1641         /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1642         /// </summary>
1643         /// <since_tizen> 3 </since_tizen>
1644         public event EventHandler RemovedFromWindow
1645         {
1646             add
1647             {
1648                 if (_offWindowEventHandler == null)
1649                 {
1650                     _offWindowEventCallback = OffWindow;
1651                     this.OffWindowSignal().Connect(_offWindowEventCallback);
1652                 }
1653
1654                 _offWindowEventHandler += value;
1655             }
1656
1657             remove
1658             {
1659                 _offWindowEventHandler -= value;
1660
1661                 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1662                 {
1663                     this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1664                 }
1665             }
1666         }
1667
1668         /// <summary>
1669         /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1670         /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1671         /// </summary>
1672         /// <since_tizen> 3 </since_tizen>
1673         public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1674         {
1675             add
1676             {
1677                 if (_visibilityChangedEventHandler == null)
1678                 {
1679                     _visibilityChangedEventCallback = OnVisibilityChanged;
1680                     VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1681                 }
1682
1683                 _visibilityChangedEventHandler += value;
1684             }
1685
1686             remove
1687             {
1688                 _visibilityChangedEventHandler -= value;
1689
1690                 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1691                 {
1692                     VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1693                 }
1694             }
1695         }
1696
1697         /// <summary>
1698         /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1699         /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1700         /// </summary>
1701         /// <since_tizen> 4 </since_tizen>
1702         public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1703         {
1704             add
1705             {
1706                 if (_layoutDirectionChangedEventHandler == null)
1707                 {
1708                     _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1709                     LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1710                 }
1711
1712                 _layoutDirectionChangedEventHandler += value;
1713             }
1714
1715             remove
1716             {
1717                 _layoutDirectionChangedEventHandler -= value;
1718
1719                 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1720                 {
1721                     LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1722                 }
1723             }
1724         }
1725
1726         /// <summary>
1727         /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1728         /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1729         /// </summary>
1730         /// <since_tizen> 3 </since_tizen>
1731         public event EventHandler ResourcesLoaded
1732         {
1733             add
1734             {
1735                 if (_resourcesLoadedEventHandler == null)
1736                 {
1737                     _ResourcesLoadedCallback = OnResourcesLoaded;
1738                     this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1739                 }
1740
1741                 _resourcesLoadedEventHandler += value;
1742             }
1743
1744             remove
1745             {
1746                 _resourcesLoadedEventHandler -= value;
1747
1748                 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1749                 {
1750                     this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1751                 }
1752             }
1753         }
1754
1755         internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1756         {
1757             add
1758             {
1759                 if (_backgroundResourceLoadedEventHandler == null)
1760                 {
1761                     _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1762                     this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1763                 }
1764
1765                 _backgroundResourceLoadedEventHandler += value;
1766             }
1767             remove
1768             {
1769                 _backgroundResourceLoadedEventHandler -= value;
1770
1771                 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1772                 {
1773                     this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1774                 }
1775             }
1776         }
1777
1778         /// <summary>
1779         /// Enumeration for describing the states of the view.
1780         /// </summary>
1781         /// <since_tizen> 3 </since_tizen>
1782         public enum States
1783         {
1784             /// <summary>
1785             /// The normal state.
1786             /// </summary>
1787             Normal,
1788             /// <summary>
1789             /// The focused state.
1790             /// </summary>
1791             Focused,
1792             /// <summary>
1793             /// The disabled state.
1794             /// </summary>
1795             Disabled
1796         }
1797
1798         /// <summary>
1799         /// Describes the direction to move the focus towards.
1800         /// </summary>
1801         /// <since_tizen> 3 </since_tizen>
1802         public enum FocusDirection
1803         {
1804             /// <summary>
1805             /// Move keyboard focus towards the left direction.
1806             /// </summary>
1807             /// <since_tizen> 3 </since_tizen>
1808             Left,
1809             /// <summary>
1810             /// Move keyboard focus towards the right direction.
1811             /// </summary>
1812             /// <since_tizen> 3 </since_tizen>
1813             Right,
1814             /// <summary>
1815             /// Move keyboard focus towards the up direction.
1816             /// </summary>
1817             /// <since_tizen> 3 </since_tizen>
1818             Up,
1819             /// <summary>
1820             /// Move keyboard focus towards the down direction.
1821             /// </summary>
1822             /// <since_tizen> 3 </since_tizen>
1823             Down,
1824             /// <summary>
1825             /// Move keyboard focus towards the previous page direction.
1826             /// </summary>
1827             /// <since_tizen> 3 </since_tizen>
1828             PageUp,
1829             /// <summary>
1830             /// Move keyboard focus towards the next page direction.
1831             /// </summary>
1832             /// <since_tizen> 3 </since_tizen>
1833             PageDown
1834         }
1835
1836         internal enum PropertyRange
1837         {
1838             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1839             CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1840             CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1841         }
1842
1843         /// <summary>
1844         /// The StyleName, type string.
1845         /// </summary>
1846         /// <since_tizen> 3 </since_tizen>
1847         public string StyleName
1848         {
1849             get
1850             {
1851                 return (string)GetValue(StyleNameProperty);
1852             }
1853             set
1854             {
1855                 SetValue(StyleNameProperty, value);
1856                 NotifyPropertyChanged();
1857             }
1858         }
1859
1860         /// <summary>
1861         /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1862         /// </summary>
1863         /// <since_tizen> 3 </since_tizen>
1864         public Color BackgroundColor
1865         {
1866             get
1867             {
1868                 return (Color)GetValue(BackgroundColorProperty);
1869             }
1870             set
1871             {
1872                 SetValue(BackgroundColorProperty, value);
1873                 NotifyPropertyChanged();
1874             }
1875         }
1876
1877         /// <summary>
1878         /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1879         /// </summary>
1880         /// <since_tizen> 3 </since_tizen>
1881         public string BackgroundImage
1882         {
1883             get
1884             {
1885                 return (string)GetValue(BackgroundImageProperty);
1886             }
1887             set
1888             {
1889                 SetValue(BackgroundImageProperty, value);
1890                 NotifyPropertyChanged();
1891             }
1892         }
1893
1894         /// <summary>
1895         /// The background of view.
1896         /// </summary>
1897         /// <since_tizen> 3 </since_tizen>
1898         public Tizen.NUI.PropertyMap Background
1899         {
1900             get
1901             {
1902                 return (PropertyMap)GetValue(BackgroundProperty);
1903             }
1904             set
1905             {
1906                 SetValue(BackgroundProperty, value);
1907                 NotifyPropertyChanged();
1908             }
1909         }
1910
1911
1912         /// <summary>
1913         /// The current state of the view.
1914         /// </summary>
1915         /// <since_tizen> 3 </since_tizen>
1916         public States State
1917         {
1918             get
1919             {
1920                 return (States)GetValue(StateProperty);
1921             }
1922             set
1923             {
1924                 SetValue(StateProperty, value);
1925                 NotifyPropertyChanged();
1926             }
1927         }
1928
1929         /// <summary>
1930         /// The current sub state of the view.
1931         /// </summary>
1932         /// <since_tizen> 3 </since_tizen>
1933         public States SubState
1934         {
1935             get
1936             {
1937                 return (States)GetValue(SubStateProperty);
1938             }
1939             set
1940             {
1941                 SetValue(SubStateProperty, value);
1942                 NotifyPropertyChanged();
1943             }
1944         }
1945
1946         /// <summary>
1947         /// Displays a tooltip
1948         /// </summary>
1949         /// <since_tizen> 3 </since_tizen>
1950         public Tizen.NUI.PropertyMap Tooltip
1951         {
1952             get
1953             {
1954                 return (PropertyMap)GetValue(TooltipProperty);
1955             }
1956             set
1957             {
1958                 SetValue(TooltipProperty, value);
1959                 NotifyPropertyChanged();
1960             }
1961         }
1962
1963         /// <summary>
1964         /// Displays a tooltip as a text.
1965         /// </summary>
1966         /// <since_tizen> 3 </since_tizen>
1967         public string TooltipText
1968         {
1969             set
1970             {
1971                 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1972                 NotifyPropertyChanged();
1973             }
1974         }
1975
1976         /// <summary>
1977         /// The Child property of FlexContainer.<br />
1978         /// The proportion of the free space in the container, the flex item will receive.<br />
1979         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1980         /// </summary>
1981         /// <since_tizen> 3 </since_tizen>
1982         public float Flex
1983         {
1984             get
1985             {
1986                 return (float)GetValue(FlexProperty);
1987             }
1988             set
1989             {
1990                 SetValue(FlexProperty, value);
1991                 NotifyPropertyChanged();
1992             }
1993         }
1994
1995         /// <summary>
1996         /// The Child property of FlexContainer.<br />
1997         /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1998         /// </summary>
1999         /// <since_tizen> 3 </since_tizen>
2000         public int AlignSelf
2001         {
2002             get
2003             {
2004                 return (int)GetValue(AlignSelfProperty);
2005             }
2006             set
2007             {
2008                 SetValue(AlignSelfProperty, value);
2009                 NotifyPropertyChanged();
2010             }
2011         }
2012
2013         /// <summary>
2014         /// The Child property of FlexContainer.<br />
2015         /// The space around the flex item.<br />
2016         /// </summary>
2017         /// <since_tizen> 3 </since_tizen>
2018         public Vector4 FlexMargin
2019         {
2020             get
2021             {
2022                 return (Vector4)GetValue(FlexMarginProperty);
2023             }
2024             set
2025             {
2026                 SetValue(FlexMarginProperty, value);
2027                 NotifyPropertyChanged();
2028             }
2029         }
2030
2031         /// <summary>
2032         /// The top-left cell this child occupies, if not set, the first available cell is used.
2033         /// </summary>
2034         /// <since_tizen> 3 </since_tizen>
2035         public Vector2 CellIndex
2036         {
2037             get
2038             {
2039                 return (Vector2)GetValue(CellIndexProperty);
2040             }
2041             set
2042             {
2043                 SetValue(CellIndexProperty, value);
2044                 NotifyPropertyChanged();
2045             }
2046         }
2047
2048         /// <summary>
2049         /// The number of rows this child occupies, if not set, the default value is 1.
2050         /// </summary>
2051         /// <since_tizen> 3 </since_tizen>
2052         public float RowSpan
2053         {
2054             get
2055             {
2056                 return (float)GetValue(RowSpanProperty);
2057             }
2058             set
2059             {
2060                 SetValue(RowSpanProperty, value);
2061                 NotifyPropertyChanged();
2062             }
2063         }
2064
2065         /// <summary>
2066         /// The number of columns this child occupies, if not set, the default value is 1.
2067         /// </summary>
2068         /// <since_tizen> 3 </since_tizen>
2069         public float ColumnSpan
2070         {
2071             get
2072             {
2073                 return (float)GetValue(ColumnSpanProperty);
2074             }
2075             set
2076             {
2077                 SetValue(ColumnSpanProperty, value);
2078                 NotifyPropertyChanged();
2079             }
2080         }
2081
2082         /// <summary>
2083         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2084         /// </summary>
2085         /// <since_tizen> 3 </since_tizen>
2086         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2087         {
2088             get
2089             {
2090                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2091             }
2092             set
2093             {
2094                 SetValue(CellHorizontalAlignmentProperty, value);
2095                 NotifyPropertyChanged();
2096             }
2097         }
2098
2099         /// <summary>
2100         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2101         /// </summary>
2102         /// <since_tizen> 3 </since_tizen>
2103         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2104         {
2105             get
2106             {
2107                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2108             }
2109             set
2110             {
2111                 SetValue(CellVerticalAlignmentProperty, value);
2112                 NotifyPropertyChanged();
2113             }
2114         }
2115
2116         /// <summary>
2117         /// The left focusable view.<br />
2118         /// This will return null if not set.<br />
2119         /// This will also return null if the specified left focusable view is not on a window.<br />
2120         /// </summary>
2121         /// <since_tizen> 3 </since_tizen>
2122         public View LeftFocusableView
2123         {
2124             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2125             get
2126             {
2127                 return (View)GetValue(LeftFocusableViewProperty);
2128             }
2129             set
2130             {
2131                 SetValue(LeftFocusableViewProperty, value);
2132                 NotifyPropertyChanged();
2133             }
2134         }
2135
2136         /// <summary>
2137         /// The right focusable view.<br />
2138         /// This will return null if not set.<br />
2139         /// This will also return null if the specified right focusable view is not on a window.<br />
2140         /// </summary>
2141         /// <since_tizen> 3 </since_tizen>
2142         public View RightFocusableView
2143         {
2144             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2145             get
2146             {
2147                 return (View)GetValue(RightFocusableViewProperty);
2148             }
2149             set
2150             {
2151                 SetValue(RightFocusableViewProperty, value);
2152                 NotifyPropertyChanged();
2153             }
2154         }
2155
2156         /// <summary>
2157         /// The up focusable view.<br />
2158         /// This will return null if not set.<br />
2159         /// This will also return null if the specified up focusable view is not on a window.<br />
2160         /// </summary>
2161         /// <since_tizen> 3 </since_tizen>
2162         public View UpFocusableView
2163         {
2164             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2165             get
2166             {
2167                 return (View)GetValue(UpFocusableViewProperty);
2168             }
2169             set
2170             {
2171                 SetValue(UpFocusableViewProperty, value);
2172                 NotifyPropertyChanged();
2173             }
2174         }
2175
2176         /// <summary>
2177         /// The down focusable view.<br />
2178         /// This will return null if not set.<br />
2179         /// This will also return null if the specified down focusable view is not on a window.<br />
2180         /// </summary>
2181         /// <since_tizen> 3 </since_tizen>
2182         public View DownFocusableView
2183         {
2184             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2185             get
2186             {
2187                 return (View)GetValue(DownFocusableViewProperty);
2188             }
2189             set
2190             {
2191                 SetValue(DownFocusableViewProperty, value);
2192                 NotifyPropertyChanged();
2193             }
2194         }
2195
2196         /// <summary>
2197         /// Whether the view should be focusable by keyboard navigation.
2198         /// </summary>
2199         /// <since_tizen> 3 </since_tizen>
2200         public bool Focusable
2201         {
2202             set
2203             {
2204                 SetValue(FocusableProperty, value);
2205                 NotifyPropertyChanged();
2206             }
2207             get
2208             {
2209                 return (bool)GetValue(FocusableProperty);
2210             }
2211         }
2212
2213         /// <summary>
2214         ///  Retrieves the position of the view.<br />
2215         ///  The coordinates are relative to the view's parent.<br />
2216         /// </summary>
2217         /// <since_tizen> 3 </since_tizen>
2218         public Position CurrentPosition
2219         {
2220             get
2221             {
2222                 return GetCurrentPosition();
2223             }
2224         }
2225
2226         /// <summary>
2227         /// Sets the size of a view for the width and the height.<br />
2228         /// Geometry can be scaled to fit within this area.<br />
2229         /// This does not interfere with the view's scale factor.<br />
2230         /// The views default depth is the minimum of width and height.<br />
2231         /// </summary>
2232         /// <remarks>
2233         /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2234         /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2235         /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2236         /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2237         /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2238         /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2239         /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
2240         /// </remarks>
2241         /// <since_tizen> 3 </since_tizen>
2242         public Size2D Size2D
2243         {
2244             get
2245             {
2246                 Size2D temp = (Size2D)GetValue(Size2DProperty);
2247                 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2248             }
2249             set
2250             {
2251                 SetValue(Size2DProperty, value);
2252                 // Set Specification so when layouts measure this View it matches the value set here.
2253                 // All Views are currently Layouts.
2254                 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
2255                 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
2256                 NotifyPropertyChanged();
2257             }
2258         }
2259
2260         /// <summary>
2261         ///  Retrieves the size of the view.<br />
2262         ///  The coordinates are relative to the view's parent.<br />
2263         /// </summary>
2264         /// <since_tizen> 3 </since_tizen>
2265         public Size2D CurrentSize
2266         {
2267             get
2268             {
2269                 return GetCurrentSize();
2270             }
2271         }
2272
2273         /// <summary>
2274         /// Retrieves and sets the view's opacity.<br />
2275         /// </summary>
2276         /// <since_tizen> 3 </since_tizen>
2277         public float Opacity
2278         {
2279             get
2280             {
2281                 return (float)GetValue(OpacityProperty);
2282             }
2283             set
2284             {
2285                 SetValue(OpacityProperty, value);
2286                 NotifyPropertyChanged();
2287             }
2288         }
2289
2290         /// <summary>
2291         /// Sets the position of the view for X and Y.<br />
2292         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2293         /// If the position inheritance is disabled, sets the world position.<br />
2294         /// </summary>
2295         /// <remarks>
2296         /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2297         /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2298         /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2299         /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2300         /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2301         /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2302         /// </remarks>
2303         /// <since_tizen> 3 </since_tizen>
2304         public Position2D Position2D
2305         {
2306             get
2307             {
2308                 Position2D temp = (Position2D)GetValue(Position2DProperty);
2309                 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2310             }
2311             set
2312             {
2313                 SetValue(Position2DProperty, value);
2314                 NotifyPropertyChanged();
2315             }
2316         }
2317
2318         /// <summary>
2319         /// Retrieves the screen postion of the view.<br />
2320         /// </summary>
2321         /// <since_tizen> 3 </since_tizen>
2322         public Vector2 ScreenPosition
2323         {
2324             get
2325             {
2326                 Vector2 temp = new Vector2(0.0f, 0.0f);
2327                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2328                 return temp;
2329             }
2330         }
2331
2332         /// <summary>
2333         /// Determines whether the pivot point should be used to determine the position of the view.
2334         /// This is true by default.
2335         /// </summary>
2336         /// <remarks>If false, then the top-left of the view is used for the position.
2337         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2338         /// </remarks>
2339         /// <since_tizen> 3 </since_tizen>
2340         public bool PositionUsesPivotPoint
2341         {
2342             get
2343             {
2344                 return (bool)GetValue(PositionUsesPivotPointProperty);
2345             }
2346             set
2347             {
2348                 SetValue(PositionUsesPivotPointProperty, value);
2349                 NotifyPropertyChanged();
2350             }
2351         }
2352
2353         /// <summary>
2354         /// Please do not use! this will be deprecated.
2355         /// </summary>
2356         /// Please do not use! this will be deprecated!
2357         /// Instead please use PositionUsesPivotPoint.
2358         /// <since_tizen> 3 </since_tizen>
2359         [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2360             "Like: " +
2361             "View view = new View(); " +
2362             "view.PivotPoint = PivotPoint.Center; " +
2363             "view.PositionUsesPivotPoint = true;")]
2364         [EditorBrowsable(EditorBrowsableState.Never)]
2365         public bool PositionUsesAnchorPoint
2366         {
2367             get
2368             {
2369                 bool temp = false;
2370                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2371                 return temp;
2372             }
2373             set
2374             {
2375                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2376                 NotifyPropertyChanged();
2377             }
2378         }
2379
2380         /// <summary>
2381         /// Queries whether the view is connected to the stage.<br />
2382         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2383         /// </summary>
2384         /// <since_tizen> 3 </since_tizen>
2385         public bool IsOnWindow
2386         {
2387             get
2388             {
2389                 return OnWindow();
2390             }
2391         }
2392
2393         /// <summary>
2394         /// Gets the depth in the hierarchy for the view.
2395         /// </summary>
2396         /// <since_tizen> 3 </since_tizen>
2397         public int HierarchyDepth
2398         {
2399             get
2400             {
2401                 return GetHierarchyDepth();
2402             }
2403         }
2404
2405         /// <summary>
2406         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2407         /// </summary>
2408         /// <remarks>
2409         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2410         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2411         /// The values set by this property will likely change.
2412         /// </remarks>
2413         /// <since_tizen> 3 </since_tizen>
2414         public int SiblingOrder
2415         {
2416             get
2417             {
2418                 return (int)GetValue(SiblingOrderProperty);
2419             }
2420             set
2421             {
2422                 SetValue(SiblingOrderProperty, value);
2423                 NotifyPropertyChanged();
2424             }
2425         }
2426
2427         /// <summary>
2428         /// Returns the natural size of the view.
2429         /// </summary>
2430         /// <remarks>
2431         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2432         /// </remarks>
2433         /// <since_tizen> 5 </since_tizen>
2434         public Vector3 NaturalSize
2435         {
2436             get
2437             {
2438                 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2439                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2441                 return ret;
2442             }
2443         }
2444
2445         /// <summary>
2446         /// Returns the natural size (Size2D) of the view.
2447         /// </summary>
2448         /// <remarks>
2449         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2450         /// </remarks>
2451         /// <since_tizen> 4 </since_tizen>
2452         public Size2D NaturalSize2D
2453         {
2454             get
2455             {
2456                 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2457                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2458                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2459
2460                 return new Size2D((int)temp.Width, (int)temp.Height);
2461             }
2462         }
2463
2464         /// <summary>
2465         /// Gets or sets the origin of a view within its parent's area.<br />
2466         /// 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 />
2467         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2468         /// A view's position is the distance between this origin and the view's anchor-point.<br />
2469         /// </summary>
2470         /// <pre>The view has been initialized.</pre>
2471         /// <since_tizen> 3 </since_tizen>
2472         public Position ParentOrigin
2473         {
2474             get
2475             {
2476                 return (Position)GetValue(ParentOriginProperty);
2477             }
2478             set
2479             {
2480                 SetValue(ParentOriginProperty, value);
2481                 NotifyPropertyChanged();
2482             }
2483         }
2484
2485         /// <summary>
2486         /// Gets or sets the anchor-point of a view.<br />
2487         /// 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 />
2488         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2489         /// A view position is the distance between its parent-origin and this anchor-point.<br />
2490         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2491         /// <pre>The view has been initialized.</pre>
2492         /// </summary>
2493         /// <since_tizen> 3 </since_tizen>
2494         public Position PivotPoint
2495         {
2496             get
2497             {
2498                 return (Position)GetValue(PivotPointProperty);
2499             }
2500             set
2501             {
2502                 SetValue(PivotPointProperty, value);
2503                 NotifyPropertyChanged();
2504             }
2505         }
2506
2507         /// <summary>
2508         /// Gets or sets the size width of the view.
2509         /// </summary>
2510         /// <since_tizen> 3 </since_tizen>
2511         public float SizeWidth
2512         {
2513             get
2514             {
2515                 return (float)GetValue(SizeWidthProperty);
2516             }
2517             set
2518             {
2519                 SetValue(SizeWidthProperty, value);
2520                 WidthSpecification = (int)Math.Ceiling(value);
2521                 NotifyPropertyChanged();
2522             }
2523         }
2524
2525         /// <summary>
2526         /// Gets or sets the size height of the view.
2527         /// </summary>
2528         /// <since_tizen> 3 </since_tizen>
2529         public float SizeHeight
2530         {
2531             get
2532             {
2533                 return (float)GetValue(SizeHeightProperty);
2534             }
2535             set
2536             {
2537                 SetValue(SizeHeightProperty, value);
2538                 HeightSpecification = (int)Math.Ceiling(value);
2539                 NotifyPropertyChanged();
2540             }
2541         }
2542
2543         /// <summary>
2544         /// Gets or sets the position of the view.<br />
2545         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2546         /// If the position inheritance is disabled, sets the world position.<br />
2547         /// </summary>
2548         /// <since_tizen> 3 </since_tizen>
2549         public Position Position
2550         {
2551             get
2552             {
2553                 return (Position)GetValue(PositionProperty);
2554             }
2555             set
2556             {
2557                 SetValue(PositionProperty, value);
2558                 NotifyPropertyChanged();
2559             }
2560         }
2561
2562         /// <summary>
2563         /// Gets or sets the position X of the view.
2564         /// </summary>
2565         /// <since_tizen> 3 </since_tizen>
2566         public float PositionX
2567         {
2568             get
2569             {
2570                 return (float)GetValue(PositionXProperty);
2571             }
2572             set
2573             {
2574                 SetValue(PositionXProperty, value);
2575                 NotifyPropertyChanged();
2576             }
2577         }
2578
2579         /// <summary>
2580         /// Gets or sets the position Y of the view.
2581         /// </summary>
2582         /// <since_tizen> 3 </since_tizen>
2583         public float PositionY
2584         {
2585             get
2586             {
2587                 return (float)GetValue(PositionYProperty);
2588             }
2589             set
2590             {
2591                 SetValue(PositionYProperty, value);
2592                 NotifyPropertyChanged();
2593             }
2594         }
2595
2596         /// <summary>
2597         /// Gets or sets the position Z of the view.
2598         /// </summary>
2599         /// <since_tizen> 3 </since_tizen>
2600         public float PositionZ
2601         {
2602             get
2603             {
2604                 return (float)GetValue(PositionZProperty);
2605             }
2606             set
2607             {
2608                 SetValue(PositionZProperty, value);
2609                 NotifyPropertyChanged();
2610             }
2611         }
2612
2613         /// <summary>
2614         /// Gets or sets the world position of the view.
2615         /// </summary>
2616         /// <since_tizen> 3 </since_tizen>
2617         public Vector3 WorldPosition
2618         {
2619             get
2620             {
2621                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2622                 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2623                 return temp;
2624             }
2625         }
2626
2627         /// <summary>
2628         /// Gets or sets the orientation of the view.<br />
2629         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2630         /// </summary>
2631         /// <remarks>This is an asynchronous method.</remarks>
2632         /// <since_tizen> 3 </since_tizen>
2633         public Rotation Orientation
2634         {
2635             get
2636             {
2637                 return (Rotation)GetValue(OrientationProperty);
2638             }
2639             set
2640             {
2641                 SetValue(OrientationProperty, value);
2642                 NotifyPropertyChanged();
2643             }
2644         }
2645
2646         /// <summary>
2647         /// Gets or sets the world orientation of the view.<br />
2648         /// </summary>
2649         /// <since_tizen> 3 </since_tizen>
2650         public Rotation WorldOrientation
2651         {
2652             get
2653             {
2654                 Rotation temp = new Rotation();
2655                 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2656                 return temp;
2657             }
2658         }
2659
2660         /// <summary>
2661         /// Gets or sets the scale factor applied to the view.<br />
2662         /// </summary>
2663         /// <since_tizen> 3 </since_tizen>
2664         public Vector3 Scale
2665         {
2666             get
2667             {
2668                 return (Vector3)GetValue(ScaleProperty);
2669             }
2670             set
2671             {
2672                 SetValue(ScaleProperty, value);
2673                 NotifyPropertyChanged();
2674             }
2675         }
2676
2677         /// <summary>
2678         /// Gets or sets the scale X factor applied to the view.
2679         /// </summary>
2680         /// <since_tizen> 3 </since_tizen>
2681         public float ScaleX
2682         {
2683             get
2684             {
2685                 return (float)GetValue(ScaleXProperty);
2686             }
2687             set
2688             {
2689                 SetValue(ScaleXProperty, value);
2690                 NotifyPropertyChanged();
2691             }
2692         }
2693
2694         /// <summary>
2695         /// Gets or sets the scale Y factor applied to the view.
2696         /// </summary>
2697         /// <since_tizen> 3 </since_tizen>
2698         public float ScaleY
2699         {
2700             get
2701             {
2702                 return (float)GetValue(ScaleYProperty);
2703             }
2704             set
2705             {
2706                 SetValue(ScaleYProperty, value);
2707                 NotifyPropertyChanged();
2708             }
2709         }
2710
2711         /// <summary>
2712         /// Gets or sets the scale Z factor applied to the view.
2713         /// </summary>
2714         /// <since_tizen> 3 </since_tizen>
2715         public float ScaleZ
2716         {
2717             get
2718             {
2719                 return (float)GetValue(ScaleZProperty);
2720             }
2721             set
2722             {
2723                 SetValue(ScaleZProperty, value);
2724                 NotifyPropertyChanged();
2725             }
2726         }
2727
2728         /// <summary>
2729         /// Gets the world scale of the view.
2730         /// </summary>
2731         /// <since_tizen> 3 </since_tizen>
2732         public Vector3 WorldScale
2733         {
2734             get
2735             {
2736                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2737                 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2738                 return temp;
2739             }
2740         }
2741
2742         /// <summary>
2743         /// Retrieves the visibility flag of the view.
2744         /// </summary>
2745         /// <remarks>
2746         /// If the view is not visible, then the view and its children will not be rendered.
2747         /// 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.
2748         /// </remarks>
2749         /// <since_tizen> 3 </since_tizen>
2750         public bool Visibility
2751         {
2752             get
2753             {
2754                 bool temp = false;
2755                 GetProperty(View.Property.VISIBLE).Get(out temp);
2756                 return temp;
2757             }
2758         }
2759
2760         /// <summary>
2761         /// Gets the view's world color.
2762         /// </summary>
2763         /// <since_tizen> 3 </since_tizen>
2764         public Vector4 WorldColor
2765         {
2766             get
2767             {
2768                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2769                 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2770                 return temp;
2771             }
2772         }
2773
2774         /// <summary>
2775         /// Gets or sets the view's name.
2776         /// </summary>
2777         /// <since_tizen> 3 </since_tizen>
2778         public string Name
2779         {
2780             get
2781             {
2782                 return (string)GetValue(NameProperty);
2783             }
2784             set
2785             {
2786                 SetValue(NameProperty, value);
2787                 NotifyPropertyChanged();
2788             }
2789         }
2790
2791         /// <summary>
2792         /// Get the number of children held by the view.
2793         /// </summary>
2794         /// <since_tizen> 3 </since_tizen>
2795         public new uint ChildCount
2796         {
2797             get
2798             {
2799                 return GetChildCount();
2800             }
2801         }
2802
2803         /// <summary>
2804         /// Gets the view's ID.
2805         /// Readonly
2806         /// </summary>
2807         /// <since_tizen> 3 </since_tizen>
2808         public uint ID
2809         {
2810             get
2811             {
2812                 return GetId();
2813             }
2814         }
2815
2816         /// <summary>
2817         /// Gets or sets the status of whether the view should emit touch or hover signals.
2818         /// </summary>
2819         /// <since_tizen> 3 </since_tizen>
2820         public bool Sensitive
2821         {
2822             get
2823             {
2824                 return (bool)GetValue(SensitiveProperty);
2825             }
2826             set
2827             {
2828                 SetValue(SensitiveProperty, value);
2829                 NotifyPropertyChanged();
2830             }
2831         }
2832
2833         /// <summary>
2834         /// 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.
2835         /// </summary>
2836         /// <since_tizen> 3 </since_tizen>
2837         public bool LeaveRequired
2838         {
2839             get
2840             {
2841                 return (bool)GetValue(LeaveRequiredProperty);
2842             }
2843             set
2844             {
2845                 SetValue(LeaveRequiredProperty, value);
2846                 NotifyPropertyChanged();
2847             }
2848         }
2849
2850         /// <summary>
2851         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2852         /// </summary>
2853         /// <since_tizen> 3 </since_tizen>
2854         public bool InheritOrientation
2855         {
2856             get
2857             {
2858                 return (bool)GetValue(InheritOrientationProperty);
2859             }
2860             set
2861             {
2862                 SetValue(InheritOrientationProperty, value);
2863                 NotifyPropertyChanged();
2864             }
2865         }
2866
2867         /// <summary>
2868         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2869         /// </summary>
2870         /// <since_tizen> 3 </since_tizen>
2871         public bool InheritScale
2872         {
2873             get
2874             {
2875                 return (bool)GetValue(InheritScaleProperty);
2876             }
2877             set
2878             {
2879                 SetValue(InheritScaleProperty, value);
2880                 NotifyPropertyChanged();
2881             }
2882         }
2883
2884         /// <summary>
2885         /// Gets or sets the status of how the view and its children should be drawn.<br />
2886         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2887         /// 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 />
2888         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2889         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2890         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2891         /// </summary>
2892         /// <since_tizen> 3 </since_tizen>
2893         public DrawModeType DrawMode
2894         {
2895             get
2896             {
2897                 return (DrawModeType)GetValue(DrawModeProperty);
2898             }
2899             set
2900             {
2901                 SetValue(DrawModeProperty, value);
2902                 NotifyPropertyChanged();
2903             }
2904         }
2905
2906         /// <summary>
2907         /// Gets or sets the relative to parent size factor of the view.<br />
2908         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2909         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2910         /// </summary>
2911         /// <since_tizen> 3 </since_tizen>
2912         public Vector3 SizeModeFactor
2913         {
2914             get
2915             {
2916                 return (Vector3)GetValue(SizeModeFactorProperty);
2917             }
2918             set
2919             {
2920                 SetValue(SizeModeFactorProperty, value);
2921                 NotifyPropertyChanged();
2922             }
2923         }
2924
2925         /// <summary>
2926         /// Gets or sets the width resize policy to be used.
2927         /// </summary>
2928         /// <since_tizen> 3 </since_tizen>
2929         public ResizePolicyType WidthResizePolicy
2930         {
2931             get
2932             {
2933                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2934             }
2935             set
2936             {
2937                 SetValue(WidthResizePolicyProperty, value);
2938                 // Match ResizePolicy to new Layouting.
2939                 // Parent relative policies can not be mapped at this point as parent size unknown.
2940                 switch (value)
2941                 {
2942                     case ResizePolicyType.UseNaturalSize:
2943                     {
2944                         WidthSpecification = LayoutParamPolicies.WrapContent;
2945                         break;
2946                     }
2947                     case ResizePolicyType.FillToParent:
2948                     {
2949                         WidthSpecification = LayoutParamPolicies.MatchParent;
2950                         break;
2951                     }
2952                     case ResizePolicyType.FitToChildren:
2953                     {
2954                         WidthSpecification = LayoutParamPolicies.WrapContent;
2955                         break;
2956                     }
2957                     default:
2958                         break;
2959                 }
2960                 NotifyPropertyChanged();
2961             }
2962         }
2963
2964         /// <summary>
2965         /// Gets or sets the height resize policy to be used.
2966         /// </summary>
2967         /// <since_tizen> 3 </since_tizen>
2968         public ResizePolicyType HeightResizePolicy
2969         {
2970             get
2971             {
2972                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2973             }
2974             set
2975             {
2976                 SetValue(HeightResizePolicyProperty, value);
2977                 // Match ResizePolicy to new Layouting.
2978                 // Parent relative policies can not be mapped at this point as parent size unknown.
2979                 switch (value)
2980                 {
2981                     case ResizePolicyType.UseNaturalSize:
2982                     {
2983                         HeightSpecification = LayoutParamPolicies.WrapContent;
2984                         break;
2985                     }
2986                     case ResizePolicyType.FillToParent:
2987                     {
2988                         HeightSpecification = LayoutParamPolicies.MatchParent;
2989                         break;
2990                     }
2991                     case ResizePolicyType.FitToChildren:
2992                     {
2993                         HeightSpecification = LayoutParamPolicies.WrapContent;
2994                         break;
2995                     }
2996                     default:
2997                         break;
2998                 }
2999                 NotifyPropertyChanged();
3000             }
3001         }
3002
3003         /// <summary>
3004         /// Gets or sets the policy to use when setting size with size negotiation.<br />
3005         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3006         /// </summary>
3007         /// <since_tizen> 3 </since_tizen>
3008         public SizeScalePolicyType SizeScalePolicy
3009         {
3010             get
3011             {
3012                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3013             }
3014             set
3015             {
3016                 SetValue(SizeScalePolicyProperty, value);
3017                 NotifyPropertyChanged();
3018             }
3019         }
3020
3021         /// <summary>
3022         ///  Gets or sets the status of whether the width size is dependent on the height size.
3023         /// </summary>
3024         /// <since_tizen> 3 </since_tizen>
3025         public bool WidthForHeight
3026         {
3027             get
3028             {
3029                 return (bool)GetValue(WidthForHeightProperty);
3030             }
3031             set
3032             {
3033                 SetValue(WidthForHeightProperty, value);
3034                 NotifyPropertyChanged();
3035             }
3036         }
3037
3038         /// <summary>
3039         /// Gets or sets the status of whether the height size is dependent on the width size.
3040         /// </summary>
3041         /// <since_tizen> 3 </since_tizen>
3042         public bool HeightForWidth
3043         {
3044             get
3045             {
3046                 return (bool)GetValue(HeightForWidthProperty);
3047             }
3048             set
3049             {
3050                 SetValue(HeightForWidthProperty, value);
3051                 NotifyPropertyChanged();
3052             }
3053         }
3054
3055         /// <summary>
3056         /// Gets or sets the padding for use in layout.
3057         /// </summary>
3058         /// <since_tizen> 5 </since_tizen>
3059         public Extents Padding
3060         {
3061             get
3062             {
3063                 // If View has a Layout then padding in stored in the base Layout class
3064                 if (Layout !=null)
3065                 {
3066                     return Layout.Padding;
3067                 }
3068                 else
3069                 {
3070                     return (Extents)GetValue(PaddingProperty);
3071                 }
3072                 // Two return points to prevent creating a zeroed Extent native object before assignment
3073             }
3074             set
3075             {
3076                 Extents padding = value;
3077                 if (Layout !=null)
3078                 {
3079                     // Layout set so store Padding in LayoutItem instead of in View.
3080                     // If View stores the Padding value then Legacy Size Negotiation will overwrite
3081                     // the position and sizes measure in the Layouting.
3082                     Layout.Padding = value;
3083                     // If Layout is a LayoutItem then it could be a View that handles it's own padding.
3084                     // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
3085                     if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
3086                     {
3087                         padding =  new Extents(0,0,0,0); // Reset value stored in View.
3088                     }
3089                     _layout?.RequestLayout();
3090                 }
3091                 SetValue(PaddingProperty, padding);
3092                 NotifyPropertyChanged();
3093                 _layout?.RequestLayout();
3094             }
3095         }
3096
3097         /// <summary>
3098         /// Gets or sets the minimum size the view can be assigned in size negotiation.
3099         /// </summary>
3100         /// <since_tizen> 3 </since_tizen>
3101         public Size2D MinimumSize
3102         {
3103             get
3104             {
3105                 return (Size2D)GetValue(MinimumSizeProperty);
3106             }
3107             set
3108             {
3109                 if (_layout != null)
3110                 {
3111                     // Note: it only works if minimum size is >= than natural size.
3112                     // To force the size it should be done through the width&height spec or Size2D.
3113                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3114                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3115                     _layout.RequestLayout();
3116                 }
3117                 SetValue(MinimumSizeProperty, value);
3118                 NotifyPropertyChanged();
3119             }
3120         }
3121
3122         /// <summary>
3123         /// Gets or sets the maximum size the view can be assigned in size negotiation.
3124         /// </summary>
3125         /// <since_tizen> 3 </since_tizen>
3126         public Size2D MaximumSize
3127         {
3128             get
3129             {
3130                 return (Size2D)GetValue(MaximumSizeProperty);
3131             }
3132             set
3133             {
3134                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3135                 // MATCH_PARENT spec + parent container size can be used to limit
3136                 if (_layout != null)
3137                 {
3138                     // Note: it only works if minimum size is >= than natural size.
3139                     // To force the size it should be done through the width&height spec or Size2D.
3140                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
3141                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
3142                     _layout.RequestLayout();
3143                 }
3144                 SetValue(MaximumSizeProperty, value);
3145                 NotifyPropertyChanged();
3146             }
3147         }
3148
3149         /// <summary>
3150         /// Gets or sets whether a child view inherits it's parent's position.<br />
3151         /// Default is to inherit.<br />
3152         /// 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 />
3153         /// </summary>
3154         /// <since_tizen> 3 </since_tizen>
3155         public bool InheritPosition
3156         {
3157             get
3158             {
3159                 return (bool)GetValue(InheritPositionProperty);
3160             }
3161             set
3162             {
3163                 SetValue(InheritPositionProperty, value);
3164                 NotifyPropertyChanged();
3165             }
3166         }
3167
3168         /// <summary>
3169         /// Gets or sets the clipping behavior (mode) of it's children.
3170         /// </summary>
3171         /// <since_tizen> 3 </since_tizen>
3172         public ClippingModeType ClippingMode
3173         {
3174             get
3175             {
3176                 return (ClippingModeType)GetValue(ClippingModeProperty);
3177             }
3178             set
3179             {
3180                 SetValue(ClippingModeProperty, value);
3181                 NotifyPropertyChanged();
3182             }
3183         }
3184
3185         /// <summary>
3186         /// Gets the number of renderers held by the view.
3187         /// </summary>
3188         /// <since_tizen> 3 </since_tizen>
3189         public uint RendererCount
3190         {
3191             get
3192             {
3193                 return GetRendererCount();
3194             }
3195         }
3196
3197         /// <summary>
3198         /// [Obsolete("Please do not use! this will be deprecated")]
3199         /// </summary>
3200         /// <since_tizen> 3 </since_tizen>
3201         /// Please do not use! this will be deprecated!
3202         /// Instead please use PivotPoint.
3203         [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3204             "Like: " +
3205             "View view = new View(); " +
3206             "view.PivotPoint = PivotPoint.Center; " +
3207             "view.PositionUsesPivotPoint = true;")]
3208         [EditorBrowsable(EditorBrowsableState.Never)]
3209         public Position AnchorPoint
3210         {
3211             get
3212             {
3213                 Position temp = new Position(0.0f, 0.0f, 0.0f);
3214                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3215                 return temp;
3216             }
3217             set
3218             {
3219                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3220                 NotifyPropertyChanged();
3221             }
3222         }
3223
3224         /// <summary>
3225         /// Sets the size of a view for the width, the height and the depth.<br />
3226         /// Geometry can be scaled to fit within this area.<br />
3227         /// This does not interfere with the view's scale factor.<br />
3228         /// The views default depth is the minimum of width and height.<br />
3229         /// </summary>
3230         /// <remarks>
3231         /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3232         /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3233         /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3234         /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3235         /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
3236         /// </remarks>
3237         /// <since_tizen> 5 </since_tizen>
3238         public Size Size
3239         {
3240             get
3241             {
3242                 return (Size)GetValue(SizeProperty);
3243             }
3244             set
3245             {
3246                 SetValue(SizeProperty, value);
3247                 // Set Specification so when layouts measure this View it matches the value set here.
3248                 // All Views are currently Layouts.
3249                 WidthSpecification = (int)Math.Ceiling(value.Width);
3250                 HeightSpecification = (int)Math.Ceiling(value.Height);
3251                 NotifyPropertyChanged();
3252             }
3253         }
3254
3255         /// <summary>
3256         /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3257         /// </summary>
3258         /// <since_tizen> 3 </since_tizen>
3259         [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3260             "Like: " +
3261             "Container parent =  view.GetParent(); " +
3262             "View view = parent as View;")]
3263         [EditorBrowsable(EditorBrowsableState.Never)]
3264         public new View Parent
3265         {
3266             get
3267             {
3268                 View ret;
3269                 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
3270                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3271                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3272
3273                 if (basehandle is Layer layer)
3274                 {
3275                     ret = new View(Layer.getCPtr(layer).Handle, false);
3276                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
3277                 }
3278                 else
3279                 {
3280                     ret = basehandle as View;
3281                 }
3282
3283                 Interop.BaseHandle.delete_BaseHandle(CPtr);
3284                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3285
3286                 if (NDalicPINVOKE.SWIGPendingException.Pending)
3287                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3288                 return ret;
3289             }
3290         }
3291
3292         /// <summary>
3293         /// Gets/Sets whether inherit parent's the layout Direction.
3294         /// </summary>
3295         /// <since_tizen> 4 </since_tizen>
3296         public bool InheritLayoutDirection
3297         {
3298             get
3299             {
3300                 return (bool)GetValue(InheritLayoutDirectionProperty);
3301             }
3302             set
3303             {
3304                 SetValue(InheritLayoutDirectionProperty, value);
3305                 NotifyPropertyChanged();
3306             }
3307         }
3308
3309         /// <summary>
3310         /// Gets/Sets the layout Direction.
3311         /// </summary>
3312         /// <since_tizen> 4 </since_tizen>
3313         public ViewLayoutDirectionType LayoutDirection
3314         {
3315             get
3316             {
3317                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3318             }
3319             set
3320             {
3321                 SetValue(LayoutDirectionProperty, value);
3322                 NotifyPropertyChanged();
3323                 _layout?.RequestLayout();
3324             }
3325         }
3326
3327         /// <summary>
3328         /// Gets or sets the Margin for use in layout.
3329         /// </summary>
3330         /// <remarks>
3331         /// Margin property is supported by Layout algorithms and containers.
3332         /// Please Set Layout if you want to use Margin property.
3333         /// </remarks>
3334         /// <since_tizen> 4 </since_tizen>
3335         public Extents Margin
3336         {
3337             get
3338             {
3339                 // If View has a Layout then margin is stored in Layout.
3340                 if (Layout != null)
3341                 {
3342                     return Layout.Margin;
3343                 }
3344                 else
3345                 {
3346                     // If Layout not set then return margin stored in View.
3347                     return (Extents)GetValue(MarginProperty);
3348                 }
3349                 // Two return points to prevent creating a zeroed Extent native object before assignment
3350             }
3351             set
3352             {
3353                 if (Layout != null)
3354                 {
3355                     // Layout set so store Margin in LayoutItem instead of View.
3356                     // If View stores the Margin too then the Legacy Size Negotiation will
3357                     // overwrite the position and size values measured in the Layouting.
3358                     Layout.Margin = value;
3359                     SetValue(MarginProperty, new Extents(0,0,0,0));
3360                     _layout?.RequestLayout();
3361                 }
3362                 else
3363                 {
3364                     SetValue(MarginProperty, value);
3365                 }
3366                 NotifyPropertyChanged();
3367                 _layout?.RequestLayout();
3368             }
3369         }
3370
3371         ///<summary>
3372         /// The required policy for this dimension, ChildLayoutData enum or exact value.
3373         ///</summary>
3374         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3375         [EditorBrowsable(EditorBrowsableState.Never)]
3376         public int WidthSpecification
3377         {
3378             get
3379             {
3380                 return _widthPolicy;
3381             }
3382             set
3383             {
3384                 _widthPolicy = value;
3385                 if (_widthPolicy >= 0)
3386                 {
3387                     _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3388                     Size2D.Width = _widthPolicy;
3389                 }
3390                 _layout?.RequestLayout();
3391             }
3392         }
3393
3394         ///<summary>
3395         /// The required policy for this dimension, ChildLayoutData enum or exact value.
3396         ///</summary>
3397         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3398         [EditorBrowsable(EditorBrowsableState.Never)]
3399         public int HeightSpecification
3400         {
3401             get
3402             {
3403                 return _heightPolicy;
3404             }
3405             set
3406             {
3407                 _heightPolicy = value;
3408                 if (_heightPolicy >= 0)
3409                 {
3410                     _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3411                     Size2D.Height = _heightPolicy;
3412                 }
3413                _layout?.RequestLayout();
3414             }
3415         }
3416
3417
3418         /// <summary>
3419         /// [Obsolete("Please do not use! this will be deprecated")]
3420         /// </summary>
3421         /// Please do not use! this will be deprecated!
3422         /// Instead please use Padding.
3423         /// <since_tizen> 4 </since_tizen>
3424         [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3425         [EditorBrowsable(EditorBrowsableState.Never)]
3426         public Extents PaddingEX
3427         {
3428             get
3429             {
3430                 Extents temp = new Extents(0, 0, 0, 0);
3431                 GetProperty(View.Property.PADDING).Get(temp);
3432                 return temp;
3433             }
3434             set
3435             {
3436                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3437                 NotifyPropertyChanged();
3438                 _layout?.RequestLayout();
3439             }
3440         }
3441
3442         /// <summary>
3443         /// Child property to specify desired width
3444         /// </summary>
3445         internal int LayoutWidthSpecificationFixed
3446         {
3447             get
3448             {
3449                 return _widthPolicy;
3450             }
3451             set
3452             {
3453                 _widthPolicy = value;
3454                 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3455                 Size2D.Width = value;
3456                 _layout?.RequestLayout();
3457             }
3458         }
3459
3460         /// <summary>
3461         /// Child property to specify desired height
3462         /// </summary>
3463         internal int LayoutHeightSpecificationFixed
3464         {
3465             get
3466             {
3467                 return _heightPolicy;
3468             }
3469             set
3470             {
3471                 _heightPolicy = value;
3472                 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3473                 Size2D.Height = value;
3474                 _layout?.RequestLayout();
3475             }
3476         }
3477
3478         /// <summary>
3479         /// Child property to specify desired width, use MatchParent/WrapContent)
3480         /// </summary>
3481         internal ChildLayoutData LayoutWidthSpecification
3482         {
3483             get
3484             {
3485                 return (ChildLayoutData)_widthPolicy;
3486             }
3487             set
3488             {
3489                 _widthPolicy = (int)value;
3490             }
3491         }
3492
3493         /// <summary>
3494         /// Child property to specify desired height, use MatchParent/WrapContent)
3495         /// </summary>
3496         internal ChildLayoutData LayoutHeightSpecification
3497         {
3498             get
3499             {
3500                 return (ChildLayoutData)_heightPolicy;
3501             }
3502             set
3503             {
3504                 _heightPolicy = (int)value;
3505             }
3506         }
3507
3508         internal float Weight
3509         {
3510             get
3511             {
3512                 return _weight;
3513             }
3514             set
3515             {
3516                 _weight = value;
3517                 _layout.RequestLayout();
3518             }
3519         }
3520
3521         internal bool BackgroundImageSynchronosLoading
3522         {
3523             get
3524             {
3525                 return _backgroundImageSynchronosLoading;
3526             }
3527             set
3528             {
3529                 if (value != _backgroundImageSynchronosLoading)
3530                 {
3531                     string bgUrl = "";
3532                     PropertyMap bgMap = this.Background;
3533                     int visualType = 0;
3534                     bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3535                     if (visualType == (int)Visual.Type.Image)
3536                     {
3537                         bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3538                     }
3539                     if (bgUrl.Length != 0)
3540                     {
3541                         _backgroundImageSynchronosLoading = value;
3542                         bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3543                         this.Background = bgMap;
3544                     }
3545                 }
3546             }
3547         }
3548
3549         internal float WorldPositionX
3550         {
3551             get
3552             {
3553                 float temp = 0.0f;
3554                 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3555                 return temp;
3556             }
3557         }
3558
3559         internal float WorldPositionY
3560         {
3561             get
3562             {
3563                 float temp = 0.0f;
3564                 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3565                 return temp;
3566             }
3567         }
3568
3569         internal float WorldPositionZ
3570         {
3571             get
3572             {
3573                 float temp = 0.0f;
3574                 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3575                 return temp;
3576             }
3577         }
3578
3579         internal bool FocusState
3580         {
3581             get
3582             {
3583                 return IsKeyboardFocusable();
3584             }
3585             set
3586             {
3587                 SetKeyboardFocusable(value);
3588             }
3589         }
3590
3591         /// <summary>
3592         /// Set the layout on this View. Replaces any existing Layout.
3593         /// </summary>
3594         /// <remarks>
3595         /// </remarks>
3596         internal LayoutItem Layout
3597         {
3598             get
3599             {
3600                 return _layout;
3601             }
3602             set
3603             {
3604                 // Do nothing if layout provided is already set on this View.
3605                 if (value == _layout)
3606                 {
3607                     return;
3608                 }
3609
3610                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3611                 layoutingDisabled = false;
3612                 layoutSet = true;
3613
3614                 // If new layout being set already has a owner then that owner receives a replacement default layout.
3615                 // First check if the layout to be set already has a owner.
3616                 if (value?.Owner != null)
3617                 {
3618                     Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3619                     // Previous owner of the layout gets a default layout as a replacement.
3620                     value.Owner.Layout = new LayoutGroup();
3621
3622                     // Copy Margin and Padding to replacement LayoutGroup.
3623                     value.Owner.Layout.Margin = value.Margin;
3624                     value.Owner.Layout.Padding = value.Padding;
3625                 }
3626
3627                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3628                 // View if no replacement. Previously margin and padding values would have been moved from
3629                 // the View to the layout.
3630                 if (_layout != null ) // Existing layout
3631                 {
3632                     if (value != null)
3633                     {
3634                         // Existing layout being replaced so copy over margin and padding values.
3635                         value.Margin = _layout.Margin;
3636                         value.Padding = _layout.Padding;
3637                     }
3638                     else
3639                     {
3640                       // Layout not being replaced so restore margin and padding to View.
3641                       SetValue(MarginProperty, _layout.Margin);
3642                       SetValue(PaddingProperty, _layout.Padding);
3643                       NotifyPropertyChanged();
3644                     }
3645                 }
3646                 else
3647                 {
3648                     // First Layout to be added to the View hence copy
3649
3650                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3651                     if (value !=null)
3652                     {
3653                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
3654                         {
3655                             // If View already has a margin set then store it in Layout instead.
3656                             value.Margin = Margin;
3657                             SetValue(MarginProperty, new Extents(0,0,0,0));
3658                             NotifyPropertyChanged();
3659                         }
3660
3661                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
3662                         {
3663                             // If View already has a padding set then store it in Layout instead.
3664                             value.Padding = Padding;
3665                             SetValue(PaddingProperty, new Extents(0,0,0,0));
3666                             NotifyPropertyChanged();
3667                         }
3668                     }
3669                 }
3670
3671                 // Remove existing layout from it's parent layout group.
3672                 _layout?.Unparent();
3673
3674                 // Set layout to this view
3675                 SetLayout(value);
3676             }
3677         }
3678
3679         internal void SetLayout(LayoutItem layout)
3680         {
3681             _layout = layout;
3682             _layout?.AttachToOwner(this);
3683             _layout?.RequestLayout();
3684         }
3685
3686         /// <summary>
3687         /// Stores the calculated width value and its ModeType. Width component.
3688         /// </summary>
3689         internal MeasureSpecification MeasureSpecificationWidth
3690         {
3691             set
3692             {
3693                 _measureSpecificationWidth = value;
3694                 _layout?.RequestLayout();
3695             }
3696             get
3697             {
3698                 return _measureSpecificationWidth;
3699             }
3700         }
3701
3702         /// <summary>
3703         /// Stores the calculated width value and its ModeType. Height component.
3704         /// </summary>
3705         internal MeasureSpecification MeasureSpecificationHeight
3706         {
3707             set
3708             {
3709                 _measureSpecificationHeight = value;
3710                 _layout?.RequestLayout();
3711             }
3712             get
3713             {
3714                 return _measureSpecificationHeight;
3715             }
3716         }
3717
3718         internal float ParentOriginX
3719         {
3720             get
3721             {
3722                 float temp = 0.0f;
3723                 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3724                 return temp;
3725             }
3726             set
3727             {
3728                 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3729                 NotifyPropertyChanged();
3730             }
3731         }
3732
3733         internal float ParentOriginY
3734         {
3735             get
3736             {
3737                 float temp = 0.0f;
3738                 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3739                 return temp;
3740             }
3741             set
3742             {
3743                 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3744                 NotifyPropertyChanged();
3745             }
3746         }
3747
3748         internal float ParentOriginZ
3749         {
3750             get
3751             {
3752                 float temp = 0.0f;
3753                 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3754                 return temp;
3755             }
3756             set
3757             {
3758                 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3759                 NotifyPropertyChanged();
3760             }
3761         }
3762
3763         internal float PivotPointX
3764         {
3765             get
3766             {
3767                 float temp = 0.0f;
3768                 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3769                 return temp;
3770             }
3771             set
3772             {
3773                 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3774             }
3775         }
3776
3777         internal float PivotPointY
3778         {
3779             get
3780             {
3781                 float temp = 0.0f;
3782                 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3783                 return temp;
3784             }
3785             set
3786             {
3787                 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3788             }
3789         }
3790
3791         internal float PivotPointZ
3792         {
3793             get
3794             {
3795                 float temp = 0.0f;
3796                 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3797                 return temp;
3798             }
3799             set
3800             {
3801                 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3802             }
3803         }
3804
3805         internal Matrix WorldMatrix
3806         {
3807             get
3808             {
3809                 Matrix temp = new Matrix();
3810                 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3811                 return temp;
3812             }
3813         }
3814
3815         private int LeftFocusableViewId
3816         {
3817             get
3818             {
3819                 int temp = 0;
3820                 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3821                 return temp;
3822             }
3823             set
3824             {
3825                 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3826             }
3827         }
3828
3829         private int RightFocusableViewId
3830         {
3831             get
3832             {
3833                 int temp = 0;
3834                 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3835                 return temp;
3836             }
3837             set
3838             {
3839                 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3840             }
3841         }
3842
3843         private int UpFocusableViewId
3844         {
3845             get
3846             {
3847                 int temp = 0;
3848                 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3849                 return temp;
3850             }
3851             set
3852             {
3853                 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3854             }
3855         }
3856
3857         private int DownFocusableViewId
3858         {
3859             get
3860             {
3861                 int temp = 0;
3862                 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3863                 return temp;
3864             }
3865             set
3866             {
3867                 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3868             }
3869         }
3870
3871         /// <summary>
3872         /// Perform an action on a visual registered to this view. <br />
3873         /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3874         /// </summary>
3875         /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3876         /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3877         /// <param name="attributes">Optional attributes for the action.</param>
3878         /// <since_tizen> 5 </since_tizen>
3879         public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3880         {
3881             Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3882             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3883         }
3884
3885         /// <summary>
3886         /// Creates an animation to animate the background color visual. If there is no
3887         /// background visual, creates one with transparent black as it's mixColor.
3888         /// </summary>
3889         /// <since_tizen> 3 </since_tizen>
3890         public Animation AnimateBackgroundColor(object destinationValue,
3891                                                  int startTime,
3892                                                  int endTime,
3893                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
3894                                                  object initialValue = null)
3895         {
3896             Tizen.NUI.PropertyMap background = Background;
3897
3898             if (background.Empty())
3899             {
3900                 // If there is no background yet, ensure there is a transparent
3901                 // color visual
3902                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3903                 background = Background;
3904             }
3905             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3906         }
3907
3908         /// <summary>
3909         /// Creates an animation to animate the mixColor of the named visual.
3910         /// </summary>
3911         /// <since_tizen> 3 </since_tizen>
3912         public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3913         {
3914             Animation animation = null;
3915             {
3916                 PropertyMap _animator = new PropertyMap();
3917                 if (alphaFunction != null)
3918                 {
3919                     _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3920                 }
3921
3922                 PropertyMap _timePeriod = new PropertyMap();
3923                 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3924                 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3925                 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3926
3927                 PropertyMap _transition = new PropertyMap();
3928                 _transition.Add("animator", new PropertyValue(_animator));
3929                 _transition.Add("target", new PropertyValue(targetVisual));
3930                 _transition.Add("property", new PropertyValue("mixColor"));
3931
3932                 if (initialColor != null)
3933                 {
3934                     PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3935                     _transition.Add("initialValue", initValue);
3936                 }
3937
3938                 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3939                 _transition.Add("targetValue", destValue);
3940                 TransitionData _transitionData = new TransitionData(_transition);
3941
3942                 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3943                 if (NDalicPINVOKE.SWIGPendingException.Pending)
3944                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3945             }
3946             return animation;
3947         }
3948
3949         // From Container Base class
3950         /// <summary>
3951         /// Adds a child view to this view.
3952         /// </summary>
3953         /// <seealso cref="Container.Add" />
3954         /// <since_tizen> 4 </since_tizen>
3955         public override void Add(View child)
3956         {
3957             bool hasLayout = (_layout != null);
3958             Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
3959
3960             if (null == child)
3961             {
3962                 Tizen.Log.Fatal("NUI", "Child is null");
3963                 return;
3964             }
3965
3966             Container oldParent = child.GetParent();
3967             if (oldParent != this)
3968             {
3969                 // If child already has a parent then re-parent child
3970                 if (oldParent != null)
3971                 {
3972                     oldParent.Remove(child);
3973                 }
3974                 child.InternalParent = this;
3975
3976                 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
3977
3978                 if (NDalicPINVOKE.SWIGPendingException.Pending)
3979                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3980                 Children.Add(child);
3981
3982                 if (ChildAdded != null)
3983                 {
3984                     ChildAddedEventArgs e = new ChildAddedEventArgs
3985                     {
3986                         Added = child
3987                     };
3988                     ChildAdded(this, e);
3989                 }
3990             }
3991         }
3992
3993         /// <summary>
3994         /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3995         /// </summary>
3996         /// <seealso cref="Container.Remove" />
3997         /// <since_tizen> 4 </since_tizen>
3998         public override void Remove(View child)
3999         {
4000             bool hasLayout = (_layout != null);
4001             Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
4002
4003             Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
4004             if (NDalicPINVOKE.SWIGPendingException.Pending)
4005                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006
4007             Children.Remove(child);
4008             child.InternalParent = null;
4009
4010             if (ChildRemoved != null)
4011             {
4012                 ChildRemovedEventArgs e = new ChildRemovedEventArgs
4013                 {
4014                     Removed = child
4015                 };
4016                 ChildRemoved(this, e);
4017             }
4018         }
4019
4020         /// <summary>
4021         /// Retrieves a child view by index.
4022         /// </summary>
4023         /// <seealso cref="Container.GetChildAt" />
4024         /// <since_tizen> 4 </since_tizen>
4025         public override View GetChildAt(uint index)
4026         {
4027             if (index < Children.Count)
4028             {
4029                 return Children[Convert.ToInt32(index)];
4030             }
4031             else
4032             {
4033                 return null;
4034             }
4035         }
4036
4037         /// <summary>
4038         /// Retrieves the number of children held by the view.
4039         /// </summary>
4040         /// <seealso cref="Container.GetChildCount" />
4041         /// <since_tizen> 4 </since_tizen>
4042         public override uint GetChildCount()
4043         {
4044             return Convert.ToUInt32(Children.Count);
4045         }
4046
4047         /// <summary>
4048         /// Gets the views parent.
4049         /// </summary>
4050         /// <seealso cref="Container.GetParent()" />
4051         /// <since_tizen> 4 </since_tizen>
4052         public override Container GetParent()
4053         {
4054             return this.InternalParent as Container;
4055         }
4056
4057         /// <summary>
4058         /// Queries whether the view has a focus.
4059         /// </summary>
4060         /// <returns>True if this view has a focus.</returns>
4061         /// <since_tizen> 3 </since_tizen>
4062         public bool HasFocus()
4063         {
4064             bool ret = false;
4065             if (swigCPtr.Handle != global::System.IntPtr.Zero)
4066             {
4067                 ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4068                                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4069             }
4070             else
4071             {
4072                 Tizen.Log.Error("NUI", "swigCPtr of view is aleady disposed.");
4073             }
4074             return ret;
4075         }
4076
4077         /// <summary>
4078         /// Sets the name of the style to be applied to the view.
4079         /// </summary>
4080         /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4081         /// <since_tizen> 3 </since_tizen>
4082         public void SetStyleName(string styleName)
4083         {
4084             Interop.View.View_SetStyleName(swigCPtr, styleName);
4085             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4086         }
4087
4088         /// <summary>
4089         /// Retrieves the name of the style to be applied to the view (if any).
4090         /// </summary>
4091         /// <returns>A string matching a style, or an empty string.</returns>
4092         /// <since_tizen> 3 </since_tizen>
4093         public string GetStyleName()
4094         {
4095             string ret = Interop.View.View_GetStyleName(swigCPtr);
4096             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4097             return ret;
4098         }
4099
4100         /// <summary>
4101         /// Clears the background.
4102         /// </summary>
4103         /// <since_tizen> 3 </since_tizen>
4104         public void ClearBackground()
4105         {
4106             Interop.View.View_ClearBackground(swigCPtr);
4107             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4108         }
4109
4110         /// <summary>
4111         /// Shows the view.
4112         /// </summary>
4113         /// <remarks>
4114         /// This is an asynchronous method.
4115         /// </remarks>
4116         /// <since_tizen> 3 </since_tizen>
4117         public void Show()
4118         {
4119             SetVisible(true);
4120         }
4121
4122         /// <summary>
4123         /// Hides the view.
4124         /// </summary>
4125         /// <remarks>
4126         /// This is an asynchronous method.
4127         /// If the view is hidden, then the view and its children will not be rendered.
4128         /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
4129         /// </remarks>
4130         /// <since_tizen> 3 </since_tizen>
4131         public void Hide()
4132         {
4133             SetVisible(false);
4134         }
4135
4136         /// <summary>
4137         /// Raises the view above all other views.
4138         /// </summary>
4139         /// <remarks>
4140         /// Sibling order of views within the parent will be updated automatically.
4141         /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4142         /// </remarks>
4143         /// <since_tizen> 3 </since_tizen>
4144         public void RaiseToTop()
4145         {
4146             var parentChildren = GetParent()?.Children;
4147
4148             if (parentChildren != null)
4149             {
4150                 parentChildren.Remove(this);
4151                 parentChildren.Add(this);
4152
4153                 Interop.NDalic.RaiseToTop(swigCPtr);
4154                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4155                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4156             }
4157
4158         }
4159
4160         /// <summary>
4161         /// Lowers the view to the bottom of all views.
4162         /// </summary>
4163         /// <remarks>
4164         /// The sibling order of views within the parent will be updated automatically.
4165         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4166         /// </remarks>
4167         /// <since_tizen> 3 </since_tizen>
4168         public void LowerToBottom()
4169         {
4170             var parentChildren = GetParent()?.Children;
4171
4172             if (parentChildren != null)
4173             {
4174                 parentChildren.Remove(this);
4175                 parentChildren.Insert(0, this);
4176
4177                 Interop.NDalic.LowerToBottom(swigCPtr);
4178                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4179                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4180             }
4181         }
4182
4183         /// <summary>
4184         /// Queries if all resources required by a view are loaded and ready.
4185         /// </summary>
4186         /// <remarks>Most resources are only loaded when the control is placed on the stage.
4187         /// </remarks>
4188         /// <since_tizen> 3 </since_tizen>
4189         public bool IsResourceReady()
4190         {
4191             bool ret = Interop.View.IsResourceReady(swigCPtr);
4192             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4193             return ret;
4194         }
4195
4196         /// <summary>
4197         /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4198         /// </summary>
4199         /// <pre>The view has been initialized. </pre>
4200         /// <returns>The parent layer of view </returns>
4201         /// <since_tizen> 5 </since_tizen>
4202         public Layer GetLayer()
4203         {
4204             //to fix memory leak issue, match the handle count with native side.
4205             IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4206             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4207             Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4208             Interop.BaseHandle.delete_BaseHandle(CPtr);
4209             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4210
4211             if (NDalicPINVOKE.SWIGPendingException.Pending)
4212                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4213             return ret;
4214         }
4215
4216         /// <summary>
4217         /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4218         /// </summary>
4219         /// <pre>The (child) view has been initialized. </pre>
4220         /// <since_tizen> 4 </since_tizen>
4221         public void Unparent()
4222         {
4223             GetParent()?.Remove(this);
4224         }
4225
4226         /// <summary>
4227         /// Search through this view's hierarchy for a view with the given name.
4228         /// The view itself is also considered in the search.
4229         /// </summary>
4230         /// <pre>The view has been initialized.</pre>
4231         /// <param name="viewName">The name of the view to find.</param>
4232         /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4233         /// <since_tizen> 3 </since_tizen>
4234         public View FindChildByName(string viewName)
4235         {
4236             //to fix memory leak issue, match the handle count with native side.
4237             IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4238             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4239             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4240             Interop.BaseHandle.delete_BaseHandle(CPtr);
4241             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4242
4243             if (NDalicPINVOKE.SWIGPendingException.Pending)
4244                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4245             return ret;
4246         }
4247
4248         /// <summary>
4249         /// Converts screen coordinates into the view's coordinate system using the default camera.
4250         /// </summary>
4251         /// <pre>The view has been initialized.</pre>
4252         /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4253         /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4254         /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4255         /// <param name="screenX">The screen X-coordinate.</param>
4256         /// <param name="screenY">The screen Y-coordinate.</param>
4257         /// <returns>True if the conversion succeeded.</returns>
4258         /// <since_tizen> 3 </since_tizen>
4259         public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4260         {
4261             bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4262             if (NDalicPINVOKE.SWIGPendingException.Pending)
4263                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4264             return ret;
4265         }
4266
4267         /// <summary>
4268         /// Sets the relative to parent size factor of the view.<br />
4269         /// This factor is only used when ResizePolicy is set to either:
4270         /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4271         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4272         /// </summary>
4273         /// <pre>The view has been initialized.</pre>
4274         /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4275         /// <since_tizen> 3 </since_tizen>
4276         public void SetSizeModeFactor(Vector3 factor)
4277         {
4278             Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4279             if (NDalicPINVOKE.SWIGPendingException.Pending)
4280                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4281         }
4282         /// <summary>
4283         /// Calculates the height of the view given a width.<br />
4284         /// The natural size is used for default calculation.<br />
4285         /// Size 0 is treated as aspect ratio 1:1.<br />
4286         /// </summary>
4287         /// <param name="width">The width to use.</param>
4288         /// <returns>The height based on the width.</returns>
4289         /// <since_tizen> 3 </since_tizen>
4290         public float GetHeightForWidth(float width)
4291         {
4292             float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4293             if (NDalicPINVOKE.SWIGPendingException.Pending)
4294                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4295             return ret;
4296         }
4297
4298         /// <summary>
4299         /// Calculates the width of the view given a height.<br />
4300         /// The natural size is used for default calculation.<br />
4301         /// Size 0 is treated as aspect ratio 1:1.<br />
4302         /// </summary>
4303         /// <param name="height">The height to use.</param>
4304         /// <returns>The width based on the height.</returns>
4305         /// <since_tizen> 3 </since_tizen>
4306         public float GetWidthForHeight(float height)
4307         {
4308             float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4309             if (NDalicPINVOKE.SWIGPendingException.Pending)
4310                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4311             return ret;
4312         }
4313
4314         /// <summary>
4315         /// Return the amount of size allocated for relayout.
4316         /// </summary>
4317         /// <param name="dimension">The dimension to retrieve.</param>
4318         /// <returns>Return the size.</returns>
4319         /// <since_tizen> 3 </since_tizen>
4320         public float GetRelayoutSize(DimensionType dimension)
4321         {
4322             float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4323             if (NDalicPINVOKE.SWIGPendingException.Pending)
4324                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4325             return ret;
4326         }
4327
4328         /// <summary>
4329         /// Set the padding for the view.
4330         /// </summary>
4331         /// <param name="padding">Padding for the view.</param>
4332         /// <since_tizen> 3 </since_tizen>
4333         public void SetPadding(PaddingType padding)
4334         {
4335             Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4336             if (NDalicPINVOKE.SWIGPendingException.Pending)
4337                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4338         }
4339
4340         /// <summary>
4341         /// Return the value of padding for the view.
4342         /// </summary>
4343         /// <param name="paddingOut">the value of padding for the view</param>
4344         /// <since_tizen> 3 </since_tizen>
4345         public void GetPadding(PaddingType paddingOut)
4346         {
4347             Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4348             if (NDalicPINVOKE.SWIGPendingException.Pending)
4349                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4350         }
4351
4352         /// <since_tizen> 3 </since_tizen>
4353         public uint AddRenderer(Renderer renderer)
4354         {
4355             uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4356             if (NDalicPINVOKE.SWIGPendingException.Pending)
4357                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4358             return ret;
4359         }
4360
4361         /// <since_tizen> 3 </since_tizen>
4362         public Renderer GetRendererAt(uint index)
4363         {
4364             //to fix memory leak issue, match the handle count with native side.
4365             IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4366             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4367             Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4368             if (cPtr != null && ret == null)
4369             {
4370                 ret = new Renderer(cPtr, false);
4371                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4372                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4373                 return ret;
4374             }
4375             Interop.BaseHandle.delete_BaseHandle(CPtr);
4376             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4377
4378             if (NDalicPINVOKE.SWIGPendingException.Pending)
4379                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4380             return ret;
4381         }
4382
4383         /// <since_tizen> 3 </since_tizen>
4384         public void RemoveRenderer(Renderer renderer)
4385         {
4386             Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4387             if (NDalicPINVOKE.SWIGPendingException.Pending)
4388                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4389         }
4390
4391         /// <since_tizen> 3 </since_tizen>
4392         public void RemoveRenderer(uint index)
4393         {
4394             Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4395             if (NDalicPINVOKE.SWIGPendingException.Pending)
4396                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4397         }
4398
4399         internal void Raise()
4400         {
4401             var parentChildren = GetParent()?.Children;
4402
4403             if (parentChildren != null)
4404             {
4405                 int currentIndex = parentChildren.IndexOf(this);
4406
4407                 // If the view is not already the last item in the list.
4408                 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4409                 {
4410                     View temp = parentChildren[currentIndex + 1];
4411                     parentChildren[currentIndex + 1] = this;
4412                     parentChildren[currentIndex] = temp;
4413
4414                     Interop.NDalic.Raise(swigCPtr);
4415                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4416                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4417                 }
4418             }
4419         }
4420
4421         internal void Lower()
4422         {
4423             var parentChildren = GetParent()?.Children;
4424
4425             if (parentChildren != null)
4426             {
4427                 int currentIndex = parentChildren.IndexOf(this);
4428
4429                 // If the view is not already the first item in the list.
4430                 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4431                 {
4432                     View temp = parentChildren[currentIndex - 1];
4433                     parentChildren[currentIndex - 1] = this;
4434                     parentChildren[currentIndex] = temp;
4435
4436                     Interop.NDalic.Lower(swigCPtr);
4437                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4438                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4439                 }
4440             }
4441         }
4442
4443         /// <summary>
4444         /// Raises the view to above the target view.
4445         /// </summary>
4446         /// <remarks>The sibling order of views within the parent will be updated automatically.
4447         /// Views on the level above the target view will still be shown above this view.
4448         /// Raising this view above views with the same sibling order as each other will raise this view above them.
4449         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4450         /// </remarks>
4451         /// <param name="target">Will be raised above this view.</param>
4452         internal void RaiseAbove(View target)
4453         {
4454             var parentChildren = GetParent()?.Children;
4455
4456             if (parentChildren != null)
4457             {
4458                 int currentIndex = parentChildren.IndexOf(this);
4459                 int targetIndex = parentChildren.IndexOf(target);
4460
4461                 if (currentIndex < 0 || targetIndex < 0 ||
4462                     currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4463                 {
4464                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4465                     return;
4466                 }
4467                 // If the currentIndex is less than the target index and the target has the same parent.
4468                 if (currentIndex < targetIndex)
4469                 {
4470                     parentChildren.Remove(this);
4471                     parentChildren.Insert(targetIndex, this);
4472
4473                     Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4474                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4475                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4476                 }
4477             }
4478
4479         }
4480
4481         /// <summary>
4482         /// Lowers the view to below the target view.
4483         /// </summary>
4484         /// <remarks>The sibling order of views within the parent will be updated automatically.
4485         /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4486         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4487         /// </remarks>
4488         /// <param name="target">Will be lowered below this view.</param>
4489         internal void LowerBelow(View target)
4490         {
4491             var parentChildren = GetParent()?.Children;
4492
4493             if (parentChildren != null)
4494             {
4495                 int currentIndex = parentChildren.IndexOf(this);
4496                 int targetIndex = parentChildren.IndexOf(target);
4497                 if (currentIndex < 0 || targetIndex < 0 ||
4498                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4499                 {
4500                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4501                     return;
4502                 }
4503
4504                 // If the currentIndex is not already the 0th index and the target has the same parent.
4505                 if ((currentIndex != 0) && (targetIndex != -1) &&
4506                     (currentIndex > targetIndex))
4507                 {
4508                     parentChildren.Remove(this);
4509                     parentChildren.Insert(targetIndex, this);
4510
4511                     Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4512                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4513                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4514                 }
4515             }
4516
4517         }
4518
4519         internal string GetName()
4520         {
4521             string ret = Interop.Actor.Actor_GetName(swigCPtr);
4522             if (NDalicPINVOKE.SWIGPendingException.Pending)
4523                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4524             return ret;
4525         }
4526
4527         internal void SetName(string name)
4528         {
4529             Interop.Actor.Actor_SetName(swigCPtr, name);
4530             if (NDalicPINVOKE.SWIGPendingException.Pending)
4531                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4532         }
4533
4534         internal uint GetId()
4535         {
4536             uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4537             if (NDalicPINVOKE.SWIGPendingException.Pending)
4538                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4539             return ret;
4540         }
4541
4542         internal bool IsRoot()
4543         {
4544             bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4545             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4546             return ret;
4547         }
4548
4549         internal bool OnWindow()
4550         {
4551             bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4552             if (NDalicPINVOKE.SWIGPendingException.Pending)
4553                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4554             return ret;
4555         }
4556
4557         internal View FindChildById(uint id)
4558         {
4559             //to fix memory leak issue, match the handle count with native side.
4560             IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4561             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4562             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4563             Interop.BaseHandle.delete_BaseHandle(CPtr);
4564             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4565
4566             if (NDalicPINVOKE.SWIGPendingException.Pending)
4567                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4568             return ret;
4569         }
4570
4571         internal override View FindCurrentChildById(uint id)
4572         {
4573             return FindChildById(id);
4574         }
4575
4576         internal void SetParentOrigin(Vector3 origin)
4577         {
4578             Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4579             if (NDalicPINVOKE.SWIGPendingException.Pending)
4580                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4581         }
4582
4583         internal Vector3 GetCurrentParentOrigin()
4584         {
4585             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4586             if (NDalicPINVOKE.SWIGPendingException.Pending)
4587                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4588             return ret;
4589         }
4590
4591         internal void SetAnchorPoint(Vector3 anchorPoint)
4592         {
4593             Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4594             if (NDalicPINVOKE.SWIGPendingException.Pending)
4595                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4596         }
4597
4598         internal Vector3 GetCurrentAnchorPoint()
4599         {
4600             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4601             if (NDalicPINVOKE.SWIGPendingException.Pending)
4602                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4603             return ret;
4604         }
4605
4606         internal void SetSize(float width, float height)
4607         {
4608             Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4609             if (NDalicPINVOKE.SWIGPendingException.Pending)
4610                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4611         }
4612
4613         internal void SetSize(float width, float height, float depth)
4614         {
4615             Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4616             if (NDalicPINVOKE.SWIGPendingException.Pending)
4617                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4618         }
4619
4620         internal void SetSize(Vector2 size)
4621         {
4622             Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4623             if (NDalicPINVOKE.SWIGPendingException.Pending)
4624                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4625         }
4626
4627         internal void SetSize(Vector3 size)
4628         {
4629             Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4630             if (NDalicPINVOKE.SWIGPendingException.Pending)
4631                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4632         }
4633
4634         internal Vector3 GetTargetSize()
4635         {
4636             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4637             if (NDalicPINVOKE.SWIGPendingException.Pending)
4638                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4639             return ret;
4640         }
4641
4642         internal Size2D GetCurrentSize()
4643         {
4644             Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4645             if (NDalicPINVOKE.SWIGPendingException.Pending)
4646                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4647             Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4648             return size;
4649         }
4650
4651         internal Vector3 GetNaturalSize()
4652         {
4653             Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4654             if (NDalicPINVOKE.SWIGPendingException.Pending)
4655                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4656             return ret;
4657         }
4658
4659         internal void SetPosition(float x, float y)
4660         {
4661             Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4662             if (NDalicPINVOKE.SWIGPendingException.Pending)
4663                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4664         }
4665
4666         internal void SetPosition(float x, float y, float z)
4667         {
4668             Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4669             if (NDalicPINVOKE.SWIGPendingException.Pending)
4670                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4671         }
4672
4673         internal void SetPosition(Vector3 position)
4674         {
4675             Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4676             if (NDalicPINVOKE.SWIGPendingException.Pending)
4677                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4678         }
4679
4680         internal void SetX(float x)
4681         {
4682             Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4683             if (NDalicPINVOKE.SWIGPendingException.Pending)
4684                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4685         }
4686
4687         internal void SetY(float y)
4688         {
4689             Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4690             if (NDalicPINVOKE.SWIGPendingException.Pending)
4691                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4692         }
4693
4694         internal void SetZ(float z)
4695         {
4696             Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4697             if (NDalicPINVOKE.SWIGPendingException.Pending)
4698                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4699         }
4700
4701         internal void TranslateBy(Vector3 distance)
4702         {
4703             Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4704             if (NDalicPINVOKE.SWIGPendingException.Pending)
4705                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4706         }
4707
4708         internal Position GetCurrentPosition()
4709         {
4710             Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4711             if (NDalicPINVOKE.SWIGPendingException.Pending)
4712                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4713             return ret;
4714         }
4715
4716         internal Vector3 GetCurrentWorldPosition()
4717         {
4718             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4719             if (NDalicPINVOKE.SWIGPendingException.Pending)
4720                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4721             return ret;
4722         }
4723
4724         internal void SetInheritPosition(bool inherit)
4725         {
4726             Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4727             if (NDalicPINVOKE.SWIGPendingException.Pending)
4728                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4729         }
4730
4731         internal bool IsPositionInherited()
4732         {
4733             bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4734             if (NDalicPINVOKE.SWIGPendingException.Pending)
4735                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4736             return ret;
4737         }
4738
4739         internal void SetOrientation(Degree angle, Vector3 axis)
4740         {
4741             Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4742             if (NDalicPINVOKE.SWIGPendingException.Pending)
4743                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4744         }
4745
4746         internal void SetOrientation(Radian angle, Vector3 axis)
4747         {
4748             Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4749             if (NDalicPINVOKE.SWIGPendingException.Pending)
4750                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4751         }
4752
4753         internal void SetOrientation(Rotation orientation)
4754         {
4755             Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4756             if (NDalicPINVOKE.SWIGPendingException.Pending)
4757                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4758         }
4759
4760         internal void RotateBy(Degree angle, Vector3 axis)
4761         {
4762             Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4763             if (NDalicPINVOKE.SWIGPendingException.Pending)
4764                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4765         }
4766
4767         internal void RotateBy(Radian angle, Vector3 axis)
4768         {
4769             Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4770             if (NDalicPINVOKE.SWIGPendingException.Pending)
4771                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4772         }
4773
4774         internal void RotateBy(Rotation relativeRotation)
4775         {
4776             Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4777             if (NDalicPINVOKE.SWIGPendingException.Pending)
4778                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4779         }
4780
4781         internal Rotation GetCurrentOrientation()
4782         {
4783             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4784             if (NDalicPINVOKE.SWIGPendingException.Pending)
4785                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4786             return ret;
4787         }
4788
4789         internal void SetInheritOrientation(bool inherit)
4790         {
4791             Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4792             if (NDalicPINVOKE.SWIGPendingException.Pending)
4793                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4794         }
4795
4796         internal bool IsOrientationInherited()
4797         {
4798             bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4799             if (NDalicPINVOKE.SWIGPendingException.Pending)
4800                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4801             return ret;
4802         }
4803
4804         internal Rotation GetCurrentWorldOrientation()
4805         {
4806             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4807             if (NDalicPINVOKE.SWIGPendingException.Pending)
4808                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4809             return ret;
4810         }
4811
4812         internal void SetScale(float scale)
4813         {
4814             Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4815             if (NDalicPINVOKE.SWIGPendingException.Pending)
4816                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4817         }
4818
4819         internal void SetScale(float scaleX, float scaleY, float scaleZ)
4820         {
4821             Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4822             if (NDalicPINVOKE.SWIGPendingException.Pending)
4823                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4824         }
4825
4826         internal void SetScale(Vector3 scale)
4827         {
4828             Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4829             if (NDalicPINVOKE.SWIGPendingException.Pending)
4830                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4831         }
4832
4833         internal void ScaleBy(Vector3 relativeScale)
4834         {
4835             Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4836             if (NDalicPINVOKE.SWIGPendingException.Pending)
4837                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4838         }
4839
4840         internal Vector3 GetCurrentScale()
4841         {
4842             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4843             if (NDalicPINVOKE.SWIGPendingException.Pending)
4844                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4845             return ret;
4846         }
4847
4848         internal Vector3 GetCurrentWorldScale()
4849         {
4850             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4851             if (NDalicPINVOKE.SWIGPendingException.Pending)
4852                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4853             return ret;
4854         }
4855
4856         internal void SetInheritScale(bool inherit)
4857         {
4858             Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4859             if (NDalicPINVOKE.SWIGPendingException.Pending)
4860                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4861         }
4862
4863         internal bool IsScaleInherited()
4864         {
4865             bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4866             if (NDalicPINVOKE.SWIGPendingException.Pending)
4867                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4868             return ret;
4869         }
4870
4871         internal Matrix GetCurrentWorldMatrix()
4872         {
4873             Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4874             if (NDalicPINVOKE.SWIGPendingException.Pending)
4875                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4876             return ret;
4877         }
4878
4879         internal void SetVisible(bool visible)
4880         {
4881             Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4882             if (NDalicPINVOKE.SWIGPendingException.Pending)
4883                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4884         }
4885
4886         internal bool IsVisible()
4887         {
4888             bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4889             if (NDalicPINVOKE.SWIGPendingException.Pending)
4890                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4891             return ret;
4892         }
4893
4894         internal void SetOpacity(float opacity)
4895         {
4896             Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4897             if (NDalicPINVOKE.SWIGPendingException.Pending)
4898                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4899         }
4900
4901         internal float GetCurrentOpacity()
4902         {
4903             float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4904             if (NDalicPINVOKE.SWIGPendingException.Pending)
4905                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4906             return ret;
4907         }
4908
4909         internal void SetColor(Vector4 color)
4910         {
4911             Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4912             if (NDalicPINVOKE.SWIGPendingException.Pending)
4913                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4914         }
4915
4916         internal Vector4 GetCurrentColor()
4917         {
4918             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4919             if (NDalicPINVOKE.SWIGPendingException.Pending)
4920                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4921             return ret;
4922         }
4923
4924         internal void SetColorMode(ColorMode colorMode)
4925         {
4926             Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4927             if (NDalicPINVOKE.SWIGPendingException.Pending)
4928                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4929         }
4930
4931         internal ColorMode GetColorMode()
4932         {
4933             ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4934             if (NDalicPINVOKE.SWIGPendingException.Pending)
4935                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4936             return ret;
4937         }
4938
4939         internal Vector4 GetCurrentWorldColor()
4940         {
4941             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4942             if (NDalicPINVOKE.SWIGPendingException.Pending)
4943                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4944             return ret;
4945         }
4946
4947         internal void SetDrawMode(DrawModeType drawMode)
4948         {
4949             Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4950             if (NDalicPINVOKE.SWIGPendingException.Pending)
4951                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4952         }
4953
4954         internal DrawModeType GetDrawMode()
4955         {
4956             DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4957             if (NDalicPINVOKE.SWIGPendingException.Pending)
4958                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4959             return ret;
4960         }
4961
4962         internal void SetKeyboardFocusable(bool focusable)
4963         {
4964             Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4965             if (NDalicPINVOKE.SWIGPendingException.Pending)
4966                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4967         }
4968
4969         internal bool IsKeyboardFocusable()
4970         {
4971             bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
4972             if (NDalicPINVOKE.SWIGPendingException.Pending)
4973                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4974             return ret;
4975         }
4976
4977         internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4978         {
4979             Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4980             if (NDalicPINVOKE.SWIGPendingException.Pending)
4981                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4982         }
4983
4984         internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4985         {
4986             ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4987             if (NDalicPINVOKE.SWIGPendingException.Pending)
4988                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4989             return ret;
4990         }
4991
4992         internal Vector3 GetSizeModeFactor()
4993         {
4994             Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
4995             if (NDalicPINVOKE.SWIGPendingException.Pending)
4996                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4997             return ret;
4998         }
4999
5000         internal void SetMinimumSize(Vector2 size)
5001         {
5002             Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
5003             if (NDalicPINVOKE.SWIGPendingException.Pending)
5004                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5005         }
5006
5007         internal Vector2 GetMinimumSize()
5008         {
5009             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
5010             if (NDalicPINVOKE.SWIGPendingException.Pending)
5011                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5012             return ret;
5013         }
5014
5015         internal void SetMaximumSize(Vector2 size)
5016         {
5017             Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
5018             if (NDalicPINVOKE.SWIGPendingException.Pending)
5019                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5020         }
5021
5022         internal Vector2 GetMaximumSize()
5023         {
5024             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
5025             if (NDalicPINVOKE.SWIGPendingException.Pending)
5026                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5027             return ret;
5028         }
5029
5030         internal int GetHierarchyDepth()
5031         {
5032             int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
5033             if (NDalicPINVOKE.SWIGPendingException.Pending)
5034                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5035             return ret;
5036         }
5037
5038         internal uint GetRendererCount()
5039         {
5040             uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
5041             if (NDalicPINVOKE.SWIGPendingException.Pending)
5042                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5043             return ret;
5044         }
5045
5046         internal TouchDataSignal TouchSignal()
5047         {
5048             TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
5049             if (NDalicPINVOKE.SWIGPendingException.Pending)
5050                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5051             return ret;
5052         }
5053
5054         internal HoverSignal HoveredSignal()
5055         {
5056             HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
5057             if (NDalicPINVOKE.SWIGPendingException.Pending)
5058                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5059             return ret;
5060         }
5061
5062         internal WheelSignal WheelEventSignal()
5063         {
5064             WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
5065             if (NDalicPINVOKE.SWIGPendingException.Pending)
5066                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5067             return ret;
5068         }
5069
5070         internal ViewSignal OnWindowSignal()
5071         {
5072             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5073             if (NDalicPINVOKE.SWIGPendingException.Pending)
5074                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5075             return ret;
5076         }
5077
5078         internal ViewSignal OffWindowSignal()
5079         {
5080             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5081             if (NDalicPINVOKE.SWIGPendingException.Pending)
5082                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5083             return ret;
5084         }
5085
5086         internal ViewSignal OnRelayoutSignal()
5087         {
5088             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5089             if (NDalicPINVOKE.SWIGPendingException.Pending)
5090                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5091             return ret;
5092         }
5093
5094         internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5095         {
5096             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5097             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5098             return ret;
5099         }
5100
5101         internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5102         {
5103             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5104             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5105             return ret;
5106         }
5107
5108         internal ViewSignal ResourcesLoadedSignal()
5109         {
5110             ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5112             return ret;
5113         }
5114
5115         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5116         {
5117             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5118         }
5119
5120         internal bool IsTopLevelView()
5121         {
5122             if (GetParent() is Layer)
5123             {
5124                 return true;
5125             }
5126             return false;
5127         }
5128
5129         internal void SetKeyInputFocus()
5130         {
5131             Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5132             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5133         }
5134
5135         internal void ClearKeyInputFocus()
5136         {
5137             Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5138             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5139         }
5140
5141         internal PinchGestureDetector GetPinchGestureDetector()
5142         {
5143             PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5145             return ret;
5146         }
5147
5148         internal PanGestureDetector GetPanGestureDetector()
5149         {
5150             PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5151             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5152             return ret;
5153         }
5154
5155         internal TapGestureDetector GetTapGestureDetector()
5156         {
5157             TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5158             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5159             return ret;
5160         }
5161
5162         internal LongPressGestureDetector GetLongPressGestureDetector()
5163         {
5164             LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5165             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5166             return ret;
5167         }
5168
5169         internal void SetBackgroundColor(Vector4 color)
5170         {
5171             Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5173         }
5174
5175         internal Vector4 GetBackgroundColor()
5176         {
5177             Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5178             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5179             return ret;
5180         }
5181
5182         internal void SetBackgroundImage(Image image)
5183         {
5184             Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5186         }
5187
5188         internal ControlKeySignal KeyEventSignal()
5189         {
5190             ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5191             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5192             return ret;
5193         }
5194
5195         internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5196         {
5197             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5198             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5199             return ret;
5200         }
5201
5202         internal KeyInputFocusSignal KeyInputFocusLostSignal()
5203         {
5204             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5205             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5206             return ret;
5207         }
5208
5209         internal IntPtr GetPtrfromView()
5210         {
5211             return (IntPtr)swigCPtr;
5212         }
5213
5214         /// <summary>
5215         /// Removes the layout from this View.
5216         /// </summary>
5217         internal void ResetLayout()
5218         {
5219             _layout = null;
5220         }
5221
5222         internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5223         {
5224             return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5225         }
5226
5227         /// <summary>
5228         /// you can override it to clean-up your own resources.
5229         /// </summary>
5230         /// <param name="type">DisposeTypes</param>
5231         /// <since_tizen> 3 </since_tizen>
5232         protected override void Dispose(DisposeTypes type)
5233         {
5234             if (disposed)
5235             {
5236                 return;
5237             }
5238
5239             if (type == DisposeTypes.Explicit)
5240             {
5241                 //Called by User
5242                 //Release your own managed resources here.
5243                 //You should release all of your own disposable objects here.
5244             }
5245
5246             //Release your own unmanaged resources here.
5247             //You should not access any managed member here except static instance.
5248             //because the execution order of Finalizes is non-deterministic.
5249             if (this != null)
5250             {
5251                 DisConnectFromSignals();
5252             }
5253
5254             if (swigCPtr.Handle != global::System.IntPtr.Zero)
5255             {
5256                 if (swigCMemOwn)
5257                 {
5258                     swigCMemOwn = false;
5259                     Interop.View.delete_View(swigCPtr);
5260                 }
5261                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5262             }
5263
5264             foreach (View view in Children)
5265             {
5266                 view.InternalParent = null;
5267             }
5268
5269             base.Dispose(type);
5270
5271         }
5272
5273         private void OnSize2DChanged(int width, int height)
5274         {
5275             Size2D = new Size2D(width, height);
5276         }
5277
5278         private void OnPosition2DChanged(int x, int y)
5279         {
5280             Position2D = new Position2D(x, y);
5281         }
5282
5283         private void DisConnectFromSignals()
5284         {
5285             // Save current CPtr.
5286             global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5287
5288             // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5289             swigCPtr = GetBaseHandleCPtrHandleRef;
5290
5291             if (_onRelayoutEventCallback != null)
5292             {
5293                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5294             }
5295
5296             if (_offWindowEventCallback != null)
5297             {
5298                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5299             }
5300
5301             if (_onWindowEventCallback != null)
5302             {
5303                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5304             }
5305
5306             if (_wheelEventCallback != null)
5307             {
5308                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5309             }
5310
5311             if (_hoverEventCallback != null)
5312             {
5313                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5314             }
5315
5316             if (_touchDataCallback != null)
5317             {
5318                 this.TouchSignal().Disconnect(_touchDataCallback);
5319             }
5320
5321             if (_ResourcesLoadedCallback != null)
5322             {
5323                 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5324             }
5325
5326             if (_offWindowEventCallback != null)
5327             {
5328                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5329             }
5330
5331             if (_onWindowEventCallback != null)
5332             {
5333                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5334             }
5335
5336             if (_wheelEventCallback != null)
5337             {
5338                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5339             }
5340
5341             if (_hoverEventCallback != null)
5342             {
5343                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5344             }
5345
5346             if (_touchDataCallback != null)
5347             {
5348                 this.TouchSignal().Disconnect(_touchDataCallback);
5349             }
5350
5351             if (_onRelayoutEventCallback != null)
5352             {
5353                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5354             }
5355
5356             if (_keyCallback != null)
5357             {
5358                 this.KeyEventSignal().Disconnect(_keyCallback);
5359             }
5360
5361             if (_keyInputFocusLostCallback != null)
5362             {
5363                 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5364             }
5365
5366             if (_keyInputFocusGainedCallback != null)
5367             {
5368                 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5369             }
5370
5371             if (_backgroundResourceLoadedCallback != null)
5372             {
5373                 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5374             }
5375
5376             if (_onWindowSendEventCallback != null)
5377             {
5378                 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5379             }
5380
5381             // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5382             // Restore current CPtr.
5383             swigCPtr = currentCPtr;
5384         }
5385
5386         private void OnKeyInputFocusGained(IntPtr view)
5387         {
5388             if (_keyInputFocusGainedEventHandler != null)
5389             {
5390                 _keyInputFocusGainedEventHandler(this, null);
5391             }
5392         }
5393
5394         private void OnKeyInputFocusLost(IntPtr view)
5395         {
5396             if (_keyInputFocusLostEventHandler != null)
5397             {
5398                 _keyInputFocusLostEventHandler(this, null);
5399             }
5400         }
5401
5402         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5403         {
5404             if (keyEvent == global::System.IntPtr.Zero)
5405             {
5406                 NUILog.Error("keyEvent should not be null!");
5407                 return true;
5408             }
5409
5410             KeyEventArgs e = new KeyEventArgs();
5411
5412             bool result = false;
5413
5414             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5415
5416             if (_keyEventHandler != null)
5417             {
5418                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5419
5420                 // Oring the result of each callback.
5421                 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5422                 {
5423                     result |= del(this, e);
5424                 }
5425             }
5426
5427             return result;
5428         }
5429
5430         // Callback for View OnRelayout signal
5431         private void OnRelayout(IntPtr data)
5432         {
5433             if (_onRelayoutEventHandler != null)
5434             {
5435                 _onRelayoutEventHandler(this, null);
5436             }
5437         }
5438
5439         // Callback for View TouchSignal
5440         private bool OnTouch(IntPtr view, IntPtr touchData)
5441         {
5442             if (touchData == global::System.IntPtr.Zero)
5443             {
5444                 NUILog.Error("touchData should not be null!");
5445                 return true;
5446             }
5447
5448             TouchEventArgs e = new TouchEventArgs();
5449
5450             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5451
5452             if (_touchDataEventHandler != null)
5453             {
5454                 return _touchDataEventHandler(this, e);
5455             }
5456             return false;
5457         }
5458
5459         // Callback for View Hover signal
5460         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5461         {
5462             if (hoverEvent == global::System.IntPtr.Zero)
5463             {
5464                 NUILog.Error("hoverEvent should not be null!");
5465                 return true;
5466             }
5467
5468             HoverEventArgs e = new HoverEventArgs();
5469
5470             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5471
5472             if (_hoverEventHandler != null)
5473             {
5474                 return _hoverEventHandler(this, e);
5475             }
5476             return false;
5477         }
5478
5479         // Callback for View Wheel signal
5480         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5481         {
5482             if (wheelEvent == global::System.IntPtr.Zero)
5483             {
5484                 NUILog.Error("wheelEvent should not be null!");
5485                 return true;
5486             }
5487
5488             WheelEventArgs e = new WheelEventArgs();
5489
5490             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5491
5492             if (_wheelEventHandler != null)
5493             {
5494                 return _wheelEventHandler(this, e);
5495             }
5496             return false;
5497         }
5498
5499         // Callback for View OnWindow signal
5500         private void OnWindow(IntPtr data)
5501         {
5502             if (_onWindowEventHandler != null)
5503             {
5504                 _onWindowEventHandler(this, null);
5505             }
5506         }
5507
5508         // Callback for View OffWindow signal
5509         private void OffWindow(IntPtr data)
5510         {
5511             if (_offWindowEventHandler != null)
5512             {
5513                 _offWindowEventHandler(this, null);
5514             }
5515         }
5516
5517         // Callback for View visibility change signal
5518         private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5519         {
5520             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5521             if (data != null)
5522             {
5523                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5524             }
5525             e.Visibility = visibility;
5526             e.Type = type;
5527
5528             if (_visibilityChangedEventHandler != null)
5529             {
5530                 _visibilityChangedEventHandler(this, e);
5531             }
5532         }
5533
5534         // Callback for View layout direction change signal
5535         private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5536         {
5537             LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5538             if (data != null)
5539             {
5540                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5541             }
5542             e.Type = type;
5543
5544             if (_layoutDirectionChangedEventHandler != null)
5545             {
5546                 _layoutDirectionChangedEventHandler(this, e);
5547             }
5548         }
5549
5550         private void OnResourcesLoaded(IntPtr view)
5551         {
5552             if (_resourcesLoadedEventHandler != null)
5553             {
5554                 _resourcesLoadedEventHandler(this, null);
5555             }
5556         }
5557
5558         private View ConvertIdToView(uint id)
5559         {
5560             return GetParent()?.FindCurrentChildById(id);
5561         }
5562
5563         private void OnBackgroundResourceLoaded(IntPtr view)
5564         {
5565             BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5566             e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5567
5568             if (_backgroundResourceLoadedEventHandler != null)
5569             {
5570                 _backgroundResourceLoadedEventHandler(this, e);
5571             }
5572         }
5573
5574         /// <summary>
5575         /// Event argument passed through the ChildAdded event.
5576         /// </summary>
5577         /// <since_tizen> 5 </since_tizen>
5578         public class ChildAddedEventArgs : EventArgs
5579         {
5580             /// <summary>
5581             /// Added child view at moment.
5582             /// </summary>
5583             /// <since_tizen> 5 </since_tizen>
5584             public View Added { get; set; }
5585         }
5586
5587         /// <summary>
5588         /// Event argument passed through the ChildRemoved event.
5589         /// </summary>
5590         /// <since_tizen> 5 </since_tizen>
5591         public class ChildRemovedEventArgs : EventArgs
5592         {
5593             /// <summary>
5594             /// Removed child view at moment.
5595             /// </summary>
5596             /// <since_tizen> 5 </since_tizen>
5597             public View Removed { get; set; }
5598         }
5599
5600         /// <summary>
5601         /// Event arguments that passed via the KeyEvent signal.
5602         /// </summary>
5603         /// <since_tizen> 3 </since_tizen>
5604         public class KeyEventArgs : EventArgs
5605         {
5606             private Key _key;
5607
5608             /// <summary>
5609             /// Key - is the key sent to the view.
5610             /// </summary>
5611             /// <since_tizen> 3 </since_tizen>
5612             public Key Key
5613             {
5614                 get
5615                 {
5616                     return _key;
5617                 }
5618                 set
5619                 {
5620                     _key = value;
5621                 }
5622             }
5623         }
5624
5625         /// <summary>
5626         /// Event arguments that passed via the touch signal.
5627         /// </summary>
5628         /// <since_tizen> 3 </since_tizen>
5629         public class TouchEventArgs : EventArgs
5630         {
5631             private Touch _touch;
5632
5633             /// <summary>
5634             /// Touch - contains the information of touch points.
5635             /// </summary>
5636             /// <since_tizen> 3 </since_tizen>
5637             public Touch Touch
5638             {
5639                 get
5640                 {
5641                     return _touch;
5642                 }
5643                 set
5644                 {
5645                     _touch = value;
5646                 }
5647             }
5648         }
5649
5650         /// <summary>
5651         /// Event arguments that passed via the hover signal.
5652         /// </summary>
5653         /// <since_tizen> 3 </since_tizen>
5654         public class HoverEventArgs : EventArgs
5655         {
5656             private Hover _hover;
5657
5658             /// <summary>
5659             /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5660             /// </summary>
5661             /// <since_tizen> 3 </since_tizen>
5662             public Hover Hover
5663             {
5664                 get
5665                 {
5666                     return _hover;
5667                 }
5668                 set
5669                 {
5670                     _hover = value;
5671                 }
5672             }
5673         }
5674
5675         /// <summary>
5676         /// Event arguments that passed via the wheel signal.
5677         /// </summary>
5678         /// <since_tizen> 3 </since_tizen>
5679         public class WheelEventArgs : EventArgs
5680         {
5681             private Wheel _wheel;
5682
5683             /// <summary>
5684             /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5685             /// </summary>
5686             /// <since_tizen> 3 </since_tizen>
5687             public Wheel Wheel
5688             {
5689                 get
5690                 {
5691                     return _wheel;
5692                 }
5693                 set
5694                 {
5695                     _wheel = value;
5696                 }
5697             }
5698         }
5699
5700         /// <summary>
5701         /// Event arguments of visibility changed.
5702         /// </summary>
5703         /// <since_tizen> 3 </since_tizen>
5704         public class VisibilityChangedEventArgs : EventArgs
5705         {
5706             private View _view;
5707             private bool _visibility;
5708             private VisibilityChangeType _type;
5709
5710             /// <summary>
5711             /// The view, or child of view, whose visibility has changed.
5712             /// </summary>
5713             /// <since_tizen> 3 </since_tizen>
5714             public View View
5715             {
5716                 get
5717                 {
5718                     return _view;
5719                 }
5720                 set
5721                 {
5722                     _view = value;
5723                 }
5724             }
5725
5726             /// <summary>
5727             /// Whether the view is now visible or not.
5728             /// </summary>
5729             /// <since_tizen> 3 </since_tizen>
5730             public bool Visibility
5731             {
5732                 get
5733                 {
5734                     return _visibility;
5735                 }
5736                 set
5737                 {
5738                     _visibility = value;
5739                 }
5740             }
5741
5742             /// <summary>
5743             /// Whether the view's visible property has changed or a parent's.
5744             /// </summary>
5745             /// <since_tizen> 3 </since_tizen>
5746             public VisibilityChangeType Type
5747             {
5748                 get
5749                 {
5750                     return _type;
5751                 }
5752                 set
5753                 {
5754                     _type = value;
5755                 }
5756             }
5757         }
5758
5759         /// <summary>
5760         /// Event arguments of layout direction changed.
5761         /// </summary>
5762         /// <since_tizen> 4 </since_tizen>
5763         public class LayoutDirectionChangedEventArgs : EventArgs
5764         {
5765             private View _view;
5766             private ViewLayoutDirectionType _type;
5767
5768             /// <summary>
5769             /// The view, or child of view, whose layout direction has changed.
5770             /// </summary>
5771             /// <since_tizen> 4 </since_tizen>
5772             public View View
5773             {
5774                 get
5775                 {
5776                     return _view;
5777                 }
5778                 set
5779                 {
5780                     _view = value;
5781                 }
5782             }
5783
5784             /// <summary>
5785             /// Whether the view's layout direction property has changed or a parent's.
5786             /// </summary>
5787             /// <since_tizen> 4 </since_tizen>
5788             public ViewLayoutDirectionType Type
5789             {
5790                 get
5791                 {
5792                     return _type;
5793                 }
5794                 set
5795                 {
5796                     _type = value;
5797                 }
5798             }
5799         }
5800
5801         internal class BackgroundResourceLoadedEventArgs : EventArgs
5802         {
5803             private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5804             public ResourceLoadingStatusType Status
5805             {
5806                 get
5807                 {
5808                     return status;
5809                 }
5810                 set
5811                 {
5812                     status = value;
5813                 }
5814             }
5815         }
5816
5817         internal class Property
5818         {
5819             internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5820             internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5821             internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5822             internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5823             internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5824             internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5825             internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5826             internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5827             internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5828             internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5829             internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5830             internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5831             internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5832             internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5833             internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5834             internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5835             internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5836             internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5837             internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5838             internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5839             internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5840             internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5841             internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5842             internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5843             internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5844             internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5845             internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5846             internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5847             internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5848             internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5849             internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5850             internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5851             internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5852             internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5853             internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5854             internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5855             internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5856             internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5857             internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5858             internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5859             internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5860             internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5861             internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5862             internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5863             internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5864             internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5865             internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5866             internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5867             internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5868             internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5869             internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5870             internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5871             internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5872             internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5873             internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5874             internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5875             internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5876             internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5877             internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5878             internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5879             internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5880             internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5881             internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();
5882         }
5883     }
5884 }