[NUI] Split NUI Assemblies (#865)
[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 void SetParentOrigin(Vector3 origin)
4572         {
4573             Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4574             if (NDalicPINVOKE.SWIGPendingException.Pending)
4575                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4576         }
4577
4578         internal Vector3 GetCurrentParentOrigin()
4579         {
4580             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4581             if (NDalicPINVOKE.SWIGPendingException.Pending)
4582                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4583             return ret;
4584         }
4585
4586         internal void SetAnchorPoint(Vector3 anchorPoint)
4587         {
4588             Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4589             if (NDalicPINVOKE.SWIGPendingException.Pending)
4590                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4591         }
4592
4593         internal Vector3 GetCurrentAnchorPoint()
4594         {
4595             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4596             if (NDalicPINVOKE.SWIGPendingException.Pending)
4597                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4598             return ret;
4599         }
4600
4601         internal void SetSize(float width, float height)
4602         {
4603             Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4604             if (NDalicPINVOKE.SWIGPendingException.Pending)
4605                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4606         }
4607
4608         internal void SetSize(float width, float height, float depth)
4609         {
4610             Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4611             if (NDalicPINVOKE.SWIGPendingException.Pending)
4612                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4613         }
4614
4615         internal void SetSize(Vector2 size)
4616         {
4617             Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4618             if (NDalicPINVOKE.SWIGPendingException.Pending)
4619                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4620         }
4621
4622         internal void SetSize(Vector3 size)
4623         {
4624             Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4625             if (NDalicPINVOKE.SWIGPendingException.Pending)
4626                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4627         }
4628
4629         internal Vector3 GetTargetSize()
4630         {
4631             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4632             if (NDalicPINVOKE.SWIGPendingException.Pending)
4633                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4634             return ret;
4635         }
4636
4637         internal Size2D GetCurrentSize()
4638         {
4639             Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4640             if (NDalicPINVOKE.SWIGPendingException.Pending)
4641                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4642             Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4643             return size;
4644         }
4645
4646         internal Vector3 GetNaturalSize()
4647         {
4648             Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4649             if (NDalicPINVOKE.SWIGPendingException.Pending)
4650                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4651             return ret;
4652         }
4653
4654         internal void SetPosition(float x, float y)
4655         {
4656             Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4657             if (NDalicPINVOKE.SWIGPendingException.Pending)
4658                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4659         }
4660
4661         internal void SetPosition(float x, float y, float z)
4662         {
4663             Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4664             if (NDalicPINVOKE.SWIGPendingException.Pending)
4665                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4666         }
4667
4668         internal void SetPosition(Vector3 position)
4669         {
4670             Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4671             if (NDalicPINVOKE.SWIGPendingException.Pending)
4672                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4673         }
4674
4675         internal void SetX(float x)
4676         {
4677             Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4678             if (NDalicPINVOKE.SWIGPendingException.Pending)
4679                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4680         }
4681
4682         internal void SetY(float y)
4683         {
4684             Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4685             if (NDalicPINVOKE.SWIGPendingException.Pending)
4686                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4687         }
4688
4689         internal void SetZ(float z)
4690         {
4691             Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4692             if (NDalicPINVOKE.SWIGPendingException.Pending)
4693                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4694         }
4695
4696         internal void TranslateBy(Vector3 distance)
4697         {
4698             Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4699             if (NDalicPINVOKE.SWIGPendingException.Pending)
4700                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4701         }
4702
4703         internal Position GetCurrentPosition()
4704         {
4705             Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4706             if (NDalicPINVOKE.SWIGPendingException.Pending)
4707                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4708             return ret;
4709         }
4710
4711         internal Vector3 GetCurrentWorldPosition()
4712         {
4713             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4714             if (NDalicPINVOKE.SWIGPendingException.Pending)
4715                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4716             return ret;
4717         }
4718
4719         internal void SetInheritPosition(bool inherit)
4720         {
4721             Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4722             if (NDalicPINVOKE.SWIGPendingException.Pending)
4723                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4724         }
4725
4726         internal bool IsPositionInherited()
4727         {
4728             bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4729             if (NDalicPINVOKE.SWIGPendingException.Pending)
4730                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4731             return ret;
4732         }
4733
4734         internal void SetOrientation(Degree angle, Vector3 axis)
4735         {
4736             Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4737             if (NDalicPINVOKE.SWIGPendingException.Pending)
4738                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4739         }
4740
4741         internal void SetOrientation(Radian angle, Vector3 axis)
4742         {
4743             Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4744             if (NDalicPINVOKE.SWIGPendingException.Pending)
4745                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4746         }
4747
4748         internal void SetOrientation(Rotation orientation)
4749         {
4750             Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4751             if (NDalicPINVOKE.SWIGPendingException.Pending)
4752                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4753         }
4754
4755         internal void RotateBy(Degree angle, Vector3 axis)
4756         {
4757             Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4758             if (NDalicPINVOKE.SWIGPendingException.Pending)
4759                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4760         }
4761
4762         internal void RotateBy(Radian angle, Vector3 axis)
4763         {
4764             Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4765             if (NDalicPINVOKE.SWIGPendingException.Pending)
4766                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4767         }
4768
4769         internal void RotateBy(Rotation relativeRotation)
4770         {
4771             Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4772             if (NDalicPINVOKE.SWIGPendingException.Pending)
4773                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4774         }
4775
4776         internal Rotation GetCurrentOrientation()
4777         {
4778             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4779             if (NDalicPINVOKE.SWIGPendingException.Pending)
4780                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4781             return ret;
4782         }
4783
4784         internal void SetInheritOrientation(bool inherit)
4785         {
4786             Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4787             if (NDalicPINVOKE.SWIGPendingException.Pending)
4788                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4789         }
4790
4791         internal bool IsOrientationInherited()
4792         {
4793             bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4794             if (NDalicPINVOKE.SWIGPendingException.Pending)
4795                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4796             return ret;
4797         }
4798
4799         internal Rotation GetCurrentWorldOrientation()
4800         {
4801             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4802             if (NDalicPINVOKE.SWIGPendingException.Pending)
4803                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4804             return ret;
4805         }
4806
4807         internal void SetScale(float scale)
4808         {
4809             Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4810             if (NDalicPINVOKE.SWIGPendingException.Pending)
4811                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4812         }
4813
4814         internal void SetScale(float scaleX, float scaleY, float scaleZ)
4815         {
4816             Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4817             if (NDalicPINVOKE.SWIGPendingException.Pending)
4818                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4819         }
4820
4821         internal void SetScale(Vector3 scale)
4822         {
4823             Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4824             if (NDalicPINVOKE.SWIGPendingException.Pending)
4825                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4826         }
4827
4828         internal void ScaleBy(Vector3 relativeScale)
4829         {
4830             Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4831             if (NDalicPINVOKE.SWIGPendingException.Pending)
4832                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4833         }
4834
4835         internal Vector3 GetCurrentScale()
4836         {
4837             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4838             if (NDalicPINVOKE.SWIGPendingException.Pending)
4839                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4840             return ret;
4841         }
4842
4843         internal Vector3 GetCurrentWorldScale()
4844         {
4845             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4846             if (NDalicPINVOKE.SWIGPendingException.Pending)
4847                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4848             return ret;
4849         }
4850
4851         internal void SetInheritScale(bool inherit)
4852         {
4853             Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4854             if (NDalicPINVOKE.SWIGPendingException.Pending)
4855                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4856         }
4857
4858         internal bool IsScaleInherited()
4859         {
4860             bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4861             if (NDalicPINVOKE.SWIGPendingException.Pending)
4862                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4863             return ret;
4864         }
4865
4866         internal Matrix GetCurrentWorldMatrix()
4867         {
4868             Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4869             if (NDalicPINVOKE.SWIGPendingException.Pending)
4870                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4871             return ret;
4872         }
4873
4874         internal void SetVisible(bool visible)
4875         {
4876             Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4877             if (NDalicPINVOKE.SWIGPendingException.Pending)
4878                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4879         }
4880
4881         internal bool IsVisible()
4882         {
4883             bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4884             if (NDalicPINVOKE.SWIGPendingException.Pending)
4885                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4886             return ret;
4887         }
4888
4889         internal void SetOpacity(float opacity)
4890         {
4891             Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4892             if (NDalicPINVOKE.SWIGPendingException.Pending)
4893                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4894         }
4895
4896         internal float GetCurrentOpacity()
4897         {
4898             float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4899             if (NDalicPINVOKE.SWIGPendingException.Pending)
4900                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4901             return ret;
4902         }
4903
4904         internal void SetColor(Vector4 color)
4905         {
4906             Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4907             if (NDalicPINVOKE.SWIGPendingException.Pending)
4908                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4909         }
4910
4911         internal Vector4 GetCurrentColor()
4912         {
4913             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4914             if (NDalicPINVOKE.SWIGPendingException.Pending)
4915                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4916             return ret;
4917         }
4918
4919         internal void SetColorMode(ColorMode colorMode)
4920         {
4921             Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4922             if (NDalicPINVOKE.SWIGPendingException.Pending)
4923                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4924         }
4925
4926         internal ColorMode GetColorMode()
4927         {
4928             ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4929             if (NDalicPINVOKE.SWIGPendingException.Pending)
4930                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4931             return ret;
4932         }
4933
4934         internal Vector4 GetCurrentWorldColor()
4935         {
4936             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4937             if (NDalicPINVOKE.SWIGPendingException.Pending)
4938                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4939             return ret;
4940         }
4941
4942         internal void SetDrawMode(DrawModeType drawMode)
4943         {
4944             Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4945             if (NDalicPINVOKE.SWIGPendingException.Pending)
4946                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4947         }
4948
4949         internal DrawModeType GetDrawMode()
4950         {
4951             DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4952             if (NDalicPINVOKE.SWIGPendingException.Pending)
4953                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4954             return ret;
4955         }
4956
4957         internal void SetKeyboardFocusable(bool focusable)
4958         {
4959             Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4960             if (NDalicPINVOKE.SWIGPendingException.Pending)
4961                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4962         }
4963
4964         internal bool IsKeyboardFocusable()
4965         {
4966             bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
4967             if (NDalicPINVOKE.SWIGPendingException.Pending)
4968                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4969             return ret;
4970         }
4971
4972         internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4973         {
4974             Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4975             if (NDalicPINVOKE.SWIGPendingException.Pending)
4976                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4977         }
4978
4979         internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4980         {
4981             ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4982             if (NDalicPINVOKE.SWIGPendingException.Pending)
4983                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4984             return ret;
4985         }
4986
4987         internal Vector3 GetSizeModeFactor()
4988         {
4989             Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
4990             if (NDalicPINVOKE.SWIGPendingException.Pending)
4991                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4992             return ret;
4993         }
4994
4995         internal void SetMinimumSize(Vector2 size)
4996         {
4997             Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4998             if (NDalicPINVOKE.SWIGPendingException.Pending)
4999                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5000         }
5001
5002         internal Vector2 GetMinimumSize()
5003         {
5004             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
5005             if (NDalicPINVOKE.SWIGPendingException.Pending)
5006                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5007             return ret;
5008         }
5009
5010         internal void SetMaximumSize(Vector2 size)
5011         {
5012             Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
5013             if (NDalicPINVOKE.SWIGPendingException.Pending)
5014                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5015         }
5016
5017         internal Vector2 GetMaximumSize()
5018         {
5019             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
5020             if (NDalicPINVOKE.SWIGPendingException.Pending)
5021                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5022             return ret;
5023         }
5024
5025         internal int GetHierarchyDepth()
5026         {
5027             int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
5028             if (NDalicPINVOKE.SWIGPendingException.Pending)
5029                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5030             return ret;
5031         }
5032
5033         internal uint GetRendererCount()
5034         {
5035             uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
5036             if (NDalicPINVOKE.SWIGPendingException.Pending)
5037                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5038             return ret;
5039         }
5040
5041         internal TouchDataSignal TouchSignal()
5042         {
5043             TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
5044             if (NDalicPINVOKE.SWIGPendingException.Pending)
5045                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5046             return ret;
5047         }
5048
5049         internal HoverSignal HoveredSignal()
5050         {
5051             HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
5052             if (NDalicPINVOKE.SWIGPendingException.Pending)
5053                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5054             return ret;
5055         }
5056
5057         internal WheelSignal WheelEventSignal()
5058         {
5059             WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
5060             if (NDalicPINVOKE.SWIGPendingException.Pending)
5061                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5062             return ret;
5063         }
5064
5065         internal ViewSignal OnWindowSignal()
5066         {
5067             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5068             if (NDalicPINVOKE.SWIGPendingException.Pending)
5069                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5070             return ret;
5071         }
5072
5073         internal ViewSignal OffWindowSignal()
5074         {
5075             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5076             if (NDalicPINVOKE.SWIGPendingException.Pending)
5077                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5078             return ret;
5079         }
5080
5081         internal ViewSignal OnRelayoutSignal()
5082         {
5083             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5084             if (NDalicPINVOKE.SWIGPendingException.Pending)
5085                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5086             return ret;
5087         }
5088
5089         internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5090         {
5091             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5092             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5093             return ret;
5094         }
5095
5096         internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5097         {
5098             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5099             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5100             return ret;
5101         }
5102
5103         internal ViewSignal ResourcesLoadedSignal()
5104         {
5105             ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5106             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5107             return ret;
5108         }
5109
5110         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5111         {
5112             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5113         }
5114
5115         internal bool IsTopLevelView()
5116         {
5117             if (GetParent() is Layer)
5118             {
5119                 return true;
5120             }
5121             return false;
5122         }
5123
5124         internal void SetKeyInputFocus()
5125         {
5126             Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5128         }
5129
5130         internal void ClearKeyInputFocus()
5131         {
5132             Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5133             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5134         }
5135
5136         internal PinchGestureDetector GetPinchGestureDetector()
5137         {
5138             PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5139             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5140             return ret;
5141         }
5142
5143         internal PanGestureDetector GetPanGestureDetector()
5144         {
5145             PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5146             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5147             return ret;
5148         }
5149
5150         internal TapGestureDetector GetTapGestureDetector()
5151         {
5152             TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5153             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5154             return ret;
5155         }
5156
5157         internal LongPressGestureDetector GetLongPressGestureDetector()
5158         {
5159             LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5161             return ret;
5162         }
5163
5164         internal void SetBackgroundColor(Vector4 color)
5165         {
5166             Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5167             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5168         }
5169
5170         internal Vector4 GetBackgroundColor()
5171         {
5172             Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5173             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5174             return ret;
5175         }
5176
5177         internal void SetBackgroundImage(Image image)
5178         {
5179             Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5180             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5181         }
5182
5183         internal ControlKeySignal KeyEventSignal()
5184         {
5185             ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5186             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5187             return ret;
5188         }
5189
5190         internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5191         {
5192             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5194             return ret;
5195         }
5196
5197         internal KeyInputFocusSignal KeyInputFocusLostSignal()
5198         {
5199             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5200             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5201             return ret;
5202         }
5203
5204         internal IntPtr GetPtrfromView()
5205         {
5206             return (IntPtr)swigCPtr;
5207         }
5208
5209         /// <summary>
5210         /// Removes the layout from this View.
5211         /// </summary>
5212         internal void ResetLayout()
5213         {
5214             _layout = null;
5215         }
5216
5217         internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5218         {
5219             return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5220         }
5221
5222         /// <summary>
5223         /// you can override it to clean-up your own resources.
5224         /// </summary>
5225         /// <param name="type">DisposeTypes</param>
5226         /// <since_tizen> 3 </since_tizen>
5227         protected override void Dispose(DisposeTypes type)
5228         {
5229             if (disposed)
5230             {
5231                 return;
5232             }
5233
5234             if (type == DisposeTypes.Explicit)
5235             {
5236                 //Called by User
5237                 //Release your own managed resources here.
5238                 //You should release all of your own disposable objects here.
5239             }
5240
5241             //Release your own unmanaged resources here.
5242             //You should not access any managed member here except static instance.
5243             //because the execution order of Finalizes is non-deterministic.
5244             if (this != null)
5245             {
5246                 DisConnectFromSignals();
5247             }
5248
5249             if (swigCPtr.Handle != global::System.IntPtr.Zero)
5250             {
5251                 if (swigCMemOwn)
5252                 {
5253                     swigCMemOwn = false;
5254                     Interop.View.delete_View(swigCPtr);
5255                 }
5256                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5257             }
5258
5259             foreach (View view in Children)
5260             {
5261                 view.InternalParent = null;
5262             }
5263
5264             base.Dispose(type);
5265
5266         }
5267
5268         private void OnSize2DChanged(int width, int height)
5269         {
5270             Size2D = new Size2D(width, height);
5271         }
5272
5273         private void OnPosition2DChanged(int x, int y)
5274         {
5275             Position2D = new Position2D(x, y);
5276         }
5277
5278         private void DisConnectFromSignals()
5279         {
5280             // Save current CPtr.
5281             global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5282
5283             // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5284             swigCPtr = GetBaseHandleCPtrHandleRef;
5285
5286             if (_onRelayoutEventCallback != null)
5287             {
5288                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5289             }
5290
5291             if (_offWindowEventCallback != null)
5292             {
5293                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5294             }
5295
5296             if (_onWindowEventCallback != null)
5297             {
5298                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5299             }
5300
5301             if (_wheelEventCallback != null)
5302             {
5303                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5304             }
5305
5306             if (_hoverEventCallback != null)
5307             {
5308                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5309             }
5310
5311             if (_touchDataCallback != null)
5312             {
5313                 this.TouchSignal().Disconnect(_touchDataCallback);
5314             }
5315
5316             if (_ResourcesLoadedCallback != null)
5317             {
5318                 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5319             }
5320
5321             if (_offWindowEventCallback != null)
5322             {
5323                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5324             }
5325
5326             if (_onWindowEventCallback != null)
5327             {
5328                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5329             }
5330
5331             if (_wheelEventCallback != null)
5332             {
5333                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5334             }
5335
5336             if (_hoverEventCallback != null)
5337             {
5338                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5339             }
5340
5341             if (_touchDataCallback != null)
5342             {
5343                 this.TouchSignal().Disconnect(_touchDataCallback);
5344             }
5345
5346             if (_onRelayoutEventCallback != null)
5347             {
5348                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5349             }
5350
5351             if (_keyCallback != null)
5352             {
5353                 this.KeyEventSignal().Disconnect(_keyCallback);
5354             }
5355
5356             if (_keyInputFocusLostCallback != null)
5357             {
5358                 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5359             }
5360
5361             if (_keyInputFocusGainedCallback != null)
5362             {
5363                 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5364             }
5365
5366             if (_backgroundResourceLoadedCallback != null)
5367             {
5368                 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5369             }
5370
5371             if (_onWindowSendEventCallback != null)
5372             {
5373                 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5374             }
5375
5376             // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5377             // Restore current CPtr.
5378             swigCPtr = currentCPtr;
5379         }
5380
5381         private void OnKeyInputFocusGained(IntPtr view)
5382         {
5383             if (_keyInputFocusGainedEventHandler != null)
5384             {
5385                 _keyInputFocusGainedEventHandler(this, null);
5386             }
5387         }
5388
5389         private void OnKeyInputFocusLost(IntPtr view)
5390         {
5391             if (_keyInputFocusLostEventHandler != null)
5392             {
5393                 _keyInputFocusLostEventHandler(this, null);
5394             }
5395         }
5396
5397         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5398         {
5399             if (keyEvent == global::System.IntPtr.Zero)
5400             {
5401                 NUILog.Error("keyEvent should not be null!");
5402                 return true;
5403             }
5404
5405             KeyEventArgs e = new KeyEventArgs();
5406
5407             bool result = false;
5408
5409             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5410
5411             if (_keyEventHandler != null)
5412             {
5413                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5414
5415                 // Oring the result of each callback.
5416                 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5417                 {
5418                     result |= del(this, e);
5419                 }
5420             }
5421
5422             return result;
5423         }
5424
5425         // Callback for View OnRelayout signal
5426         private void OnRelayout(IntPtr data)
5427         {
5428             if (_onRelayoutEventHandler != null)
5429             {
5430                 _onRelayoutEventHandler(this, null);
5431             }
5432         }
5433
5434         // Callback for View TouchSignal
5435         private bool OnTouch(IntPtr view, IntPtr touchData)
5436         {
5437             if (touchData == global::System.IntPtr.Zero)
5438             {
5439                 NUILog.Error("touchData should not be null!");
5440                 return true;
5441             }
5442
5443             TouchEventArgs e = new TouchEventArgs();
5444
5445             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5446
5447             if (_touchDataEventHandler != null)
5448             {
5449                 return _touchDataEventHandler(this, e);
5450             }
5451             return false;
5452         }
5453
5454         // Callback for View Hover signal
5455         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5456         {
5457             if (hoverEvent == global::System.IntPtr.Zero)
5458             {
5459                 NUILog.Error("hoverEvent should not be null!");
5460                 return true;
5461             }
5462
5463             HoverEventArgs e = new HoverEventArgs();
5464
5465             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5466
5467             if (_hoverEventHandler != null)
5468             {
5469                 return _hoverEventHandler(this, e);
5470             }
5471             return false;
5472         }
5473
5474         // Callback for View Wheel signal
5475         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5476         {
5477             if (wheelEvent == global::System.IntPtr.Zero)
5478             {
5479                 NUILog.Error("wheelEvent should not be null!");
5480                 return true;
5481             }
5482
5483             WheelEventArgs e = new WheelEventArgs();
5484
5485             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5486
5487             if (_wheelEventHandler != null)
5488             {
5489                 return _wheelEventHandler(this, e);
5490             }
5491             return false;
5492         }
5493
5494         // Callback for View OnWindow signal
5495         private void OnWindow(IntPtr data)
5496         {
5497             if (_onWindowEventHandler != null)
5498             {
5499                 _onWindowEventHandler(this, null);
5500             }
5501         }
5502
5503         // Callback for View OffWindow signal
5504         private void OffWindow(IntPtr data)
5505         {
5506             if (_offWindowEventHandler != null)
5507             {
5508                 _offWindowEventHandler(this, null);
5509             }
5510         }
5511
5512         // Callback for View visibility change signal
5513         private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5514         {
5515             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5516             if (data != null)
5517             {
5518                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5519             }
5520             e.Visibility = visibility;
5521             e.Type = type;
5522
5523             if (_visibilityChangedEventHandler != null)
5524             {
5525                 _visibilityChangedEventHandler(this, e);
5526             }
5527         }
5528
5529         // Callback for View layout direction change signal
5530         private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5531         {
5532             LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5533             if (data != null)
5534             {
5535                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5536             }
5537             e.Type = type;
5538
5539             if (_layoutDirectionChangedEventHandler != null)
5540             {
5541                 _layoutDirectionChangedEventHandler(this, e);
5542             }
5543         }
5544
5545         private void OnResourcesLoaded(IntPtr view)
5546         {
5547             if (_resourcesLoadedEventHandler != null)
5548             {
5549                 _resourcesLoadedEventHandler(this, null);
5550             }
5551         }
5552
5553         private View ConvertIdToView(uint id)
5554         {
5555             View view = null;
5556             if (GetParent() is View)
5557             {
5558                 View parentView = GetParent() as View;
5559                 view = parentView.FindChildById(id);
5560             }
5561
5562             if (!view)
5563             {
5564                 view = Window.Instance.GetRootLayer().FindChildById(id);
5565             }
5566
5567             return view;
5568         }
5569
5570         private void OnBackgroundResourceLoaded(IntPtr view)
5571         {
5572             BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5573             e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5574
5575             if (_backgroundResourceLoadedEventHandler != null)
5576             {
5577                 _backgroundResourceLoadedEventHandler(this, e);
5578             }
5579         }
5580
5581         /// <summary>
5582         /// Event argument passed through the ChildAdded event.
5583         /// </summary>
5584         /// <since_tizen> 5 </since_tizen>
5585         public class ChildAddedEventArgs : EventArgs
5586         {
5587             /// <summary>
5588             /// Added child view at moment.
5589             /// </summary>
5590             /// <since_tizen> 5 </since_tizen>
5591             public View Added { get; set; }
5592         }
5593
5594         /// <summary>
5595         /// Event argument passed through the ChildRemoved event.
5596         /// </summary>
5597         /// <since_tizen> 5 </since_tizen>
5598         public class ChildRemovedEventArgs : EventArgs
5599         {
5600             /// <summary>
5601             /// Removed child view at moment.
5602             /// </summary>
5603             /// <since_tizen> 5 </since_tizen>
5604             public View Removed { get; set; }
5605         }
5606
5607         /// <summary>
5608         /// Event arguments that passed via the KeyEvent signal.
5609         /// </summary>
5610         /// <since_tizen> 3 </since_tizen>
5611         public class KeyEventArgs : EventArgs
5612         {
5613             private Key _key;
5614
5615             /// <summary>
5616             /// Key - is the key sent to the view.
5617             /// </summary>
5618             /// <since_tizen> 3 </since_tizen>
5619             public Key Key
5620             {
5621                 get
5622                 {
5623                     return _key;
5624                 }
5625                 set
5626                 {
5627                     _key = value;
5628                 }
5629             }
5630         }
5631
5632         /// <summary>
5633         /// Event arguments that passed via the touch signal.
5634         /// </summary>
5635         /// <since_tizen> 3 </since_tizen>
5636         public class TouchEventArgs : EventArgs
5637         {
5638             private Touch _touch;
5639
5640             /// <summary>
5641             /// Touch - contains the information of touch points.
5642             /// </summary>
5643             /// <since_tizen> 3 </since_tizen>
5644             public Touch Touch
5645             {
5646                 get
5647                 {
5648                     return _touch;
5649                 }
5650                 set
5651                 {
5652                     _touch = value;
5653                 }
5654             }
5655         }
5656
5657         /// <summary>
5658         /// Event arguments that passed via the hover signal.
5659         /// </summary>
5660         /// <since_tizen> 3 </since_tizen>
5661         public class HoverEventArgs : EventArgs
5662         {
5663             private Hover _hover;
5664
5665             /// <summary>
5666             /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5667             /// </summary>
5668             /// <since_tizen> 3 </since_tizen>
5669             public Hover Hover
5670             {
5671                 get
5672                 {
5673                     return _hover;
5674                 }
5675                 set
5676                 {
5677                     _hover = value;
5678                 }
5679             }
5680         }
5681
5682         /// <summary>
5683         /// Event arguments that passed via the wheel signal.
5684         /// </summary>
5685         /// <since_tizen> 3 </since_tizen>
5686         public class WheelEventArgs : EventArgs
5687         {
5688             private Wheel _wheel;
5689
5690             /// <summary>
5691             /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5692             /// </summary>
5693             /// <since_tizen> 3 </since_tizen>
5694             public Wheel Wheel
5695             {
5696                 get
5697                 {
5698                     return _wheel;
5699                 }
5700                 set
5701                 {
5702                     _wheel = value;
5703                 }
5704             }
5705         }
5706
5707         /// <summary>
5708         /// Event arguments of visibility changed.
5709         /// </summary>
5710         /// <since_tizen> 3 </since_tizen>
5711         public class VisibilityChangedEventArgs : EventArgs
5712         {
5713             private View _view;
5714             private bool _visibility;
5715             private VisibilityChangeType _type;
5716
5717             /// <summary>
5718             /// The view, or child of view, whose visibility has changed.
5719             /// </summary>
5720             /// <since_tizen> 3 </since_tizen>
5721             public View View
5722             {
5723                 get
5724                 {
5725                     return _view;
5726                 }
5727                 set
5728                 {
5729                     _view = value;
5730                 }
5731             }
5732
5733             /// <summary>
5734             /// Whether the view is now visible or not.
5735             /// </summary>
5736             /// <since_tizen> 3 </since_tizen>
5737             public bool Visibility
5738             {
5739                 get
5740                 {
5741                     return _visibility;
5742                 }
5743                 set
5744                 {
5745                     _visibility = value;
5746                 }
5747             }
5748
5749             /// <summary>
5750             /// Whether the view's visible property has changed or a parent's.
5751             /// </summary>
5752             /// <since_tizen> 3 </since_tizen>
5753             public VisibilityChangeType Type
5754             {
5755                 get
5756                 {
5757                     return _type;
5758                 }
5759                 set
5760                 {
5761                     _type = value;
5762                 }
5763             }
5764         }
5765
5766         /// <summary>
5767         /// Event arguments of layout direction changed.
5768         /// </summary>
5769         /// <since_tizen> 4 </since_tizen>
5770         public class LayoutDirectionChangedEventArgs : EventArgs
5771         {
5772             private View _view;
5773             private ViewLayoutDirectionType _type;
5774
5775             /// <summary>
5776             /// The view, or child of view, whose layout direction has changed.
5777             /// </summary>
5778             /// <since_tizen> 4 </since_tizen>
5779             public View View
5780             {
5781                 get
5782                 {
5783                     return _view;
5784                 }
5785                 set
5786                 {
5787                     _view = value;
5788                 }
5789             }
5790
5791             /// <summary>
5792             /// Whether the view's layout direction property has changed or a parent's.
5793             /// </summary>
5794             /// <since_tizen> 4 </since_tizen>
5795             public ViewLayoutDirectionType Type
5796             {
5797                 get
5798                 {
5799                     return _type;
5800                 }
5801                 set
5802                 {
5803                     _type = value;
5804                 }
5805             }
5806         }
5807
5808         internal class BackgroundResourceLoadedEventArgs : EventArgs
5809         {
5810             private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5811             public ResourceLoadingStatusType Status
5812             {
5813                 get
5814                 {
5815                     return status;
5816                 }
5817                 set
5818                 {
5819                     status = value;
5820                 }
5821             }
5822         }
5823
5824         internal class Property
5825         {
5826             internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5827             internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5828             internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5829             internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5830             internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5831             internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5832             internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5833             internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5834             internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5835             internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5836             internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5837             internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5838             internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5839             internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5840             internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5841             internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5842             internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5843             internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5844             internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5845             internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5846             internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5847             internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5848             internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5849             internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5850             internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5851             internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5852             internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5853             internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5854             internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5855             internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5856             internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5857             internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5858             internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5859             internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5860             internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5861             internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5862             internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5863             internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5864             internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5865             internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5866             internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5867             internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5868             internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5869             internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5870             internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5871             internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5872             internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5873             internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5874             internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5875             internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5876             internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5877             internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5878             internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5879             internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5880             internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5881             internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5882             internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5883             internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5884             internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5885             internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5886             internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5887             internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5888             internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();
5889         }
5890     }
5891 }