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